Changeset 1012 for java/installer2/src/net/oni2/aeinstaller
- Timestamp:
- Mar 23, 2015, 4:06:20 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/backend/oni/OniLauncher.java
r785 r1012 3 3 import java.io.File; 4 4 import java.io.FileNotFoundException; 5 import java.io.IOException; 5 6 import java.util.Vector; 6 7 8 import org.apache.commons.io.FileUtils; 9 10 import net.oni2.aeinstaller.backend.CaseInsensitiveFile; 7 11 import net.oni2.aeinstaller.backend.Paths; 8 12 import net.oni2.platformtools.PlatformInformation; 13 import net.oni2.platformtools.PlatformInformation.Platform; 9 14 import net.oni2.platformtools.applicationinvoker.ApplicationInvoker; 10 15 import net.oni2.platformtools.applicationinvoker.EExeType; … … 43 48 } 44 49 } 50 51 private static Vector<String> getLaunchArgs () { 52 Vector<String> res = new Vector<String>(); 53 if (PlatformInformation.getPlatform() == Platform.MACOS) { 54 File launchArgs = CaseInsensitiveFile.getCaseInsensitiveFile(Paths.getEditionBasePath(), "launch_args.txt"); 55 if (launchArgs.exists()) { 56 try { 57 String[] argsStrings = FileUtils.readFileToString(launchArgs).split(" "); 58 for (int i = 0; i < argsStrings.length; i++) { 59 argsStrings [i] = argsStrings [i].trim(); 60 if (argsStrings [i].length() > 0) { 61 res.add(argsStrings [i]); 62 } 63 } 64 } catch (IOException e) { 65 e.printStackTrace(); 66 } 67 } 68 } 69 return res; 70 } 45 71 46 72 /** … … 55 81 ERuntimeNotInstalledException { 56 82 File exe = getOniExe(); 57 Vector<String> params = new Vector<String>();83 Vector<String> params = getLaunchArgs(); 58 84 params.add("-debugfiles"); 59 85 if (windowed) 60 86 params.add("-noswitch"); 87 else 88 params.remove("-noswitch"); 61 89 ApplicationInvoker.execute(getOniExeType(), Paths.getEditionBasePath(), 62 90 exe, params, true);
Note:
See TracChangeset
for help on using the changeset viewer.