Include Visual C++ redistributable inside Windows Installer
This commit is contained in:
parent
a5347cfffe
commit
a56de80ef8
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -329,7 +329,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "espanso"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"backtrace 0.3.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "espanso"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
authors = ["Federico Terzi <federicoterzi96@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
description = "Cross-platform Text Expander written in Rust"
|
||||
|
|
|
@ -6,6 +6,7 @@ import hashlib
|
|||
import click
|
||||
import shutil
|
||||
import toml
|
||||
import urllib.request
|
||||
from dataclasses import dataclass
|
||||
|
||||
PACKAGER_TARGET_DIR = "target/packager"
|
||||
|
@ -75,6 +76,10 @@ def build_windows(package_info):
|
|||
TARGET_DIR = os.path.join(PACKAGER_TARGET_DIR, "win")
|
||||
os.makedirs(TARGET_DIR, exist_ok=True)
|
||||
|
||||
print("Downloading Visual C++ redistributable")
|
||||
vc_redist_file = os.path.join(TARGET_DIR, "vc_redist.x64.exe")
|
||||
urllib.request.urlretrieve("https://aka.ms/vs/16/release/vc_redist.x64.exe", vc_redist_file)
|
||||
|
||||
INSTALLER_NAME = f"espanso-win-installer"
|
||||
|
||||
# Inno setup
|
||||
|
|
|
@ -170,7 +170,7 @@ var
|
|||
begin
|
||||
taskname := ModPathName;
|
||||
if CurStep = ssPostInstall then
|
||||
if IsTaskSelected(taskname) then
|
||||
if WizardIsTaskSelected(taskname) then
|
||||
ModPath();
|
||||
end;
|
||||
|
||||
|
|
|
@ -37,11 +37,12 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|||
[Files]
|
||||
Source: "{{{executable_path}}}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{{{app_icon}}}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "vc_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\icon.ico"
|
||||
Name: "{userstartup}\espanso"; Filename: "{app}\espanso.exe"; Tasks:StartMenuEntry;
|
||||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "start"; IconFilename: "{app}\icon.ico"
|
||||
Name: "{userstartup}\espanso"; Filename: "{app}\espanso.exe"; Parameters: "start"; Tasks:StartMenuEntry;
|
||||
|
||||
[Tasks]
|
||||
Name: modifypath; Description: Add espanso to PATH ( recommended );
|
||||
|
@ -60,7 +61,10 @@ end;
|
|||
#include "modpath.iss"
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
Filename: {tmp}\vc_redist.x64.exe; \
|
||||
Parameters: "/install /quiet"; \
|
||||
StatusMsg: "Installing Visual C++ 2019 Redistributable";
|
||||
Filename: "{app}\{#MyAppExeName}"; Parameters: "start"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[UninstallRun]
|
||||
Filename: "{cmd}"; Parameters: "/C ""taskkill /im espanso.exe /f /t"
|
Loading…
Reference in New Issue
Block a user