Skip to content

Commit

Permalink
Merge pull request #27 from OpenNingia/refactor/vs2019
Browse files Browse the repository at this point in the history
Visual Studio 2019
  • Loading branch information
OpenNingia authored Jan 27, 2021
2 parents 7180275 + e7c6e89 commit bb0a6b2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 110 deletions.
31 changes: 20 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
version: 2.10.{build}

image:
- Visual Studio 2015
- Visual Studio 2019

init:
# Gather some basic build environment details.
- rem set
- dir "%ProgramFiles(x86)%\Microsoft Visual Studio *" /b /o
- dir "%ProgramFiles%\Microsoft SDKs\Windows" /b /o
- dir "%SystemDrive%\Qt\5.*" /b /o

environment:
VSVER: 14.0 # Visual Studio 2015
BOOST_DIR: C:\Libraries\boost_1_67_0
VCDIR: \Microsoft Visual Studio\2019\Community\VC
BOOST_DIR: C:\Libraries\boost_1_73_0
matrix:
- QTDIR: C:\Qt\5.11.2\msvc2015
- QTDIR: C:\Qt\5.11.2\msvc2015_64
- QTDIR: C:\Qt\5.15.2\msvc2019
- QTDIR: C:\Qt\5.15.2\msvc2019_64

configuration: release

Expand All @@ -27,7 +24,7 @@ install:
- set ISSO=SETUP.iss
- if %QTDIR:_64=%==%QTDIR% set ARCH=x86
- if %QTDIR:msvc=%==%QTDIR% %make% --version
- if not %QTDIR:msvc=%==%QTDIR% call "%ProgramFiles(x86)%\Microsoft Visual Studio %VSVER%\VC\vcvarsall.bat" %ARCH%
- if not %QTDIR:msvc=%==%QTDIR% call "%ProgramFiles(x86)%%VCDIR%\Auxiliary\Build\vcvarsall.bat" %ARCH%
- if not %QTDIR:msvc=%==%QTDIR% set make=nmake.exe
- if not %QTDIR:msvc=%==%QTDIR% %make% /? > nul
- if %ARCH%==x64 set ISSO=SETUP_x64.iss
Expand All @@ -45,8 +42,6 @@ after_build:
- cd %APPVEYOR_BUILD_FOLDER%\launchy\win
- buildTranslations.bat
- xcopy /E /F /I /Y %APPVEYOR_BUILD_FOLDER%-build\%CONFIGURATION% %APPVEYOR_BUILD_FOLDER%\launchy\%CONFIGURATION%
- echo copy "%ProgramFiles(x86)%\Microsoft Visual Studio %VSVER%\VC\redist\1033\vcredist_%ARCH%*" %APPVEYOR_BUILD_FOLDER%\launchy\%CONFIGURATION%
- copy "%ProgramFiles(x86)%\Microsoft Visual Studio %VSVER%\VC\redist\1033\vcredist_%ARCH%*" %APPVEYOR_BUILD_FOLDER%\launchy\%CONFIGURATION%
- cd %APPVEYOR_BUILD_FOLDER%\launchy\%CONFIGURATION%
- windeployqt .
- cd %APPVEYOR_BUILD_FOLDER%\launchy\win\installer
Expand All @@ -62,5 +57,19 @@ artifacts:
build_script:
- '%make%'

deploy:
release: launchy-v$(appveyor_build_version)
description: 'Launchy'
provider: GitHub
auth_token:
secure: ovJS5y2wip9xPRPeETEpmphe+QX6PVHUnvYqy73OPGUTt+yEV5WdfRCFZDxWTBn/
artifact: /.*Launchy_Setup*\.exe/
draft: true
prerelease: true
on:
branch: master # release from master branch only
APPVEYOR_REPO_TAG: true # deploy on tag push only


# fetch repository as zip archive
shallow_clone: true
54 changes: 4 additions & 50 deletions launchy/win/installer/SETUP.iss
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ Source: "{#PWD}\release\imageformats\*.dll"; DestDir: "{app}\imageformats"; Flag
Source: "{#PWD}\release\platforms\*.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "{#PWD}\release\translations\*.qm"; DestDir: "{app}\tr"; Flags: ignoreversion

; redist
Source: {#PWD}\release\vcredist*.exe; DestDir: {tmp}; Flags: deleteafterinstall

; Translations
Source: {#PWD}\translations\launchy_es.qm; DestDir: {app}\tr\; Flags: ignoreversion
Source: {#PWD}\translations\launchy_de.qm; DestDir: {app}\tr\; Flags: ignoreversion
Expand All @@ -94,8 +91,9 @@ Source: {#PWD}\skins\Mercury\*.*; DestDir: {app}\skins\Mercury\; Flags: ignoreve
Source: {#PWD}\skins\Quicksilver2\*.*; DestDir: {app}\skins\Quicksilver2\; Flags: ignoreversion
Source: {#PWD}\skins\Note\*.*; DestDir: {app}\skins\Note\; Flags: ignoreversion
Source: {#PWD}\skins\Black_Glass\*.*; DestDir: {app}\skins\Black Glass\; Flags: ignoreversion
Source: {#PWD}\skins\Default\*.*; DestDir: {app}\skins\Default\; Flags: ignoreversion
Source: {#PWD}\skins\Spotlight_Wide\*.*; DestDir: {app}\skins\Spotlight Wide\; Flags: ignoreversion
Source: {#PWD}\skins\Flat Modern Dark\*.*; DestDir: {app}\skins\Flat Modern Dark\; Flags: ignoreversion
Source: {#PWD}\skins\Flat Modern Light\*.*; DestDir: {app}\skins\Flat Modern Light\; Flags: ignoreversion

Source: ..\Utilities\Special Folders\C Drive.lnk; DestDir: {app}\Utilities\Special Folders\; Flags: ignoreversion
Source: ..\Utilities\Special Folders\Control Panel.lnk; DestDir: {app}\Utilities\Special Folders\; Flags: ignoreversion
Expand Down Expand Up @@ -124,7 +122,8 @@ Name: {userdesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Parameters: /
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Parameters: /show; Filename: {app}\{#MyAppExeName}; WorkingDir: {app}; Tasks: quicklaunchicon

[Run]
Filename: {tmp}\vcredist_x86.exe; Parameters: "/q /passive /norestart /Q:a /c:""msiexec /q /i vcredist.msi"" "; StatusMsg: Installing VC++ Redistributables...
; Flat Modern Dark is the new Default skin
Filename: "{cmd}"; Parameters: "/C mklink /D ""{app}\skins\Default\"" ""{app}\skins\Flat Modern Dark\"""
Filename: {app}\{#MyAppExeName}; Parameters: /show; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent runasoriginaluser

[UninstallDelete]
Expand Down Expand Up @@ -215,55 +214,10 @@ const
INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
VC_2005_REDIST_X86 = '{A49F249F-0C91-497F-86DF-B2585E8E76B7}';
VC_2005_REDIST_X64 = '{6E8E85E8-CE4B-4FF5-91F7-04999C9FAE6A}';
VC_2005_REDIST_IA64 = '{03ED71EA-F531-4927-AABD-1C31BCE8E187}';
VC_2005_SP1_REDIST_X86 = '{7299052B-02A4-4627-81F2-1818DA5D550D}';
VC_2005_SP1_REDIST_X64 = '{071C9B48-7C32-4621-A0AC-3F809523288F}';
VC_2005_SP1_REDIST_IA64 = '{0F8FB34E-675E-42ED-850B-29D98C2ECE08}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_X86 = '{837B34E3-7C30-493C-8F6A-2B0F04E2912C}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_X64 = '{6CE5BAE9-D3CA-4B99-891A-1DC6C118A5FC}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_IA64 = '{85025851-A784-46D8-950D-05CB3CA43A13}';
VC_2008_REDIST_X86 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}';
VC_2008_REDIST_X64 = '{350AA351-21FA-3270-8B7A-835434E766AD}';
VC_2008_REDIST_IA64 = '{2B547B43-DB50-3139-9EBE-37D419E0F5FA}';
VC_2008_SP1_REDIST_X86 = '{9A25302D-30C0-39D9-BD6F-21E6EC160475}';
VC_2008_SP1_REDIST_X64 = '{8220EEFE-38CD-377E-8595-13398D740ACE}';
VC_2008_SP1_REDIST_IA64 = '{5827ECE1-AEB0-328E-B813-6FC68622C1F9}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_X86 = '{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_X64 = '{4B6C7001-C7D6-3710-913E-5BC23FCE91E6}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_IA64 = '{977AD349-C2A8-39DD-9273-285C08987C7B}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_X86 = '{9BE518E6-ECC6-35A9-88E4-87755C07200F}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_X64 = '{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_IA64 = '{515643D1-4E9E-342F-A75A-D1F16448DC04}';
VC_2010_REDIST_X86 = '{196BB40D-1578-3D01-B289-BEFC77A11A1E}';
VC_2010_REDIST_X64 = '{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}';
VC_2010_REDIST_IA64 = '{C1A35166-4301-38E9-BA67-02823AD72A1B}';
VC_2010_SP1_REDIST_X86 = '{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}';
VC_2010_SP1_REDIST_X64 = '{1D8E6291-B0D5-35EC-8441-6616F567A0F7}';
VC_2010_SP1_REDIST_IA64 = '{88C73C1C-2DE5-3B01-AFB8-B46EF4AB41CD}';
VC_2013_REDIST_X86 = '{ce085a78-074e-4823-8dc1-8a721b94b76d}';
VC_2013_REDIST_X64 = '{7f51bdb9-ee21-49ee-94d6-90afc321780e}';
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
function VCVersionInstalled(const ProductID: string): Boolean;
begin
Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
end;
function VCRedistNeedsInstall: Boolean;
begin
// here the Result must be True when you need to install your VCRedist
// or False when you don't need to, so now it's upon you how you build
// this statement, the following won't install your VC redist only when
// the Visual C++ 2010 Redist (x86) and Visual C++ 2010 SP1 Redist(x86)
// are installed for the current user
// Result := not (VCVersionInstalled(VC_2010_REDIST_X86) and
// VCVersionInstalled(VC_2010_SP1_REDIST_X86));
Result := not VCVersionInstalled(VC_2010_SP1_REDIST_X86)
end;
53 changes: 4 additions & 49 deletions launchy/win/installer/SETUP_x64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ Source: "{#PWD}\release\imageformats\*.dll"; DestDir: "{app}\imageformats"; Flag
Source: "{#PWD}\release\platforms\*.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "{#PWD}\release\translations\*.qm"; DestDir: "{app}\tr"; Flags: ignoreversion

; redist
Source: {#PWD}\release\vcredist*.exe; DestDir: {tmp}; Flags: deleteafterinstall

; Translations
Source: {#PWD}\translations\launchy_es.qm; DestDir: {app}\tr\; Flags: ignoreversion
Source: {#PWD}\translations\launchy_de.qm; DestDir: {app}\tr\; Flags: ignoreversion
Expand All @@ -94,8 +91,9 @@ Source: {#PWD}\skins\Mercury\*.*; DestDir: {app}\skins\Mercury\; Flags: ignoreve
Source: {#PWD}\skins\Quicksilver2\*.*; DestDir: {app}\skins\Quicksilver2\; Flags: ignoreversion
Source: {#PWD}\skins\Note\*.*; DestDir: {app}\skins\Note\; Flags: ignoreversion
Source: {#PWD}\skins\Black_Glass\*.*; DestDir: {app}\skins\Black Glass\; Flags: ignoreversion
Source: {#PWD}\skins\Default\*.*; DestDir: {app}\skins\Default\; Flags: ignoreversion
Source: {#PWD}\skins\Spotlight_Wide\*.*; DestDir: {app}\skins\Spotlight Wide\; Flags: ignoreversion
Source: {#PWD}\skins\Flat Modern Dark\*.*; DestDir: {app}\skins\Flat Modern Dark\; Flags: ignoreversion
Source: {#PWD}\skins\Flat Modern Light\*.*; DestDir: {app}\skins\Flat Modern Light\; Flags: ignoreversion

Source: ..\Utilities\Special Folders\C Drive.lnk; DestDir: {app}\Utilities\Special Folders\; Flags: ignoreversion
Source: ..\Utilities\Special Folders\Control Panel.lnk; DestDir: {app}\Utilities\Special Folders\; Flags: ignoreversion
Expand Down Expand Up @@ -124,7 +122,8 @@ Name: {userdesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Parameters: /
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}; Parameters: /show; Filename: {app}\{#MyAppExeName}; WorkingDir: {app}; Tasks: quicklaunchicon

[Run]
Filename: {tmp}\vcredist_x64.exe; Parameters: "/q /passive /norestart /Q:a /c:""msiexec /q /i vcredist.msi"" "; StatusMsg: Installing VC++ Redistributables...
; Flat Modern Dark is the new Default skin
Filename: "{cmd}"; Parameters: "/C mklink /D ""{app}\skins\Default\"" ""{app}\skins\Flat Modern Dark\"""
Filename: {app}\{#MyAppExeName}; Parameters: /show; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent runasoriginaluser

[UninstallDelete]
Expand Down Expand Up @@ -215,39 +214,6 @@ const
INSTALLSTATE_ABSENT = 2; // The product is installed for a different user.
INSTALLSTATE_DEFAULT = 5; // The product is installed for the current user.
VC_2005_REDIST_X86 = '{A49F249F-0C91-497F-86DF-B2585E8E76B7}';
VC_2005_REDIST_X64 = '{6E8E85E8-CE4B-4FF5-91F7-04999C9FAE6A}';
VC_2005_REDIST_IA64 = '{03ED71EA-F531-4927-AABD-1C31BCE8E187}';
VC_2005_SP1_REDIST_X86 = '{7299052B-02A4-4627-81F2-1818DA5D550D}';
VC_2005_SP1_REDIST_X64 = '{071C9B48-7C32-4621-A0AC-3F809523288F}';
VC_2005_SP1_REDIST_IA64 = '{0F8FB34E-675E-42ED-850B-29D98C2ECE08}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_X86 = '{837B34E3-7C30-493C-8F6A-2B0F04E2912C}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_X64 = '{6CE5BAE9-D3CA-4B99-891A-1DC6C118A5FC}';
VC_2005_SP1_ATL_SEC_UPD_REDIST_IA64 = '{85025851-A784-46D8-950D-05CB3CA43A13}';
VC_2008_REDIST_X86 = '{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}';
VC_2008_REDIST_X64 = '{350AA351-21FA-3270-8B7A-835434E766AD}';
VC_2008_REDIST_IA64 = '{2B547B43-DB50-3139-9EBE-37D419E0F5FA}';
VC_2008_SP1_REDIST_X86 = '{9A25302D-30C0-39D9-BD6F-21E6EC160475}';
VC_2008_SP1_REDIST_X64 = '{8220EEFE-38CD-377E-8595-13398D740ACE}';
VC_2008_SP1_REDIST_IA64 = '{5827ECE1-AEB0-328E-B813-6FC68622C1F9}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_X86 = '{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_X64 = '{4B6C7001-C7D6-3710-913E-5BC23FCE91E6}';
VC_2008_SP1_ATL_SEC_UPD_REDIST_IA64 = '{977AD349-C2A8-39DD-9273-285C08987C7B}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_X86 = '{9BE518E6-ECC6-35A9-88E4-87755C07200F}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_X64 = '{5FCE6D76-F5DC-37AB-B2B8-22AB8CEDB1D4}';
VC_2008_SP1_MFC_SEC_UPD_REDIST_IA64 = '{515643D1-4E9E-342F-A75A-D1F16448DC04}';
VC_2010_REDIST_X86 = '{196BB40D-1578-3D01-B289-BEFC77A11A1E}';
VC_2010_REDIST_X64 = '{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}';
VC_2010_REDIST_IA64 = '{C1A35166-4301-38E9-BA67-02823AD72A1B}';
VC_2010_SP1_REDIST_X86 = '{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}';
VC_2010_SP1_REDIST_X64 = '{1D8E6291-B0D5-35EC-8441-6616F567A0F7}';
VC_2010_SP1_REDIST_IA64 = '{88C73C1C-2DE5-3B01-AFB8-B46EF4AB41CD}';
VC_2013_REDIST_X86 = '{ce085a78-074e-4823-8dc1-8a721b94b76d}';
VC_2013_REDIST_X64 = '{7f51bdb9-ee21-49ee-94d6-90afc321780e}';
function MsiQueryProductState(szProduct: string): INSTALLSTATE;
external 'MsiQueryProductState{#AW}@msi.dll stdcall';
Expand All @@ -256,14 +222,3 @@ begin
Result := MsiQueryProductState(ProductID) = INSTALLSTATE_DEFAULT;
end;
function VCRedistNeedsInstall: Boolean;
begin
// here the Result must be True when you need to install your VCRedist
// or False when you don't need to, so now it's upon you how you build
// this statement, the following won't install your VC redist only when
// the Visual C++ 2010 Redist (x86) and Visual C++ 2010 SP1 Redist(x86)
// are installed for the current user
// Result := not (VCVersionInstalled(VC_2010_REDIST_X86) and
// VCVersionInstalled(VC_2010_SP1_REDIST_X86));
Result := not VCVersionInstalled(VC_2010_SP1_REDIST_X86)
end;

0 comments on commit bb0a6b2

Please sign in to comment.