Skip to content

Commit

Permalink
Include MSVC runtimes (#51)
Browse files Browse the repository at this point in the history
IB-6406

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored Jan 11, 2021
1 parent 984fed5 commit dac859c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 15 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: CI
on: [push, pull_request]
env:
MAKEFLAGS: -j3
BUILD_NUMBER: ${{ github.run_number }}
MACOSX_DEPLOYMENT_TARGET: '10.13'
jobs:
macos:
name: Build on macOS
runs-on: macos-latest
env:
MAKEFLAGS: -j3
MACOSX_DEPLOYMENT_TARGET: '10.13'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
submodules: recursive
- name: Build
run: |
mkdir build
Expand All @@ -27,32 +28,43 @@ jobs:
windows:
name: Build on Windows
runs-on: windows-latest
strategy:
matrix:
arch: [x86, x64]
include:
- arch: x86
qt: win32_msvc2017
- arch: x64
qt: win64_msvc2017_64
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
submodules: recursive
- name: Prepare vcpkg
uses: lukka/run-vcpkg@v6
uses: lukka/run-vcpkg@v6.1
id: runvcpkg
with:
vcpkgArguments: openssl:x64-windows
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgGitCommitId: 8e76503a769e153dad8f4e7b2c95a152bb35edaa
vcpkgTriplet: x64-windows
vcpkgArguments: openssl
vcpkgGitCommitId: ec6fe06e8da05a8157dc8581fa96b36b571c1bd5
vcpkgTriplet: ${{ matrix.arch }}-windows
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.12.10'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2017_64'
dir: '${{ github.workspace }}/'
arch: ${{ matrix.qt }}
- name: Setup dev env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
toolset: 14.16
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DQt5_DIR=${{ github.workspace }}/Qt/5.15.2/msvc2017_64/lib/cmake/Qt5 ..
dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.28.29325\x86\Microsoft.VC142.CRT\"
cmake "-GNMake Makefiles" `
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake ..
cmake --build . --target installer
- name: Archive artifacts
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Building
[![Build Status](https://github.com/open-eid/updater/workflows/CI/badge.svg?branch=master)](https://github.com/open-eid/updater/actions)

### OSX

1. Fetch the source
Expand Down
16 changes: 16 additions & 0 deletions idupdater.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
<?define OpenSSLSuffix = "" ?>
<?endif ?>

<?if $(env.VisualStudioVersion) = "16.0" ?>
<?define VCVER = "142" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)" ?>
<?elseif $(env.VisualStudioVersion) = "15.0" ?>
<?define VCVER = "141" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)" ?>
<?elseif $(env.VisualStudioVersion) = "14.0" ?>
<?define VCVER = "140" ?>
<?define VCPATH = "$(env.VCINSTALLDIR)\redist" ?>
<?endif?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="Open-EID Updater" UpgradeCode="d3aa8bd7-e1e6-46d0-97a6-c9b87d2b830b"
Id="*" Language="1033" Version="$(var.MSI_VERSION)" Codepage="1251" Manufacturer="RIA">
Expand Down Expand Up @@ -48,6 +59,11 @@
Name="Installed" Value="[APPLICATIONFOLDER]" Type="string"/>
<?endif ?>
<?ifdef var.qt_path ?>
<File Source="$(var.VCPATH)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT\msvcp140.dll"/>
<File Source="$(var.VCPATH)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT\vcruntime140.dll"/>
<!--?if $(env.VisualStudioVersion) = "16.0" ?>
<File Source="$(var.VCPATH)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT\vcruntime140_1.dll"/>
<?endif ?-->
<File Source="$(var.libs_path)\libcrypto-1_1$(var.OpenSSLSuffix).dll"/>
<File Source="$(var.libs_path)\libssl-1_1$(var.OpenSSLSuffix).dll"/>
<File Source="$(var.qt_path)\bin\Qt5Core.dll"/>
Expand Down

0 comments on commit dac859c

Please sign in to comment.