aboutsummaryrefslogtreecommitdiffstats
path: root/Installer/FilelistTool.java
blob: c5a0c32dc9af14effcee417861d317a041dfcb2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

public class FilelistTool
{
    public static final FilelistOS GetMyInstance(MachineCtrl mctrl)
    {
        if(mctrl==null)
		return null;
	if(mctrl.isWin32)
	{
	   if(mctrl.osArch.indexOf("x86")>=0)
	   {
		return new FilelistWin32I386();
	   }
	   return null;
	}
	if(mctrl.isUnix)
	{
		if(mctrl.unixFlavor==mctrl.unixFlavor_Linux)
		{
		   if(mctrl.osArch.indexOf("x86")>=0 || 
		      mctrl.osArch.indexOf("i86")>=0 ||
		      mctrl.osArch.indexOf("i686")>=0 || 
		      mctrl.osArch.indexOf("i586")>=0 || 
		      mctrl.osArch.indexOf("i486")>=0 || 
		      mctrl.osArch.indexOf("i386")>=0
		     )
		   {
			return new FilelistLinuxI386GlibcXF86();
		    } else if(mctrl.osArch.indexOf("ppc")>=0)
		    {
			return new FilelistLinuxPPCGlibcXF86();
		    }
		} else if(mctrl.unixFlavor==mctrl.unixFlavor_Solaris)
		{
		    if(mctrl.osArch.indexOf("sparc")>=0)
			return new FilelistSUNSolaris26Sparc();
		} else if(mctrl.unixFlavor==mctrl.unixFlavor_Irix)
		{
		    if(mctrl.osArch.indexOf("mips")>=0)
			return new FilelistSGIIrix62Mips();
		} else if(mctrl.unixFlavor==mctrl.unixFlavor_HPUX)
		{
		    if(mctrl.osArch.indexOf("pa_risc")>=0)
			return new FilelistHPUXPaRisc();
		}
	}
	if(mctrl.isMacOs)
	{
	    if(mctrl.osArch.indexOf("powerpc")>=0)
		return new FilelistMacOSPPC();
	}
	return null;
    }
}