70 lines
3.0 KiB
Plaintext
70 lines
3.0 KiB
Plaintext
; --------------------------------------------------------
|
|
; V免签PC监听程序 - Inno Setup 完整脚本
|
|
; 编译环境:.NET 10.0 Windows
|
|
; 打包模式:生成解决方案 (Release)
|
|
; --------------------------------------------------------
|
|
|
|
#define MyAppName "V免签PC监听程序"
|
|
#define MyAppVersion "0.0.1"
|
|
#define MyAppPublisher "扫地僧"
|
|
#define MyAppURL "https://www.yunzer.cn/"
|
|
#define MyAppExeName "Vmianqian.exe"
|
|
#define MyAppAssocName MyAppName + "文件"
|
|
#define MyAppAssocExt ".exe"
|
|
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
|
|
|
|
[Setup]
|
|
; AppId 保持不变,确保版本覆盖正常
|
|
AppId={{D8540A89-49BC-4843-9CE7-A96496DFB2DB}
|
|
AppName={#MyAppName}
|
|
AppVersion={#MyAppVersion}
|
|
AppPublisher={#MyAppPublisher}
|
|
AppPublisherURL={#MyAppURL}
|
|
AppSupportURL={#MyAppURL}
|
|
AppUpdatesURL={#MyAppURL}
|
|
|
|
; 默认安装路径
|
|
DefaultDirName={autopf}\{#MyAppName}
|
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
|
|
|
; --- 核心设置:监听程序必须以管理员权限运行 ---
|
|
PrivilegesRequired=admin
|
|
|
|
; 架构支持
|
|
ArchitecturesAllowed=x64compatible
|
|
ArchitecturesInstallIn64BitMode=x64compatible
|
|
ChangesAssociations=yes
|
|
DisableProgramGroupPage=yes
|
|
|
|
; 输出设置
|
|
OutputBaseFilename=V免签监听程序_安装包
|
|
; 请确保此 .ico 文件路径正确
|
|
SetupIconFile=E:\Demo\C\Vmianqian\logo.ico
|
|
SolidCompression=yes
|
|
WizardStyle=modern dynamic
|
|
|
|
[Languages]
|
|
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
|
|
|
|
[Tasks]
|
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
|
|
|
[Files]
|
|
; --- 核心修正:直接指向 Release 生成目录,并打包目录下所有文件 ---
|
|
; recursesubdirs 确保打包子目录(如 runtimes 目录,这对 .NET 程序至关重要)
|
|
Source: "E:\Demo\C\Vmianqian\bin\Release\net10.0-windows\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
|
|
[Registry]
|
|
; 注册表关联
|
|
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
|
|
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
|
|
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
|
|
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
|
|
|
|
[Icons]
|
|
; 显式指定图标文件为主程序本身,解决快捷方式图标空白问题
|
|
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\{#MyAppExeName}"
|
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\{#MyAppExeName}"
|
|
|
|
[Run]
|
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent |