Skip to content
Snippets Groups Projects
Commit 2feea02b authored by inso's avatar inso
Browse files

Squashed commit of the following:

commit 6401b3a4bea4418ef679ce638077fb3fae08c80a
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 12:44:37 2016 +0200

    Install and remove later vcredist

commit f60fc4d13b8f45ca5e1914645983fb76c83eeeff
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 12:32:42 2016 +0200

    Fix vcredist names

commit eebea91ab4cd7ea669fc01f1c73f634a398574c3
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 12:24:36 2016 +0200

    Fix name of vcredist*.exe

commit bd35a9d38b3d18cd2735870acf145db08c4f47a6
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 12:17:40 2016 +0200

    Force packaging of exe file

commit ef19494679c11d6cae75822b81d3b0e63e27b259
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 12:06:18 2016 +0200

    Fix call

commit 9f5ee0145c95cd5f03ec7573168b1b225ef3d8d3
Author: Insoleet <insomniak.fr@gmail.com>
Date:   Sat Jul 30 11:51:37 2016 +0200

    Fix download of vcredist

commit 4e6e11bc95cd90359deb2c723a8e555859c4c7ca
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 11:43:37 2016 +0200

    Fix vars

commit 77f0c9d34b1262e4dfa61c843f51c1fdf0345106
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 11:31:39 2016 +0200

    Fix call

commit 51d633e344d227bcd9c136b4f72b88b61fa75260
Author: inso <insomniak.fr@gmaiL.com>
Date:   Sat Jul 30 11:27:19 2016 +0200

    Download vcredist and package in innosetup
parent 269b83b0
No related branches found
No related tags found
No related merge requests found
...@@ -48,11 +48,13 @@ build_script: ...@@ -48,11 +48,13 @@ build_script:
- ".\\ci\\appveyor\\tests.cmd" - ".\\ci\\appveyor\\tests.cmd"
- echo %errorlevel% - echo %errorlevel%
- powershell .\\ci\\appveyor\\download_vcredist.ps1 -target %cd%\\ci\\appveyor
# Windows Installer # Windows Installer
- if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y InnoSetup - choco install -y InnoSetup
- if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH% - set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
- if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd% - iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
- if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe - move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
artifacts: artifacts:
- path: dist - path: dist
......
Param([String]$target)
Write-Host "Downloading vcredist to $target"
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/A/4/D/A4D9F1D3-6449-49EB-9A6E-902F61D8D14B/vcredist_x86.exe', "$target\vcredist_x86.exe")
(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/A/4/D/A4D9F1D3-6449-49EB-9A6E-902F61D8D14B/vcredist_x64.exe', "$target\vcredist_x64.exe")
...@@ -47,6 +47,8 @@ Source: "{#MyAppSrc}\sakia.ico"; DestDir: "{app}\"; Flags: ignoreversion recurse ...@@ -47,6 +47,8 @@ Source: "{#MyAppSrc}\sakia.ico"; DestDir: "{app}\"; Flags: ignoreversion recurse
Source: "{#MyAppSrc}\sakia.png"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs Source: "{#MyAppSrc}\sakia.png"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
Source: "{#MyAppSrc}\LICENSE"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs Source: "{#MyAppSrc}\LICENSE"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
Source: "{#MyAppSrc}\ci\appveyor\after_install.cmd"; DestDir: "{app}\"; Flags: ignoreversion Source: "{#MyAppSrc}\ci\appveyor\after_install.cmd"; DestDir: "{app}\"; Flags: ignoreversion
Source: "{#MyAppSrc}\ci\appveyor\vcredist_x86.exe"; DestDir: "{tmp}\"; Flags: ignoreversion deleteafterinstall
Source: "{#MyAppSrc}\ci\appveyor\vcredist_x64.exe"; DestDir: "{tmp}\"; Flags: ignoreversion deleteafterinstall
[Icons] [Icons]
Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}" Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"
...@@ -54,9 +56,49 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" ...@@ -54,9 +56,49 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run] [Run]
#define VCmsg "Installing Microsoft Visual C++ Redistributable...."
[Run]
Filename: "{tmp}\vcredist_x86.exe"; StatusMsg: "{#VCmsg}"; Check: not IsWin64 and not VCinstalled
Filename: "{tmp}\vcredist_x64.exe"; StatusMsg: "{#VCmsg}"; Check: IsWin64 and not VCinstalled
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "{app}\after_install.cmd"; Description: "Delete ALL existing data"; Flags: postinstall nowait skipifsilent unchecked Filename: "{app}\after_install.cmd"; Description: "Delete ALL existing data"; Flags: postinstall nowait skipifsilent unchecked
[Code]
function VCinstalled: Boolean;
// By Michael Weiner <mailto:spam@cogit.net>
// Function for Inno Setup Compiler
// 13 November 2015
// Returns True if Microsoft Visual C++ Redistributable is installed, otherwise False.
// The programmer may set the year of redistributable to find; see below.
var
names: TArrayOfString;
i: Integer;
dName, key, year: String;
begin
// Year of redistributable to find; leave null to find installation for any year.
year := '';
Result := False;
key := 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
// Get an array of all of the uninstall subkey names.
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, key, names) then
// Uninstall subkey names were found.
begin
i := 0
while ((i < GetArrayLength(names)) and (Result = False)) do
// The loop will end as soon as one instance of a Visual C++ redistributable is found.
begin
// For each uninstall subkey, look for a DisplayName value.
// If not found, then the subkey name will be used instead.
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, key + '\' + names[i], 'DisplayName', dName) then
dName := names[i];
// See if the value contains both of the strings below.
Result := (Pos(Trim('Visual C++ ' + year),dName) * Pos('Redistributable',dName) <> 0)
i := i + 1;
end;
end;
end;
[Setup] [Setup]
; NOTE: The value of AppId uniquely identifies this application. ; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications. ; Do not use the same AppId value in installers for other applications.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment