diff --git a/windows/packaging/exe/inno_setup.iss b/windows/packaging/exe/inno_setup.iss new file mode 100644 index 000000000..df7eefc6f --- /dev/null +++ b/windows/packaging/exe/inno_setup.iss @@ -0,0 +1,52 @@ +[Setup] +AppId={{APP_ID}} +AppVersion={{APP_VERSION}} +AppName={{DISPLAY_NAME}} +AppPublisher={{PUBLISHER_NAME}} +AppPublisherURL={{PUBLISHER_URL}} +AppSupportURL={{PUBLISHER_URL}} +AppUpdatesURL={{PUBLISHER_URL}} +DefaultDirName={{INSTALL_DIR_NAME}} +DisableProgramGroupPage=yes +OutputDir=. +OutputBaseFilename={{OUTPUT_BASE_FILENAME}} +Compression=lzma +SolidCompression=yes +SetupIconFile={{SETUP_ICON_FILE}} +WizardStyle=modern +PrivilegesRequired={{PRIVILEGES_REQUIRED}} +ArchitecturesAllowed=x64 +ArchitecturesInstallIn64BitMode=x64 + +[Code] +procedure KillOldProcess; +var ResultCode: Integer; +begin + Exec('taskkill', '/F /IM {{EXECUTABLE_NAME}}', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); +end; + +function InitializeSetup(): Boolean; +begin + KillOldProcess; + Result := True; +end; + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce +Name: "launchAtStartup"; Description: "{cm:AutoStartProgram,{{DISPLAY_NAME}}}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "{{SOURCE_DIR}}\\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{autoprograms}\\{{DISPLAY_NAME}}"; Filename: "{app}\\{{EXECUTABLE_NAME}}" +Name: "{autodesktop}\\{{DISPLAY_NAME}}"; Filename: "{app}\\{{EXECUTABLE_NAME}}"; Tasks: desktopicon +Name: "{userstartup}\\{{DISPLAY_NAME}}"; Filename: "{app}\\{{EXECUTABLE_NAME}}"; WorkingDir: "{app}"; Tasks: launchAtStartup + +[Run] +Filename: "{app}\\{{EXECUTABLE_NAME}}"; Description: "{cm:LaunchProgram,{{DISPLAY_NAME}}}"; Flags: runascurrentuser nowait postinstall skipifsilent diff --git a/windows/packaging/exe/make_config.yaml b/windows/packaging/exe/make_config.yaml index 6a4671a68..74ba3c0d8 100644 --- a/windows/packaging/exe/make_config.yaml +++ b/windows/packaging/exe/make_config.yaml @@ -1,8 +1,9 @@ +script_template: inno_setup.iss # AppId 的值唯一标识此应用。 # 不要在其他应用的安装程序中使用相同的 AppId 值。 app_id: 5ef970f9-2b9e-4155-b7d6-a9d4dbd6b226 -# publisher: LeanFlutter -# publisher_url: https://github.com/fastforgedev/fastforge +publisher: dom +publisher_url: https://github.com/bggRGjQaUbCoE/PiliPlus display_name: PiliPlus # create_desktop_icon: true # See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultdirname @@ -11,4 +12,5 @@ display_name: PiliPlus setup_icon_file: windows\runner\resources\app_icon.ico locales: - en - - zh \ No newline at end of file + - zh +privileges_required: admin