1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-05 15:05:40 +02:00

Merge pull request #3320 from IvanSavenko/windows_legacy

Fix Windows 7 support
This commit is contained in:
Ivan Savenko 2023-12-17 22:06:29 +02:00 committed by GitHub
commit ebc4aec02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 3 deletions

View File

@ -116,7 +116,7 @@ jobs:
pack_type: RelWithDebInfo
extension: exe
preset: windows-msvc-release-ccache
- platform: mingw-ubuntu
- platform: mingw
os: ubuntu-22.04
test: 0
pack: 1
@ -126,6 +126,16 @@ jobs:
cmake_args: -G Ninja
preset: windows-mingw-conan-linux
conan_profile: mingw64-linux.jinja
- platform: mingw-32
os: ubuntu-22.04
test: 0
pack: 1
pack_type: Release
extension: exe
cpack_args: -D CPACK_NSIS_EXECUTABLE=`which makensis`
cmake_args: -G Ninja
preset: windows-mingw-conan-linux
conan_profile: mingw32-linux.jinja
- platform: android-32
os: ubuntu-22.04
extension: apk

View File

@ -17,4 +17,5 @@ RC={{ target_host }}-windres
{% macro generate_conf(target_host) -%}
tools.build:compiler_executables = {"c": "{{ target_host }}-gcc", "cpp": "{{ target_host }}-g++"}
tools.build:sysroot = /usr/{{ target_host }}
tools.build:defines = ["WINVER=0x0601", "_WIN32_WINNT=0x0601"]
{%- endmacro -%}

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install ninja-build mingw-w64 nsis
sudo update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix
# Workaround for getting new MinGW headers on Ubuntu 22.04.
# Remove it once MinGW headers version in repository will be 10.0 at least
curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-common_10.0.0-3_all.deb \
&& sudo dpkg -i mingw-w64-common_10.0.0-3_all.deb;
curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-i686-dev_10.0.0-3_all.deb \
&& sudo dpkg -i mingw-w64-i686-dev_10.0.0-3_all.deb;
mkdir ~/.conan ; cd ~/.conan
curl -L "https://github.com/vcmi/vcmi-deps-windows-conan/releases/download/1.1/vcmi-deps-windows-conan-w32.tgz" \
| tar -xzf -

View File

@ -12,5 +12,5 @@ curl -O -L http://mirrors.kernel.org/ubuntu/pool/universe/m/mingw-w64/mingw-w64-
&& sudo dpkg -i mingw-w64-x86-64-dev_10.0.0-3_all.deb;
mkdir ~/.conan ; cd ~/.conan
curl -L "https://github.com/vcmi/vcmi-deps-windows-conan/releases/download/1.0/vcmi-deps-windows-conan-w64.tgz" \
curl -L "https://github.com/vcmi/vcmi-deps-windows-conan/releases/download/1.1/vcmi-deps-windows-conan-w64.tgz" \
| tar -xzf -

View File

@ -255,7 +255,10 @@ endif()
if(MINGW OR MSVC)
# Windows Vista or newer for FuzzyLite 6 to compile
add_definitions(-D_WIN32_WINNT=0x0600)
# Except for conan which already has this definition in its preset
if(NOT USING_CONAN)
add_definitions(-D_WIN32_WINNT=0x0600)
endif()
#delete lib prefix for dlls (libvcmi -> vcmi)
set(CMAKE_SHARED_LIBRARY_PREFIX "")