예제 #1
0
        public AS3ProjectBuilder(AS3Project project, string compilerPath, string ipcName)
            : base(project, compilerPath)
        {
            this.project = project;
			
            DetectFlexSdk(compilerPath);

            bool mxmlcExists = File.Exists(mxmlcPath);
            bool fcshExists = File.Exists(fcshPath);
            bool asc2Exixts = File.Exists(asc2Path);
            asc2Mode = asc2Exixts && !fcshExists;
 
            bool hostedInFD = !asc2Mode && ipcName != null && ipcName != "";

            if (hostedInFD)
            {
                fcsh = Activator.GetObject(typeof(FlexCompilerShell),
                    "ipc://" + ipcName + "/FlexCompilerShell") as FlexCompilerShell;
            }

            if (project.OutputType == OutputType.Application || project.OutputType == OutputType.Library)
            {
                if (fcsh != null && !fcshExists) throw new Exception("Could not locate lib\\fcsh.jar in Flex SDK.");
                if (fcsh == null && !mxmlcExists && !asc2Mode) 
                    throw new Exception("Could not locate lib\\mxmlc.jar or lib\\mxmlc-cli.jar in Flex SDK.");
            }
        }
예제 #2
0
        public AS3ProjectBuilder(AS3Project project, string compilerPath, string ipcName)
            : base(project, compilerPath)
        {
            this.project = project;

            DetectFlexSdk(compilerPath);

            bool hostedInFD = (ipcName != null && ipcName != "");
            bool mxmlcExists = File.Exists(mxmlcPath);
            bool fcshExists = File.Exists(fcshPath);

            if (!mxmlcExists && !project.NoOutput)
                throw new Exception("Could not locate lib\\mxmlc.jar in Flex SDK. Please set the correct path to the Flex SDK in AS3Context plugin settings.");

            if (hostedInFD && fcshExists)
            {
                Console.WriteLine("Using the Flex Compiler Shell.");

                fcsh = Activator.GetObject(typeof(FlexCompilerShell),
                    "ipc://" + ipcName + "/FlexCompilerShell") as FlexCompilerShell;
            }
        }