Enable Windows 32bit builds

Closes #24
This commit is contained in:
Leroy Hopson 2021-07-03 15:15:01 +07:00 committed by Leroy Hopson
parent 0dd2378387
commit 964af715d6
4 changed files with 12 additions and 5 deletions

View file

@ -25,8 +25,6 @@ jobs:
bits: 64 # Currently only wasm32 is supported.
- platform: osx
bits: 32 # Only 64-bit supported on macOS.
- platform: windows
bits: 32 # TODO: Enable 32-bit build on windows-latest.
steps:
- uses: actions/checkout@v2
with:
@ -89,8 +87,10 @@ jobs:
- name: Install additional windows build dependencies
if: ${{ matrix.os == 'windows-latest' }}
run: python -m pip install scons
- uses: ilammy/msvc-dev-cmd@v1
- uses: ilammy/msvc-dev-cmd@v1.9.0
if: ${{ matrix.os == 'windows-latest' }}
with:
arch: win${{ matrix.bits }}
- name: Build godot-cpp bindings
if: steps.cache.outputs.cache-hit != 'true'

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- HTML5 Support.
- Theme colors now support transparency.
- More themes: base16_dark, base16_light, default_dark, default_light, soft_black, solarized, solarized_black, solarized_white.
- Support for Windows 32-bit (Terminal node only).
### Changed
- Supported Godot version -> 3.3.2.

View file

@ -20,8 +20,6 @@ Terminal emulator for Godot using GDNative and [libtsm](https://github.com/Aetf/
- Linux 32-bit
- MacOS 64-bit
- Windows 64-bit
### Planned/untested:
- Windows 32-bit

View file

@ -66,6 +66,14 @@ opts.Add(EnumVariable(
opts.Update(env)
Help(opts.GenerateHelpText(env))
# Allows 32bit builds on windows 64bit.
if env['platform'] == 'windows':
if env['bits'] == '64':
env = Environment(TARGET_ARCH='amd64')
elif env['bits'] == '32':
env = Environment(TARGET_ARCH='x86')
opts.Update(env)
# Add PATH to environment so scons can find commands such as g++, etc.
env.AppendENVPath('PATH', os.getenv('PATH'))