1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Bundle MSVC++ redistributable with the installer

Installer checks for presence of msvcr100.dll library in the System32 folder (or
SysWOW64 in case of 64 bit systems). If not present, it will install it
(version 2010 SP1 x86).
This commit is contained in:
Roderik Ploszek 2018-03-24 15:56:14 +01:00
parent 7711a4b606
commit ed61804855
2 changed files with 23 additions and 0 deletions

View file

@ -42,6 +42,7 @@ test_script:
- 7z a -r pysol_win_dist.7z dist\
- SET PYTHONPATH=%cd%
- python3 scripts\create_iss.py
- appveyor DownloadFile https://www.microsoft.com/en-us/download/confirmation.aspx?id=8328 -FileName vcredist_x86.exe
- SET PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5"
- ISCC /Q setup.iss
artifacts:

View file

@ -55,4 +55,26 @@ for d in files_list[1:]:
d = d.replace('dist\\', '')
print('Source: "%s\\*"; DestDir: "{app}\\%s"' % (d, d), file=out)
print('Source: "..\\vcredist_x86.exe"; DestDir: {tmp}; \
Flags: deleteafterinstall', file=out)
print('[Run]\n\
Filename: {tmp}\\vcredist_x86.exe; \
Parameters: "/passive /promptrestart /showfinalerror"; \
StatusMsg: "Installing MS Visual C++ 2010 SP1 Redistributable Package (x86)"; \
Check: not isVCInstalled', file=out)
print('''
[Code]
function isVCInstalled: Boolean;
var
find: TFindRec;
begin
if FindFirst(ExpandConstant('{sys}\\msvcr100.dll'), find) then begin
Result := True;
FindClose(find);
end else begin
Result := False;
end;
end;
''', file=out)
out.close()