public static DeploymentToolWrapper Create(VCConfiguration config)
 {
     DeploymentToolWrapper wrapper = null;
     try
     {
         wrapper = new DeploymentToolWrapper(config.DeploymentTool);
     }
     catch
     {
     }
     return (wrapper.deploymentToolObj == null) ? null : wrapper;
 }
Пример #2
0
        public static DeploymentToolWrapper Create(VCConfiguration config)
        {
            DeploymentToolWrapper wrapper = null;

            try
            {
                wrapper = new DeploymentToolWrapper(config.DeploymentTool);
            }
            catch
            {
            }
            return((wrapper.deploymentToolObj == null) ? null : wrapper);
        }
Пример #3
0
        private void RemoveDeploySettings(DeploymentToolWrapper deploymentTool, QtModule module,
                                       VCConfiguration config, QtModuleInfo moduleInfo)
        {
            if (moduleInfo == null)
                moduleInfo = QtModules.Instance.ModuleInformation(module);
            if (deploymentTool == null)
                deploymentTool = DeploymentToolWrapper.Create(config);
            if (deploymentTool == null)
                return;

            string destDir = deploymentTool.RemoteDirectory;
            const string qtSrcDir = "$(QTDIR)\\lib";
            string filename = moduleInfo.GetDllFileName(IsDebugConfiguration(config));

            if (deploymentTool.GetAdditionalFiles().IndexOf(filename) >= 0)
                deploymentTool.Remove(filename, qtSrcDir, destDir);

            // remove dependent modules
            foreach (QtModule dependentModule in moduleInfo.dependentModules)
            {
                if (!HasModule(dependentModule))
                    RemoveDeploySettings(deploymentTool, dependentModule, config, null);
            }
        }
Пример #4
0
        private void AddDeploySettings(DeploymentToolWrapper deploymentTool, QtModule module,
                                       VCConfiguration config, QtModuleInfo moduleInfo,
                                       VersionInformation versionInfo)
        {
            // for static Qt builds it doesn't make sense
            // to add deployment settings for Qt modules
            if (versionInfo.IsStaticBuild())
                return;

            if (moduleInfo == null)
                moduleInfo = QtModules.Instance.ModuleInformation(module);

            if (moduleInfo == null || !moduleInfo.HasDLL)
                return;

            if (deploymentTool == null)
                deploymentTool = DeploymentToolWrapper.Create(config);
            if (deploymentTool == null)
                return;

            string destDir = deploymentTool.RemoteDirectory;
            const string qtSrcDir = "$(QTDIR)\\lib";
            string filename = moduleInfo.GetDllFileName(IsDebugConfiguration(config));

            if (deploymentTool.GetAdditionalFiles().IndexOf(filename) < 0)
                deploymentTool.Add(filename, qtSrcDir, destDir);

            // add dependent modules
            foreach (QtModule dependentModule in moduleInfo.dependentModules)
                AddDeploySettings(deploymentTool, dependentModule, config, null, versionInfo);
        }