Ignore:
Timestamp:
Mar 31, 2013, 6:02:09 PM (12 years ago)
Author:
alloc
Message:

AEI2 0.99y:

  • Perhaps fixes launching Oni on MacOS
Location:
java/PlatformTools/src/net/oni2/platformtools/applicationinvoker
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • java/PlatformTools/src/net/oni2/platformtools/applicationinvoker/ApplicationInvoker.java

    r724 r767  
    1919public class ApplicationInvoker {
    2020        private static Vector<String> buildCommandLine(EExeType exeType,
    21                         File program, Vector<String> params)
     21                        File program, Vector<String> params, boolean ignoreFileNotFound)
    2222                        throws ERuntimeNotInstalledException, FileNotFoundException {
    23                 if (program.getParentFile() != null && !program.exists())
    24                         throw new FileNotFoundException();
     23                if (!ignoreFileNotFound)
     24                        if (program.getParentFile() != null && !program.exists())
     25                                throw new FileNotFoundException();
    2526                Vector<String> cmdLine = new Vector<String>();
    2627                switch (exeType) {
     
    8081         * @param params
    8182         *            List of command and arguments
     83         * @param ignoreFileNotFound
     84         *            Ignore if the program file is not found
    8285         * @return Error code and list of output lines
    8386         * @throws IOException
     
    9093         */
    9194        public static ApplicationInvocationResult executeAndWait(EExeType exeType,
    92                         File workingDirectory, File program, Vector<String> params)
    93                         throws ERuntimeNotInstalledException, FileNotFoundException,
    94                         IOException {
     95                        File workingDirectory, File program, Vector<String> params,
     96                        boolean ignoreFileNotFound) throws ERuntimeNotInstalledException,
     97                        FileNotFoundException, IOException {
    9598                return executeAndWait(workingDirectory,
    96                                 buildCommandLine(exeType, program, params));
     99                                buildCommandLine(exeType, program, params, ignoreFileNotFound));
    97100        }
    98101
     
    108111         * @param params
    109112         *            List of command and arguments
     113         * @param ignoreFileNotFound
     114         *            Ignore if the program file is not found
    110115         * @throws ERuntimeNotInstalledException
    111116         *             If the program to be executed requires a runtime which could
     
    115120         */
    116121        public static void execute(EExeType exeType, File workingDirectory,
    117                         File program, Vector<String> params)
     122                        File program, Vector<String> params, boolean ignoreFileNotFound)
    118123                        throws ERuntimeNotInstalledException, FileNotFoundException {
    119                 execute(buildCommandLine(exeType, program, params), workingDirectory);
     124                execute(buildCommandLine(exeType, program, params, ignoreFileNotFound),
     125                                workingDirectory);
    120126        }
    121127
  • java/PlatformTools/src/net/oni2/platformtools/applicationinvoker/DotNet.java

    r724 r767  
    5858                                        ApplicationInvocationResult res = null;
    5959                                        try {
    60                                                 res = ApplicationInvoker.executeAndWait(EExeType.OSBINARY, null, new File("which"), params);
     60                                                res = ApplicationInvoker.executeAndWait(EExeType.OSBINARY, null, new File("which"), params, false);
    6161                                        } catch (IOException e) {
    6262                                                e.printStackTrace();
  • java/PlatformTools/src/net/oni2/platformtools/applicationinvoker/Wine.java

    r724 r767  
    3636                                try {
    3737                                        res = ApplicationInvoker.executeAndWait(EExeType.OSBINARY,
    38                                                         null, new File("which"), params);
     38                                                        null, new File("which"), params, false);
    3939                                } catch (IOException e) {
    4040                                        e.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.