58 Commits

Author SHA1 Message Date
2ca78e001c re-enable mac and windows
Some checks failed
/ release (Debug, map[deps:macos-universal flag:arm64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-silicon version:14]) (push) Has been cancelled
/ release (Debug, map[deps:macos-universal flag:x86_64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-intel version:12]) (push) Has been cancelled
/ release (Debug, map[name:windows scons-script:./.github/workflows/scripts/win/scons-build.bat suffix: version:2019]) (push) Has been cancelled
/ release (Release, map[deps:macos-universal flag:arm64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-silicon version:14]) (push) Has been cancelled
/ release (Release, map[deps:macos-universal flag:x86_64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-intel version:12]) (push) Has been cancelled
/ release (Release, map[name:windows scons-script:./.github/workflows/scripts/win/scons-build.bat suffix: version:2019]) (push) Has been cancelled
2024-10-30 17:39:08 -05:00
a3d80ac4f3 try install openAL 2024-10-30 17:04:44 -05:00
5fda619bac unclear why this does it 2024-10-30 16:21:52 -05:00
b740c4e108 try different -rpath-link 2024-10-30 16:16:30 -05:00
8341c313ab try pass rpath ./ to linker 2024-10-30 16:08:46 -05:00
987ea81a68 try disable mac notarization for now 2024-10-30 14:41:10 -05:00
0eaf752b53 disable non-ubuntu, try other package 2024-10-30 14:30:46 -05:00
e5ce3ecbcf try other package names 2024-10-30 14:27:21 -05:00
5b24e1335f try install opengl on ubuntu 2024-10-30 14:21:36 -05:00
162983e2c7 try also SFML_DIR env variable 2024-10-30 14:13:18 -05:00
c2a85670bf linux fix SFML_DIR 2024-10-30 14:11:20 -05:00
846e9a9f54 d is the debug suffix for zlib built from source 2024-10-30 14:09:17 -05:00
7c8b0e850e don't fix-rpaths on non-mac 2024-10-30 13:26:44 -05:00
b0a3c9a86c try -D SFML_DIR 2024-10-30 13:25:54 -05:00
619b839471 fix indentation 2024-10-30 12:59:36 -05:00
1a0dc5a770 fix indentation 2024-10-30 12:56:10 -05:00
f59e822cee try export windows cache variables 2024-10-30 12:55:40 -05:00
5aee421355 pass SFML_DIR 2024-10-30 12:54:22 -05:00
621a114771 mac 10.15 is the best I can do 2024-10-30 12:45:34 -05:00
9ad8e4adfb WHY 2024-09-09 17:27:11 -05:00
a701ce6c54 hate this 2024-09-09 17:19:55 -05:00
c1baafbe1b apparently this can't be done without a separate intel build 2024-09-09 17:18:08 -05:00
249fb986e4 don't pass arch flags, we're doing this the stupid way 2024-09-09 17:18:08 -05:00
cf75602def Update release.yml 2024-09-09 16:37:26 -05:00
c22b222b56 pass cxxflags better 2024-09-09 16:21:41 -05:00
2af674600e try for macos universal >=10.13 2024-09-09 16:06:29 -05:00
1161ca752f remove print 2024-09-08 15:53:19 -05:00
e87f7de716 clarify comment 2024-09-08 15:53:07 -05:00
d685598062 revert something 2024-09-08 15:45:04 -05:00
da53765160 remove lses 2024-09-08 15:42:06 -05:00
d9fce868d4 fix rpaths before upload unsigned 2024-09-08 15:42:06 -05:00
a7a38bd8ec remove lses 2024-09-08 15:42:06 -05:00
f21817050c keep trying to fix 2024-09-08 15:42:06 -05:00
fc79cf4685 ls what we're looking at 2024-09-08 15:42:06 -05:00
476eab32d6 fix paths 2024-09-08 15:42:06 -05:00
a4b1c7384d try fix-rpaths.py 2024-09-08 15:42:06 -05:00
03e4bf9b56 cp -av and print the output 2024-09-08 15:42:06 -05:00
2ced39ccb5 ls -R before signing too 2024-09-08 15:42:06 -05:00
755c4bdfe0 upload pre-signed artifact 2024-09-08 15:42:06 -05:00
f82bebfe73 use cp -a when bundling 2024-09-08 15:42:06 -05:00
d84dcd3960 stop action after 1 signing failure 2024-09-08 15:42:06 -05:00
fa650d21d3 print where it's copying from 2024-09-08 15:42:06 -05:00
c10956cd2f try reverse order of things 2024-09-08 15:42:06 -05:00
0d428df897 ls the dependencies before and after build 2024-09-08 15:42:06 -05:00
c5a5a5dfe8 just ls what's in there 2024-09-08 15:42:06 -05:00
901534a2ca fix relative path in scope 2024-09-08 15:42:06 -05:00
6fe01f8b74 try fix a scope problem 2024-09-08 15:42:06 -05:00
1b8112b309 try fix a problem with spaces in the app names 2024-09-08 15:42:06 -05:00
6096c3cb3c echo 2024-09-08 15:42:06 -05:00
35c0fd7a28 try fix again 2024-09-08 15:42:06 -05:00
acc806621f try sign differently again 2024-09-08 15:42:06 -05:00
ae47e6e344 try back to normal framework signing method 2024-09-08 15:42:06 -05:00
8e78ec0c51 try codesign more files in .framework bundles 2024-09-08 15:42:06 -05:00
e1b5fe0640 try codesign inside the .framework 2024-09-08 15:42:06 -05:00
8b761bf806 download the right platform dependencies 2024-09-08 15:42:06 -05:00
75644e6e59 fix yaml syntax 2024-09-08 15:42:06 -05:00
6da3ab99fa clean up release.yml + download dependencies release 2024-09-08 15:42:06 -05:00
86df5e0c53 Release build squashed 2024-09-08 15:42:06 -05:00
6 changed files with 314 additions and 32 deletions

127
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,127 @@
on:
push:
branches:
- 'itch-edition'
tags:
- "v*.*.*"
pull_request:
branches:
- itch-edition
jobs:
release:
env:
ARCH: ${{ matrix.os.flag }}
MACOSX_DEPLOYMENT_TARGET: 10.15
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
PROD_MACOS_CERTIFICATE: '${{ secrets.PROD_MACOS_CERTIFICATE }}'
PROD_MACOS_CERTIFICATE_PWD: '${{ secrets.PROD_MACOS_CERTIFICATE_PWD }}'
PROD_MACOS_CERTIFICATE_NAME: '${{ secrets.PROD_MACOS_CERTIFICATE_NAME }}'
PROD_MACOS_CI_KEYCHAIN_PWD: '${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}'
PROD_MACOS_NOTARIZATION_APPLE_ID: '${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}'
PROD_MACOS_NOTARIZATION_TEAM_ID: '${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}'
PROD_MACOS_NOTARIZATION_PWD: '${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}'
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
DEBUG_FLAG: ${{ matrix.configuration == 'Debug' && 'true' || 'false' }}
BUILD_OS: ${{ matrix.os.name }}
strategy:
fail-fast: false
matrix:
os:
- name: macos
suffix: '-intel'
flag: x86_64
deps: macos-universal
version: 12
scons-script: './.github/workflows/scripts/mac/scons-build.sh'
- name: macos
flag: arm64
suffix: '-silicon'
deps: macos-universal
version: 14
scons-script: './.github/workflows/scripts/mac/scons-build.sh'
# - name: ubuntu
# suffix: ''
# version: 22.04
# scons-script: scons
- name: windows
suffix: ''
version: 2019
scons-script: './.github/workflows/scripts/win/scons-build.bat'
configuration:
- Release
- Debug
runs-on: '${{ matrix.os.name }}-${{ matrix.os.version }}'
steps:
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: "core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');"
- name: checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Download dependency build
uses: robinraju/release-downloader@v1
with:
repository: NQNStudios/cboe-dependencies
latest: true
fileName: 'dependencies-${{ matrix.os.deps || matrix.os.name }}-${{ matrix.configuration }}.tar'
extract: true
out-file-path: 'deps'
- name: Windows build dependencies
run: 'vcpkg install libxml2 && pip install scons'
if: ${{ matrix.os.name == 'windows' }}
- name: Mac build dependencies
run: brew install scons
if: ${{ matrix.os.name == 'macos' }}
- name: Linux build dependencies
run: sudo apt-get update && sudo apt-get install scons libxml2-utils libgl-dev libopenal-dev
if: ${{ matrix.os.name == 'ubuntu' }}
- name: Install TGUI
run: 'sudo ./.github/workflows/scripts/linux/install-tgui.sh'
if: ${{ matrix.os.name == 'ubuntu' }}
- name: Build
run: '${{ matrix.os.scons-script }} test=false debug=$DEBUG_FLAG'
shell: bash
- name: Download fix-rpaths.py script
run: git clone https://gist.github.com/NQNStudios/7145bcf6621891f5176c8caa165d6b93
if: ${{ matrix.os.name == 'macos' }}
- name: Fix rpaths game
run: 'python 7145bcf6621891f5176c8caa165d6b93/fix-rpaths.py "build/Blades of Exile/Blades of Exile.app"'
if: ${{ matrix.os.name == 'macos' }}
- name: Fix rpaths scenario editor
run: 'python 7145bcf6621891f5176c8caa165d6b93/fix-rpaths.py "build/Blades of Exile/BoE Scenario Editor.app"'
if: ${{ matrix.os.name == 'macos' }}
- name: Fix rpaths character editor
run: 'python 7145bcf6621891f5176c8caa165d6b93/fix-rpaths.py "build/Blades of Exile/BoE Character Editor.app"'
if: ${{ matrix.os.name == 'macos' }}
- name: 'Tar unsigned files'
run: 'tar -cvf cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}-unsigned.tar "Blades of Exile"'
working-directory: '${{ github.workspace }}/build'
- name: upload pre-signing artifact
uses: actions/upload-artifact@v4
with:
name: cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}-unsigned
path: '${{ github.workspace }}/build/cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}-unsigned.tar'
- name: Codesign and notarize
run: 'NOTARIZE="no" ./.github/workflows/scripts/mac/sign-apps.sh'
if: ${{ matrix.os.name == 'macos' }}
- name: 'Tar files'
run: 'tar -cvf cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}.tar "Blades of Exile"'
working-directory: '${{ github.workspace }}/build'
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}
path: '${{ github.workspace }}/build/cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}.tar'
- name: Github release
uses: softprops/action-gh-release@v2
with:
files: '${{ github.workspace }}/build/cboe-${{ matrix.os.name }}${{ matrix.os.suffix }}-${{ matrix.configuration }}.tar'
if: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: 'Itch.io release'
run: './.github/workflows/scripts/butler_push.sh'
shell: bash
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.configuration == 'Release' && matrix.os.name != 'macos' }}

28
.github/workflows/scripts/butler_push.sh vendored Executable file
View File

@@ -0,0 +1,28 @@
#! /bin/bash
butler_channel=""
butler_exe=""
release_dir=""
if [ "$BUILD_OS" = "ubuntu" ]; then
butler_channel=linux-amd64
butler_exe=butler
release_dir="linux"
elif [ "$BUILD_OS" = "windows" ]; then
butler_channel=windows-amd64
butler_exe=butler.exe
release_dir="windows"
elif [ "$BUILD_OS" = "macos" ]; then
butler_channel=darwin-amd64
butler_exe=butler
release_dir="macos"
fi
# -L follows redirects
# -O specifies output name
curl -L -o butler.zip https://broth.itch.ovh/butler/${butler_channel}/LATEST/archive/default
unzip butler.zip
# GNU unzip tends to not set the executable bit even though it's set in the .zip
chmod +x ${butler_exe}
# just a sanity check run (and also helpful in case you're sharing CI logs)
./${butler_exe} -V
./${butler_exe} push "build/Blades of Exile/" nqn/blades-of-exile:${butler_channel}

View File

@@ -3,7 +3,7 @@
git clone --depth 1 -b 0.9 https://github.com/texus/TGUI.git
cd TGUI
export CLICOLOR_FORCE=1
cmake -D TGUI_CXX_STANDARD=14 .
SFML_DIR=../deps/lib/cmake/SFML cmake -D TGUI_CXX_STANDARD=14 -D SFML_DIR=../deps/lib/cmake/SFML .
make
cmake --install .
cd .. # Probably not needed but...

