From 494b788340e486fe4ca5e5a95a397d335ab22dd8 Mon Sep 17 00:00:00 2001 From: Konstiantin Ullrich Date: Thu, 26 Jun 2025 13:13:46 +0200 Subject: [PATCH] feat: Add redist to windows installer --- pubspec_base.yaml | 10 ++++++++++ scripts/windows/.gitignore | 3 ++- scripts/windows/README.md | 21 +++++++++++++++++++++ scripts/windows/build_exe_installer.iss | 3 ++- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 scripts/windows/README.md diff --git a/pubspec_base.yaml b/pubspec_base.yaml index 9f7f17ae4..5ea3011a7 100644 --- a/pubspec_base.yaml +++ b/pubspec_base.yaml @@ -150,6 +150,7 @@ dev_dependencies: git: url: https://github.com/cake-tech/google-translator.git version: 1.0.0 + msix: ^3.16.9 dependency_overrides: bech32: @@ -221,3 +222,12 @@ flutter: - asset: assets/fonts/Lato-Medium.ttf - asset: assets/fonts/Lato-Semibold.ttf - asset: assets/fonts/Lato-Bold.ttf + +msix_config: + display_name: Cake Wallet + publisher_display_name: Cake Labs + identity_name: com.cakewallet.wallet + msix_version: 1.0.0.1 + logo_path: assets/images/app_logo.png + trim_logo: false + capabilities: internetClient diff --git a/scripts/windows/.gitignore b/scripts/windows/.gitignore index bb28076cd..83d395f3c 100644 --- a/scripts/windows/.gitignore +++ b/scripts/windows/.gitignore @@ -1 +1,2 @@ -actions-runner \ No newline at end of file +actions-runner +vc_redist.x64.exe diff --git a/scripts/windows/README.md b/scripts/windows/README.md new file mode 100644 index 000000000..d1decf74f --- /dev/null +++ b/scripts/windows/README.md @@ -0,0 +1,21 @@ +# Windows Build Instructions + +## Prerequisites + +Before building the Windows installer, make sure you have the following prerequisites: + +1. Inno Setup installed on your system +2. Microsoft Visual C++ Redistributable for Visual Studio 2022 (x64) installer + +## Downloading the VC++ Redistributable Installer + +The Windows installer requires the Microsoft Visual C++ Redistributable for Visual Studio 2022 (x64) installer. You need to download it from Microsoft's website and place it in the same directory as the Inno Setup script (`build_exe_installer.iss`). + +1. Download the VC++ Redistributable installer from: https://aka.ms/vs/17/release/vc_redist.x64.exe +2. Save the file as `vc_redist.x64.exe` in the `scripts\windows` directory + +## Building the Installer + +Once you have downloaded the VC++ Redistributable installer, you can build the Windows installer by running the Inno Setup script. + +The installer will include the VC++ Redistributable and install it during the Cake Wallet installation process. diff --git a/scripts/windows/build_exe_installer.iss b/scripts/windows/build_exe_installer.iss index 13375c22a..140c47485 100644 --- a/scripts/windows/build_exe_installer.iss +++ b/scripts/windows/build_exe_installer.iss @@ -33,6 +33,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Files] Source: "..\..\build\windows\x64\runner\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] @@ -40,5 +41,5 @@ Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] +Filename: "{tmp}\vc_redist.x64.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing VC++ Redistributable..."; Flags: waituntilterminated Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent -