Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build instructions #284

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ elseif($ENV{CI_PIPELINE_IID})
else()
set(BUILD_NUMBER 0)
endif()
project(web-eid VERSION 2.4.0.${BUILD_NUMBER})
project(web-eid VERSION 2.5.0.${BUILD_NUMBER})

set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION_TWEAK})
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ Use _Powershell_ to run the following commands to build the project.

- Run _CMake_:

Optionally, WIX Toolset v3 is required for the installer, and the WIX environment variable should be set for the installed target.

cmake "-DCMAKE_PREFIX_PATH=${QT_ROOT}" `
"-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" -A x64 -B build -S .
Expand Down
33 changes: 10 additions & 23 deletions install/web-eid.wxs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>

<?ifndef Platform ?>
<?define Platform="x64" ?>
<?endif ?>

<?ifndef qt_suffix ?>
<?define qt_suffix="" ?>
<?endif ?>
Expand All @@ -16,7 +12,7 @@
<?define VCVER = "141" ?>
<?endif?>

<?if $(var.Platform) = x64 ?>
<?if $(sys.BUILDARCH) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define ssl_suffix = "-x64" ?>
<?else ?>
Expand All @@ -25,15 +21,15 @@
<?endif ?>

<?if $(var.qt_suffix) = "d" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\Debug_NonRedist\$(var.Platform)\Microsoft.VC$(var.VCVER).DebugCRT" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\Debug_NonRedist\$(sys.BUILDARCH)\Microsoft.VC$(var.VCVER).DebugCRT" ?>
<?else ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\$(var.Platform)\Microsoft.VC$(var.VCVER).CRT" ?>
<?define VCPATH = "$(env.VCTOOLSREDISTDIR)\$(sys.BUILDARCH)\Microsoft.VC$(var.VCVER).CRT" ?>
<?endif ?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="Web eID software" UpgradeCode="4f0e0fef-0dbc-481b-9d81-08921740f781"
Id="*" Language="1033" Version="$(var.MSI_VERSION)" Codepage="1251" Manufacturer="RIA">
<Package Platform="$(var.Platform)" Keywords="Installer" InstallerVersion="405" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated"/>
<Package Keywords="Installer" InstallerVersion="405" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated"/>
<MediaTemplate EmbedCab="yes" CompressionLevel="high"/>
<Icon Id="web_eid.exe" SourceFile="$(var.app_path)"/>
<Property Id="ARPPRODUCTICON" Value="web_eid.exe"/>
Expand Down Expand Up @@ -85,26 +81,21 @@
<?ifdef var.qt_path ?>
<File Source="$(var.VCPATH)\msvcp140$(var.qt_suffix).dll"/>
<File Source="$(var.VCPATH)\vcruntime140$(var.qt_suffix).dll"/>
<?if $(var.Platform) = x64 AND $(env.VisualStudioVersion) = "16.0" ?>
<?if $(sys.BUILDARCH) = x64 AND $(env.VisualStudioVersion) != "15.0" ?>
<File Source="$(var.VCPATH)\vcruntime140_1$(var.qt_suffix).dll"/>
<File Source="$(var.VCPATH)\msvcp140_1$(var.qt_suffix).dll"/>
<File Source="$(var.VCPATH)\msvcp140_2$(var.qt_suffix).dll"/>
<?endif?>
<File Source="$(var.ssl_path)\libcrypto-3$(var.ssl_suffix).dll"/>
<File Source="$(var.ssl_path)\libssl-3$(var.ssl_suffix).dll"/>
<File Source="$(var.qt_path)\Qt$(var.qt_version_major)Core$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt$(var.qt_version_major)Gui$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt$(var.qt_version_major)Network$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt$(var.qt_version_major)Svg$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt$(var.qt_version_major)Widgets$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt6Core$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt6Gui$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt6Network$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt6Svg$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\Qt6Widgets$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\D3DCompiler_47.dll"/>
<File Source="$(var.qt_path)\opengl32sw.dll" />
<?if $(var.qt_version_major) = "5" ?>
<File Source="$(var.qt_path)\libEGL$(var.qt_suffix).dll"/>
<File Source="$(var.qt_path)\libGLESv2$(var.qt_suffix).dll"/>
<?else ?>
<File Source="$(var.qt_path)\Qt6SvgWidgets$(var.qt_suffix).dll"/>
<?endif?>
<?endif?>
</Component>
<Component Id="ChromeEdge" Transitive="yes">
Expand Down Expand Up @@ -135,13 +126,11 @@
<File Name="qsvg$(var.qt_suffix).dll"/>
</Component>
</Directory>
<?if $(var.qt_version_major) = "6" ?>
<Directory Id="tls" Name="tls" FileSource="$(var.qt_path)\..\plugins\tls">
<Component Id="qopensslbackend.dll">
<File Name="qopensslbackend$(var.qt_suffix).dll"/>
</Component>
</Directory>
<?endif?>
<?endif?>
</Directory>
</Directory>
Expand Down Expand Up @@ -191,9 +180,7 @@
<ComponentRef Id="qwindows.dll" />
<ComponentRef Id="qwindowsvistastyle.dll" />
<ComponentRef Id="imageformats.dll" />
<?if $(var.qt_version_major) = "6" ?>
<ComponentRef Id="qopensslbackend.dll" />
<?endif?>
<?endif?>
</Feature>
</Product>
Expand Down
3 changes: 1 addition & 2 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ if(WIN32)
set(BASE_FILE $<TARGET_NAME:web-eid>_${PROJECT_VERSION}.${PLATFORM})
list(APPEND CANDLE_CMD "$ENV{WIX}bin\\candle.exe" -nologo -arch ${PLATFORM}
-dMSI_VERSION=${PROJECT_VERSION}
-dPlatform=${PLATFORM}
-dssl_path="${SSL_PATH}"
-dqt_suffix="$<$<CONFIG:Debug>:d>"
-djson=${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json
Expand All @@ -49,7 +48,7 @@ if(WIN32)
COMMAND ${CANDLE_CMD}
COMMAND ${LIGHT_CMD} -o "${BASE_FILE}.msi"
#Build MSI with QT
COMMAND ${CANDLE_CMD} -dqt_path=${qtCore_install_prefix} -dqt_version_major=${QT_VERSION_MAJOR}
COMMAND ${CANDLE_CMD} -dqt_path=${qtCore_install_prefix}
COMMAND ${LIGHT_CMD} -o "${BASE_FILE}.qt.msi"
WORKING_DIRECTORY $<TARGET_FILE_DIR:web-eid>
)
Expand Down