View File

@@ -4,4 +4,4 @@ export CC="$(brew --prefix llvm)/bin/clang"
export CXX="$(brew --prefix llvm)/bin/clang++"
export SDKROOT="$(xcrun --show-sdk-path)"
scons CXXFLAGS="-I/usr/local/opt/zlib/include" LINKFLAGS="-L/usr/local/opt/zlib/lib" $@
scons CXXFLAGS="-I/usr/local/opt/zlib/include -arch $ARCH" LINKFLAGS="-L/usr/local/opt/zlib/lib" $@

74
.github/workflows/scripts/mac/sign-apps.sh vendored Executable file
View File

@@ -0,0 +1,74 @@
#! /bin/bash
# CODE-SIGNING STEP
# Original Source: https://federicoterzi.com/blog/automatic-code-signing-and-notarization-for-macos-apps-using-github-actions/
# Modified by NQNStudios
# Turn our base64-encoded certificate back to a regular .p12 file
echo $PROD_MACOS_CERTIFICATE | base64 --decode > certificate.p12
# We need to create a new keychain, otherwise using the certificate will prompt
# with a UI dialog asking for the certificate password, which we can't
# use in a headless CI environment
security create-keychain -p "$PROD_MACOS_CI_KEYCHAIN_PWD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$PROD_MACOS_CI_KEYCHAIN_PWD" build.keychain
security import certificate.p12 -k build.keychain -P "$PROD_MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$PROD_MACOS_CI_KEYCHAIN_PWD" build.keychain
sign() {
APP_PATH="build/Blades of Exile/$1.app"
# We finally codesign our app bundle, specifying the Hardened runtime option
/usr/bin/codesign --force -s "$PROD_MACOS_CERTIFICATE_NAME" --options runtime "$APP_PATH"/Contents/Frameworks/*.dylib -v
(cd "$APP_PATH" && frameworks=Contents/Frameworks/*.framework/Versions/A/* && \
for framework in $frameworks; do
if [ -f "$framework" ]; then
/usr/bin/codesign --force -s "$PROD_MACOS_CERTIFICATE_NAME" --options runtime "$framework" -v
fi
done)
/usr/bin/codesign --force -s "$PROD_MACOS_CERTIFICATE_NAME" --options runtime "$APP_PATH"/Contents/Frameworks/*.framework/Versions/A/Resources/Info.plist -v
/usr/bin/codesign --force -s "$PROD_MACOS_CERTIFICATE_NAME" --options runtime "$APP_PATH/Contents/Info.plist" -v
/usr/bin/codesign --force -s "$PROD_MACOS_CERTIFICATE_NAME" --options runtime "$APP_PATH" -v
# NOTARIZATION STEP
if [ "$NOTARIZE" = "no" ];
then
return
fi
# (same source)
# Store the notarization credentials so that we can prevent a UI password dialog
# from blocking the CI
echo "Create keychain profile"
xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD"
# We can't notarize an app bundle directly, but we need to compress it as an archive.
# Therefore, we create a zip file containing our app bundle, so that we can send it to the
# notarization service
echo "Creating temp notarization archive"
ditto -c -k --keepParent "$APP_PATH" "notarization.zip"
# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
# characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if
# you're curious
echo "Notarize app"
xcrun notarytool submit "notarization.zip" --keychain-profile "notarytool-profile" --wait
# Finally, we need to "attach the staple" to our executable, which will allow our app to be
# validated by macOS even when an internet connection is not available.
echo "Attach staple"
xcrun stapler staple "$APP_PATH" || exit 1
}
sign "Blades of Exile"
sign "BoE Scenario Editor"
sign "BoE Character Editor"

View File

@@ -185,7 +185,14 @@ if platform == "darwin":
dest_path = path.join(target[0].path, basefile)
if path.exists(dest_path):
break
Execute(Copy(dest_path, src_path))
# Copying .frameworks needs to preserve symlinks by using cp -a.
# SCons provides Copy(symlinks=True) but that doesn't seem to work.
try:
print(subprocess.check_output(['cp', '-av', src_path, dest_path], text=True))
except:
print('cp -av failed')
Exit(1)
# Recursively bundle the dependencies of each dependency:
bundle_libraries_for(target, [File(check_path)], env)
break
elif platform == "win32":
@@ -199,13 +206,15 @@ elif platform == "win32":
vcpkg_other_libs = list(filter(path.exists, vcpkg_other_libs))
vcpkg_other_bins = [path.join(d.get_abspath(), 'bin') for d in vcpkg_other_packages]
vcpkg_other_bins = list(filter(path.exists, vcpkg_other_bins))
include_paths=[path.join(vcpkg_installed, 'include')] + vcpkg_other_includes
project_includes = []
for (root, dirs, files) in os.walk('src'):
project_includes.append(path.join(os.getcwd(), root))
include_paths=project_includes
env.Append(
LINKFLAGS=['/SUBSYSTEM:WINDOWS','/ENTRY:mainCRTStartup',f'/MACHINE:X{arch_short}'],
LINKFLAGS=['/SUBSYSTEM:WINDOWS','/ENTRY:mainCRTStartup',f'/MACHINE:X{arch_short}', '/VERBOSE', '/NODEFAULTLIB:libboost_filesystem-vc142-mt-x64-1_85.lib'],
CXXFLAGS=['/EHsc','/MD','/FIglobal.hpp'],
CPPPATH=include_paths,
LIBPATH=[path.join(vcpkg_installed, 'lib')] + vcpkg_other_libs + vcpkg_other_bins,
LIBPATH=[],
LIBS=Split("""
kernel32
user32
@@ -226,7 +235,10 @@ elif platform == "win32":
def build_app_package(env, source, build_dir, info):
env.Install(build_dir, source)
elif platform == "posix":
env.Append(CXXFLAGS=["-std=c++14","-include","global.hpp"])
env.Append(
CXXFLAGS=["-std=c++14","-include","global.hpp"],
#LINKFLAGS=["-rpath-link", "deps/lib/", "-rpath", "./"]
)
def build_app_package(env, source, build_dir, info):
env.Install(build_dir, source)
@@ -300,10 +312,6 @@ if not env.GetOption('clean'):
print("There's a problem with your compiler!")
Exit(1)
if not conf.CheckLib('zlib' if (platform == "win32" and 'mingw' not in env["TOOLS"]) else 'z'):
print('zlib must be installed!')
Exit(1)
def check_lib(lib, disp, suffixes=[], versions=[], msvc_versions=[]):
if "mingw" in env["TOOLS"] and lib.startswith("sfml"):
lib = "lib" + lib
@@ -338,6 +346,8 @@ if not env.GetOption('clean'):
boost_versions = ['-1_84'] # This is a bit of a hack. :(
suffixes = ['-mt', f'-mt-x{env["bits"]}']
zlib = 'zlib' if (platform == "win32" and 'mingw' not in env["TOOLS"]) else 'z'
check_lib(zlib, 'zlib', ['d'], [])
check_header('boost/lexical_cast.hpp', 'Boost.LexicalCast')
check_header('boost/optional.hpp', 'Boost.Optional')
@@ -347,10 +357,11 @@ if not env.GetOption('clean'):
check_header('boost/spirit/include/classic.hpp', 'Boost.Spirit.Classic')
check_lib('boost_system', 'Boost.System', suffixes, boost_versions)
check_lib('boost_filesystem', 'Boost.Filesystem', suffixes, boost_versions)
check_lib('sfml-system', 'SFML-system')
check_lib('sfml-window', 'SFML-window')
check_lib('sfml-audio', 'SFML-audio')
check_lib('sfml-graphics', 'SFML-graphics')
sfml_suffixes = ['-d']
check_lib('sfml-system', 'SFML-system', sfml_suffixes)
check_lib('sfml-window', 'SFML-window', sfml_suffixes)
check_lib('sfml-audio', 'SFML-audio', sfml_suffixes)
check_lib('sfml-graphics', 'SFML-graphics', sfml_suffixes)
# Make sure Catch2 is cloned
if not path.exists('deps/Catch2/README.md'):
@@ -369,6 +380,7 @@ if not env.GetOption('clean'):
if platform == 'posix':
def check_tgui(conf, second_attempt=False):
if conf.CheckLib('libtgui', language='C++'):
bundled_libs.append('tgui')
return conf
else:
if second_attempt:
@@ -450,7 +462,31 @@ Export("data_dir")
SConscript(["rsrc/SConscript", "doc/SConscript"])
# Bundle required frameworks and libraries
def handle_bundled_libs(extension, prefix=''):
target_dirs = ["#build/Blades of Exile", "#build/test"]
for lib in bundled_libs:
for lpath in env['LIBPATH']:
def check_path(src_file):
_dir = os.path.dirname(src_file)
print(f'checking {_dir} for {prefix}{lib}')
try:
print(os.listdir(_dir))
except:
pass
if path.exists(src_file) and src_file != "/usr/lib/x86_64-linux-gnu/libz.so":
for targ in target_dirs:
for so in os.listdir(_dir):
if os.path.basename(src_file) in so:
print(f'found {path.join(_dir, so)}')
env.Install(targ, path.join(_dir, so))
return True
return False
if check_path(path.join(lpath, prefix + lib + extension)):
break
elif check_path(path.join(lpath.replace('lib', 'bin'), prefix + lib + extension)):
break
elif check_path(path.join(lpath, 'x86_64-linux-gnu', prefix + lib + extension)):
break
if platform == "darwin":
app_targets = []
if 'game' in targets:
@@ -482,20 +518,7 @@ elif platform == "win32":
brotlidec
brotlicommon
""")
target_dirs = ["#build/Blades of Exile", "#build/test"]
for lib in bundled_libs:
for lpath in env['LIBPATH']:
src_file = path.join(lpath, lib + ".dll")
if path.exists(src_file):
for targ in target_dirs:
env.Install(targ, src_file)
break
elif 'lib' in lpath:
src_file = path.join(lpath.replace('lib', 'bin'), lib + ".dll")
if path.exists(src_file):
for targ in target_dirs:
env.Install(targ, src_file)
break
handle_bundled_libs(".dll")
# Extra: Microsoft redistributable libraries installer
if 'msvc' in env["TOOLS"]:
if path.exists("deps/VCRedistInstall.exe"):
@@ -508,6 +531,36 @@ elif platform == "win32":
# (Because the installer is an optional component.)
os.makedirs("build/Blades of Exile", exist_ok=True)
open("build/Blades of Exile/VCRedistInstall.exe", 'w').close()
elif platform == "posix":
targets = [
"Blades of Exile",
"BoE Character Editor",
"BoE Scenario Editor",
]
def patchelf():
to_patch = targets + [so for so in os.listdir("build/Blades of Exile") if '.so' in so]
for targ in to_patch:
subprocess.call(['patchelf', '--set-rpath', '.', targ], cwd='build/Blades of Exile')
atexit.register(patchelf)
bundled_libs += Split("""
GL
X11
stdc++
Xrandr
Xcursor
udev
openal
vorbisenc
vorbisfile
vorbis
ogg
FLAC
freetype
GLdispatch
GLX
xcb
""")
handle_bundled_libs(".so", "lib")
if env["package"]:
if platform == "darwin":