Skip to content

Commit

Permalink
Use statically linked UpdateElevate
Browse files Browse the repository at this point in the history
  • Loading branch information
psieg committed Feb 10, 2024
1 parent e3ea7a0 commit cd61ee6
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 34 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ jobs:
- name: Set build vars
shell: bash
run: |
echo "OPENSSL_DIR = \"C:\\Program Files\\OpenSSL\\bin\"" > build-vars.prf
echo "DEFINES += BASS_SOUND_SUPPORT" >> build-vars.prf
echo "BASS_DIR = \"C:\\bass\"" >> build-vars.prf
echo "BASSWASAPI_DIR = \"C:\\bass\\wasapi\"" >> build-vars.prf
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ Software/dmg/contents
build-vars.prf
debug/
release/
Software/dist_windows/content
Software/dist_windows/content/*
!Software/dist_windows/content/UpdateElevate.exe
Software/lib
Software/.vs
*.vcxproj
Expand Down
5 changes: 0 additions & 5 deletions Software/build-vars.prf.default
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
# General
#------------------------------------------------------------------------------
win32 {
# Set this to -Win32 for 32-bit
OPENSSL_DIR = "C:\\OpenSSL-Win64\\bin"
# Set this to run without openssl. The updatecheck won't work.
# DEFINES += NO_OPENSSL

# optional: BASS library directory, for sound visualization (http://www.un4seen.com/)
DEFINES += BASS_SOUND_SUPPORT
BASS_DIR = "C:\\bass"
Expand Down
Binary file added Software/dist_windows/content/UpdateElevate.exe
Binary file not shown.
5 changes: 1 addition & 4 deletions Software/dist_windows/script_qt6.iss
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ Source: "content/prismatik-unhook32.dll"; DestDir: "{app}"; MinVersion: 6.1.7600
Source: "content/UpdateElevate.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/platforms/*"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "content/styles/*"; DestDir: "{app}\styles"; Flags: ignoreversion
Source: "content/tls/qopensslbackend.dll"; DestDir: "{app}\tls"; Flags: ignoreversion
Source: "content/tls/qschannelbackend.dll"; DestDir: "{app}\tls"; Flags: ignoreversion
Source: "content/Plugins/*"; DestDir: "{#UserSettingsDirName}\Plugins"; Flags: onlyifdoesntexist createallsubdirs recursesubdirs
; Use ssleay32.dll and libeay32.dll here for OpenSSL < 1.1, 1_1 instead of 3 for OpenSSL 1.1
Source: "content/libcrypto-3-x64.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/libssl-3-x64.dll"; DestDir: "{app}"; Flags: ignoreversion
; These are needed only when including the bass library for sound visualization
Source: "content/bass.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "content/basswasapi.dll"; DestDir: "{app}"; Flags: ignoreversion
Expand Down
14 changes: 9 additions & 5 deletions Software/scripts/win32/prepare_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
set -e

# build UpdateElevate
echo "#define NAME L\"Prismatik\"" > UpdateElevate/UpdateElevate/command.h
echo "#define EXT L\".exe\"" >> UpdateElevate/UpdateElevate/command.h
echo "#define ARGS L\" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART\"" >> UpdateElevate/UpdateElevate/command.h
cmd //c scripts\\win32\\build_UpdateElevate.bat
cp UpdateElevate/x64/Release/UpdateElevate.exe dist_windows/content/
if [ -f dist_windows/content/UpdateElevate.exe ]; then
echo "Using existing (frozen) UpdateElevate";
else
echo "#define NAME L\"Prismatik\"" > UpdateElevate/UpdateElevate/command.h
echo "#define EXT L\".exe\"" >> UpdateElevate/UpdateElevate/command.h
echo "#define ARGS L\" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART\"" >> UpdateElevate/UpdateElevate/command.h
cmd //c scripts\\win32\\build_UpdateElevate.bat
cp UpdateElevate/x64/Release/UpdateElevate.exe dist_windows/content/
fi



Expand Down
17 changes: 0 additions & 17 deletions Software/src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,6 @@ win32 {
if $(PlatformToolsetVersion) LSS 140 copy /y \"$(VcInstallDir)redist\\$(PlatformTarget)\\Microsoft.VC$(PlatformToolsetVersion).CRT\\msvcr$(PlatformToolsetVersion).dll\" .\ $$escape_expand(\r\n)\
if $(PlatformToolsetVersion) EQU 140 copy /y \"$(VcInstallDir)redist\\$(PlatformTarget)\\Microsoft.VC$(PlatformToolsetVersion).CRT\\vcruntime$(PlatformToolsetVersion).dll\" .\ $$escape_expand(\r\n)\
if $(PlatformToolsetVersion) GTR 140 copy /y \"$(VcInstallDir)Redist\\MSVC\\$(VCToolsRedistVersion)\\$(PlatformTarget)\\Microsoft.VC$(PlatformToolsetVersion).CRT\\vcruntime*.dll\" .\ $$escape_expand(\r\n)
!contains(DEFINES, NO_OPENSSL) {
# QT switched to OpenSSL 1.1 in 5.12.4 and to 3.x in 6, which has different binary names
versionAtLeast(QT_VERSION, "6.0.0") {
QMAKE_POST_LINK += copy /y \"$${OPENSSL_DIR}\\libcrypto-3-x64.dll\" .\ $$escape_expand(\r\n)\
copy /y \"$${OPENSSL_DIR}\\libssl-3-x64.dll\" .\ $$escape_expand(\r\n)\
IF EXIST \"$${OPENSSL_DIR}\\msvcr*.dll\" copy /y \"$${OPENSSL_DIR}\\msvcr*.dll\" .\ $$escape_expand(\r\n)
} else:versionAtLeast(QT_VERSION, "5.12.4") {
QMAKE_POST_LINK += copy /y \"$${OPENSSL_DIR}\\libcrypto-1_1-x64.dll\" .\ $$escape_expand(\r\n)\
copy /y \"$${OPENSSL_DIR}\\libssl-1_1-x64.dll\" .\ $$escape_expand(\r\n)\
IF EXIST \"$${OPENSSL_DIR}\\msvcr*.dll\" copy /y \"$${OPENSSL_DIR}\\msvcr*.dll\" .\ $$escape_expand(\r\n)
} else {
QMAKE_POST_LINK += copy /y \"$${OPENSSL_DIR}\\ssleay32.dll\" .\ $$escape_expand(\r\n)\
copy /y \"$${OPENSSL_DIR}\\libeay32.dll\" .\ $$escape_expand(\r\n)\
IF EXIST \"$${OPENSSL_DIR}\\msvcr*.dll\" copy /y \"$${OPENSSL_DIR}\\msvcr*.dll\" .\ $$escape_expand(\r\n)
}
}

} else {
warning("unsupported setup - update src.pro to copy dependencies")
}
Expand Down

0 comments on commit cd61ee6

Please sign in to comment.