Пример #1
0
        public As3ProjectBuilder(string pFlexsdkPath)
        {
            if (Path.GetFileName(pFlexsdkPath) == "bin")
            {
                pFlexsdkPath = Path.GetDirectoryName(pFlexsdkPath);
            }

            setupRemotingServer();

            _sdkPath   = pFlexsdkPath;
            _mxmlcPath = Path.Combine(Path.Combine(pFlexsdkPath, "lib"), @"mxmlc.jar");
            _fcshPath  = Path.Combine(Path.Combine(pFlexsdkPath, "lib"), @"fcsh.jar");

            bool mxmlcExists = File.Exists(_mxmlcPath);
            bool fcshExists  = File.Exists(_fcshPath);

            if (!mxmlcExists)
            {
                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 (!fcshExists)
            {
                return;
            }

            _fcsh = Activator.GetObject(typeof(FlexCompilerShell),
                                        @"ipc://" + _ipcName + "/FlexCompilerShell") as FlexCompilerShell;
        }
Пример #2
0
		public As3ProjectBuilder(string pFlexsdkPath) {
			if (Path.GetFileName(pFlexsdkPath) == "bin")
				pFlexsdkPath = Path.GetDirectoryName(pFlexsdkPath);

			setupRemotingServer();

			_sdkPath = pFlexsdkPath;
			_mxmlcPath = Path.Combine(Path.Combine(pFlexsdkPath, "lib"), @"mxmlc.jar");
			_fcshPath = Path.Combine(Path.Combine(pFlexsdkPath, "lib"), @"fcsh.jar");

			bool mxmlcExists = File.Exists(_mxmlcPath);
			bool fcshExists = File.Exists(_fcshPath);

			if (!mxmlcExists)
				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 (!fcshExists) {
				return;
			}

			_fcsh = Activator.GetObject(typeof(FlexCompilerShell),
										@"ipc://" + _ipcName + "/FlexCompilerShell") as FlexCompilerShell;
		}