mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2025-02-01 20:10:42 +00:00
Link the updater with the static VC++ runtime on Windows
This allows the updater to work on older Windows XP systems without the VC++ 2008 runtime redistributable installed. * Add statically linked pre-built versions of the zlib and bzip2 libraries. This increases the size of the updater executable by 200KB to ~400KB on Windows.
This commit is contained in:
parent
8bb121daf0
commit
59f8cd753f
5 changed files with 7 additions and 2 deletions
|
@ -17,6 +17,11 @@ if (WIN32)
|
||||||
include_directories(external/zlib/)
|
include_directories(external/zlib/)
|
||||||
include_directories(external/bzip2)
|
include_directories(external/bzip2)
|
||||||
include_directories(external/win32cpp/include)
|
include_directories(external/win32cpp/include)
|
||||||
|
|
||||||
|
# Link the updater binary statically with the Visual C++ runtime
|
||||||
|
# so that the executable can function standalone
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
BIN
external/bzip2/libbz2_static.lib
vendored
Normal file
BIN
external/bzip2/libbz2_static.lib
vendored
Normal file
Binary file not shown.
4
external/minizip/CMakeLists.txt
vendored
4
external/minizip/CMakeLists.txt
vendored
|
@ -36,8 +36,8 @@ if (UNIX)
|
||||||
target_link_libraries(minizip z bz2)
|
target_link_libraries(minizip z bz2)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(minizip
|
target_link_libraries(minizip
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/../zlib/prebuilt/zlib.lib"
|
"${CMAKE_CURRENT_SOURCE_DIR}/../zlib/prebuilt/zlib_static.lib"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/../bzip2/libbz2.lib"
|
"${CMAKE_CURRENT_SOURCE_DIR}/../bzip2/libbz2_static.lib"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
BIN
external/zlib/prebuilt/zlib_static.lib
vendored
Normal file
BIN
external/zlib/prebuilt/zlib_static.lib
vendored
Normal file
Binary file not shown.
BIN
external/zlib/prebuilt/zlib_static.pdb
vendored
Normal file
BIN
external/zlib/prebuilt/zlib_static.pdb
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue