; 该执行目录为 setup.iss 所在的目录,请注意拼接相对目录 #define MyAppId "{{1AC4D338-0D28-47E4-9FC7-18929EDDF90D}" #define MyAppName "xhschool_test" #define MyAppNameZh "星火智慧课堂测试版" #define MyAppVersion "3.4.5" #define MyAppPublisher "码客说" #define MyAppURL "www.psvmc.cn" ; 打包文件 #define MyAppExeName "xhschool.exe" #define SourceMain "D:\Project\CSharp\schoolclient\bin\x86\Debug\xhschool.exe" #define SourceFolder "D:\Project\CSharp\schoolclient\bin\x86\Debug\*" #define SetupIconFilePath "D:\Project\CSharp\schoolclient\bin\x86\Debug\favicon256.ico" #define MyExcludes "\db,\temp,\Log,\wwwroot\school,\wwwroot\tongping,app.config,app_service.xml,app_service_test.xml" ; 打包生成位置 #define OutputPath "D:\程序打包\星火智慧课堂-测试版\" #define OutputFileName "星火智慧课堂测试版" ; license文件 #define LicenseFilePath ".\setup_resources\license.txt" ; 美化资源文件 #define ResourcesPath ".\setup_resources\*" [setup] AppId={#MyAppId} AppName={#MyAppName} AppVersion={#MyAppVersion} AppVerName={#MyAppName} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={autopf}\{#MyAppName} LicenseFile={#LicenseFilePath} OutputDir={#OutputPath} OutputBaseFilename={#OutputFileName}v{#MyAppVersion} SetupIconFile={#SetupIconFilePath} Compression=lzma SolidCompression=yes PrivilegesRequired=admin Uninstallable=yes UninstallDisplayName={#MyAppNameZh} UninstallDisplayIcon={uninstallexe},0 DefaultGroupName={#MyAppNameZh} Versioninfodescription={#MyAppName} 安装程序 versioninfocopyright=Copyright(c) 2022 VersionInfoProductName={#MyAppName} DisableReadyPage=yes DisableProgramGroupPage=yes DirExistsWarning=no DisableDirPage=yes [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce [Files] Source: {#ResourcesPath}; DestDir: {tmp}; Flags: dontcopy solidbreak ; Attribs: hidden system Source: {#SourceMain}; DestDir: "{app}"; Flags: ignoreversion Source: {#SourceFolder};Excludes: "{#MyExcludes}";DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs [Messages] SetupAppTitle={#MyAppName} 安装向导 SetupWindowTitle={#MyAppName} 安装向导 [Icons] Name: "{commondesktop}\{#MyAppNameZh}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{group}\{#MyAppNameZh}"; Filename: "{app}\{#MyAppExeName}" Name: "{group}\卸载{#MyAppNameZh}"; Filename: "{uninstallexe}" [Code] #include ".\include\code.iss"