예제 #1
0
        public string CreatePrivateAssembly(int DesktopModuleId)
        {
            string Result = "";

            //Get the Module Definition File for this Module
            DesktopModuleController objDesktopModuleController = new DesktopModuleController();
            DesktopModuleInfo       objModule = objDesktopModuleController.GetDesktopModule(DesktopModuleId);

            _Folder        = Globals.ApplicationMapPath + "\\DesktopModules\\" + objModule.FolderName;
            _AppCodeFolder = Globals.ApplicationMapPath + "\\App_Code\\" + objModule.FolderName;

            if (IncludeSource)
            {
                _ResourceFileName = objModule.ModuleName + "_Source.zip";
                CreateResourceFile();
            }

            //Create File List
            CreateFileList();

            if (CreateManifest)
            {
                ProgressLog.StartJob(string.Format(Localization.GetString("LOG.PAWriter.CreateManifest"), objModule.FriendlyName));
                CreateDnnManifest(objModule);
                ProgressLog.EndJob((string.Format(Localization.GetString("LOG.PAWriter.CreateManifest"), objModule.FriendlyName)));
            }

            //Always add Manifest file to file list
            AddFile(new PaFileInfo(objModule.ModuleName + ".dnn", "", Folder), true);

            ProgressLog.StartJob(string.Format(Localization.GetString("LOG.PAWriter.CreateZipFile"), objModule.FriendlyName));
            CreateZipFile();
            ProgressLog.EndJob((string.Format(Localization.GetString("LOG.PAWriter.CreateZipFile"), objModule.FriendlyName)));

            return(Result);
        }