Updated the tools.

This commit is contained in:
Relintai 2022-02-20 23:55:27 +01:00
parent 05fd9eb648
commit 5799047a79
21 changed files with 586 additions and 194 deletions

6
build_pi.sh Normal file → Executable file
View File

@ -3,4 +3,10 @@ scons bel_latomic_strip_slim -j4
scons bl_latomic_strip_slim -j4
scons blr_latomic_strip_slim -j4
rm -f ./engine/bin/godot.x11.pi4.opt.32
rm -f ./engine/bin/godot.x11.pi4.opt.debug.32
rm -f ./engine/bin/godot.x11.pi4.opt.tools.32
mv ./engine/bin/godot.x11.opt.32 ./engine/bin/godot.x11.pi4.opt.32
mv ./engine/bin/godot.x11.opt.debug.32 ./engine/bin/godot.x11.pi4.opt.debug.32
mv ./engine/bin/godot.x11.opt.tools.32 ./engine/bin/godot.x11.pi4.opt.tools.32

View File

@ -1,39 +1,52 @@
#!/bin/bash
set -e
version=""
version_snake_cased=""
if [ ! -z $1 ]; then
version="."
version+=$1
version_snake_cased=${version//./_}
fi
project_root=$(pwd)
rm -Rf ./export
mkdir export
mkdir export/broken_seals_android_release
mkdir export/broken_seals_android_debug
mkdir export/broken_seals_linux
mkdir export/broken_seals_windows
mkdir export/broken_seals_javascript
mkdir export/broken_seals_pi4
mkdir export/export_templates
mkdir export/broken_seals${version_snake_cased}_android_release
mkdir export/broken_seals${version_snake_cased}_android_debug
mkdir export/broken_seals${version_snake_cased}_linux
mkdir export/broken_seals${version_snake_cased}_windows
mkdir export/broken_seals${version_snake_cased}_javascript
mkdir export/broken_seals${version_snake_cased}_pi4
mkdir export/broken_seals${version_snake_cased}_osx
mkdir export/export_templates_bs${version_snake_cased}
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export-debug Android-Release ${project_root}/export/broken_seals_android_release/broken_seals.apk
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export-debug Android ${project_root}/export/broken_seals_android_debug/broken_seals_debug.apk
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export Linux/X11 ${project_root}/export/broken_seals_linux/broken_seals_x11
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export "Windows Desktop" ${project_root}/export/broken_seals_windows/broken_seals.exe
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export HTML5 ${project_root}/export/broken_seals_javascript/broken_seals.html
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export PI4/X11 ${project_root}/export/broken_seals_pi4/broken_seals_pi4
cp ./engine/bin/godot.windows.opt.tools.64.exe ${project_root}/export/godot.bs.windows.opt.tools.64.exe
cp ./engine/bin/godot.x11.opt.tools.64 ${project_root}/export/godot.bs.x11.opt.tools.64
cp ./engine/bin/godot.x11.pi4.opt.tools.32 ${project_root}/export/godot.bs.x11.pi4.opt.tools.32
cp ./engine/bin/android_debug.apk ${project_root}/export/export_templates/android_debug.apk
cp ./engine/bin/android_release.apk ${project_root}/export/export_templates/android_release.apk
cp ./engine/bin/godot.javascript.opt.debug.zip ${project_root}/export/export_templates/godot.javascript.opt.debug.zip
cp ./engine/bin/godot.javascript.opt.zip ${project_root}/export/export_templates/godot.javascript.opt.zip
cp ./engine/bin/godot.windows.opt.64.exe ${project_root}/export/export_templates/godot.windows.opt.64.exe
cp ./engine/bin/godot.windows.opt.debug.64.exe ${project_root}/export/export_templates/godot.windows.opt.debug.64.exe
cp ./engine/bin/godot.x11.opt.64 ${project_root}/export/export_templates/godot.x11.opt.64
cp ./engine/bin/godot.x11.opt.debug.64 ${project_root}/export/export_templates/godot.x11.opt.debug.64
cp ./engine/bin/godot.x11.pi4.opt.32 ${project_root}/export/export_templates/godot.x11.pi4.opt.32
cp ./engine/bin/godot.x11.pi4.opt.debug.32 ${project_root}/export/export_templates/godot.x11.pi4.opt.debug.32
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export-debug Android-Release ${project_root}/export/broken_seals${version_snake_cased}_android_release/broken_seals${version_snake_cased}.apk
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export-debug Android ${project_root}/export/broken_seals${version_snake_cased}_android_debug/broken_seals_debug${version_snake_cased}.apk
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export Linux/X11 ${project_root}/export/broken_seals${version_snake_cased}_linux/broken_seals${version_snake_cased}_x11
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export "Windows Desktop" ${project_root}/export/broken_seals${version_snake_cased}_windows/broken_seals${version_snake_cased}.exe
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export HTML5 ${project_root}/export/broken_seals${version_snake_cased}_javascript/broken_seals.html
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export PI4/X11 ${project_root}/export/broken_seals${version_snake_cased}_pi4/broken_seals${version_snake_cased}_pi4
./engine/bin/godot.x11.opt.tools.64 --path ./game/ --export "Mac OSX" ${project_root}/export/broken_seals${version_snake_cased}_osx/broken_seals${version_snake_cased}.app
cp ./engine/bin/godot.windows.opt.tools.64.exe ${project_root}/export/godot.bs${version}.windows.opt.tools.64.exe
cp ./engine/bin/godot.x11.opt.tools.64 ${project_root}/export/godot.bs${version}.x11.opt.tools.64
cp ./engine/bin/godot.x11.pi4.opt.tools.32 ${project_root}/export/godot.bs${version}.x11.pi4.opt.tools.32
cp ./engine/bin/godot.javascript.opt.tools.threads.zip ${project_root}/export/godot.bs${version}.javascript.opt.tools.zip
cp ./engine/bin/Godot.app.zip ${project_root}/export/godot.bs${version}.osx.opt.tools.zip
cp ./engine/bin/android_debug.apk ${project_root}/export/export_templates_bs${version_snake_cased}/android_debug.apk
cp ./engine/bin/android_release.apk ${project_root}/export/export_templates_bs${version_snake_cased}/android_release.apk
cp ./engine/bin/godot.javascript.opt.debug.zip ${project_root}/export/export_templates_bs${version_snake_cased}/godot.javascript.opt.debug.zip
cp ./engine/bin/godot.javascript.opt.zip ${project_root}/export/export_templates_bs${version_snake_cased}/godot.javascript.opt.zip
cp ./engine/bin/godot.windows.opt.64.exe ${project_root}/export/export_templates_bs${version_snake_cased}/godot.windows.opt.64.exe
cp ./engine/bin/godot.windows.opt.debug.64.exe ${project_root}/export/export_templates_bs${version_snake_cased}/godot.windows.opt.debug.64.exe
cp ./engine/bin/godot.x11.opt.64 ${project_root}/export/export_templates_bs${version_snake_cased}/godot.x11.opt.64
cp ./engine/bin/godot.x11.opt.debug.64 ${project_root}/export/export_templates_bs${version_snake_cased}/godot.x11.opt.debug.64
cp ./engine/bin/godot.x11.pi4.opt.32 ${project_root}/export/export_templates_bs${version_snake_cased}/godot.x11.pi4.opt.32
cp ./engine/bin/godot.x11.pi4.opt.debug.32 ${project_root}/export/export_templates_bs${version_snake_cased}/godot.x11.pi4.opt.debug.32
cp ./engine/bin/osx.zip ${project_root}/export/export_templates_bs${version_snake_cased}/osx.zip

View File

@ -1,6 +1,16 @@
#!/bin/bash
set -e
version=""
version_snake_cased=""
if [ ! -z $1 ]; then
version="."
version+=$1
version_snake_cased=${version//./_}
fi
project_root=$(pwd)
rm -Rf ./release
@ -9,30 +19,35 @@ mkdir release
cd export
rm -Rf broken_seals_full_source
rm -Rf broken_seals_game_source
rm -Rf broken_seals${version_snake_cased}_full_source
rm -Rf broken_seals${version_snake_cased}_game_source
mkdir broken_seals_full_source
mkdir broken_seals_game_source
mkdir broken_seals${version_snake_cased}_full_source
mkdir broken_seals${version_snake_cased}_game_source
python ../tools/copy_repos.py ../ ./broken_seals_full_source
python ../tools/copy_repos.py ../game/ ./broken_seals_game_source
# Warn if a file is over a megabyte. Used to catch big temporary files that would slip through outherwise
python ../tools/copy_repos.py ../ ./broken_seals${version_snake_cased}_full_source 1048576
python ../tools/copy_repos.py ../game/ ./broken_seals${version_snake_cased}_game_source
zip ../release/broken_seals_android_debug.zip ./broken_seals_android_debug/*
zip ../release/broken_seals_android_release.zip ./broken_seals_android_release/*
zip ../release/broken_seals_javascript.zip ./broken_seals_javascript/*
zip ../release/broken_seals_linux.zip ./broken_seals_linux/*
zip ../release/broken_seals_windows.zip ./broken_seals_windows/*
zip ../release/broken_seals_pi4.zip ./broken_seals_pi4/*
zip -q ../release/broken_seals${version_snake_cased}_android_debug.zip ./broken_seals${version_snake_cased}_android_debug/*
zip -q ../release/broken_seals${version_snake_cased}_android_release.zip ./broken_seals${version_snake_cased}_android_release/*
zip -q ../release/broken_seals${version_snake_cased}_javascript.zip ./broken_seals${version_snake_cased}_javascript/*
zip -q ../release/broken_seals${version_snake_cased}_linux.zip ./broken_seals${version_snake_cased}_linux/*
zip -q ../release/broken_seals${version_snake_cased}_windows.zip ./broken_seals${version_snake_cased}_windows/*
zip -q ../release/broken_seals${version_snake_cased}_pi4.zip ./broken_seals${version_snake_cased}_pi4/*
zip -r -q ../release/broken_seals${version_snake_cased}_osx.zip ./broken_seals${version_snake_cased}_osx/*
zip ../release/editor_windows.zip ./godot.bs.windows.opt.tools.64.exe
zip ../release/editor_linux.zip ./godot.bs.x11.opt.tools.64
zip ../release/editor_pi4.zip ./godot.bs.x11.pi4.opt.tools.32
# Editor
zip -q ../release/editor_windows_bs${version_snake_cased}.zip ./godot.bs${version}.windows.opt.tools.64.exe
zip -q ../release/editor_linux_bs${version_snake_cased}.zip ./godot.bs${version}.x11.opt.tools.64
zip -q ../release/editor_pi4_bs${version_snake_cased}.zip ./godot.bs${version}.x11.pi4.opt.tools.32
cp ./godot.bs${version}.javascript.opt.tools.zip ../release/editor_javascript_bs${version_snake_cased}.zip
zip -q ../release/editor_osx_bs${version_snake_cased}.zip ./godot.bs${version}.osx.opt.tools.zip
zip ../release/export_templates.zip ./export_templates/*
zip -q ../release/export_templates_bs${version_snake_cased}.zip ./export_templates_bs${version_snake_cased}/*
zip -r ../release/broken_seals_full_source.zip ./broken_seals_full_source/*
zip -r ../release/broken_seals_game_source.zip ./broken_seals_game_source/*
zip -q -r ../release/broken_seals${version_snake_cased}_full_source.zip ./broken_seals${version_snake_cased}_full_source/*
zip -q -r ../release/broken_seals${version_snake_cased}_game_source.zip ./broken_seals${version_snake_cased}_game_source/*
cd ..

View File

@ -13,22 +13,114 @@ img_version=bs
mkdir -p logs
#sudo podman run -i -t -v $(pwd)/files:/root/files godot-osx:bs /bin/bash
#sudo podman run -i -t -v $(pwd)/:/root/project -w /root/project godot-osx:bs /bin/bash
#sudo podman run -v $(pwd)/:/root/project -w /root/project godot-osx:bs scons bex_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4
#sudo podman run -i -t -v $(pwd)/:/root/project -w /root/project/tools/osx godot-osx:bs bash -c ./lipo.sh
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bew_strip -j4 . 2>&1 | tee logs/bew.log
rm -f engine/modules/modules_enabled.gen.h
#$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bewd_strip -j4 . 2>&1 | tee logs/bewd.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bw_strip -j4 . 2>&1 | tee logs/bw.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-windows:${img_version} scons bwr_strip -j4 . 2>&1 | tee logs/bwr.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons bel_strip -j4 . 2>&1 | tee logs/bel.log
rm -f engine/modules/modules_enabled.gen.h
#$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons beld_strip -j4 . 2>&1 | tee logs/beld.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons bl_strip -j4 . 2>&1 | tee logs/bl.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-linux:${img_version} scons blr_strip -j4 . 2>&1 | tee logs/blr.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} scons bj_strip -j4 . 2>&1 | tee logs/bj.log
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} scons bjr_strip -j4 . 2>&1 | tee logs/bjr.log
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} bash -c 'source /root/emsdk_2.0.25/emsdk_env.sh;scons bj_strip -j4' . 2>&1 | tee logs/bj.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} bash -c 'source /root/emsdk_2.0.25/emsdk_env.sh;scons bjr_strip -j4' . 2>&1 | tee logs/bjr.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-javascript:${img_version} bash -c 'source /root/emsdk_2.0.25/emsdk_env.sh;scons bej_strip_threads -j4' . 2>&1 | tee logs/bej.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-android:${img_version} scons ba_strip -j4 . 2>&1 | tee logs/ba.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-android:${img_version} scons bar_strip -j4 . 2>&1 | tee logs/bar.log
rm -f engine/modules/modules_enabled.gen.h
#osx
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bex_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bex_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bex_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bex_arm64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bx_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bx_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bx_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bx_arm64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bxr_strip arch=x86_64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bxr_x86_64.log
rm -f engine/modules/modules_enabled.gen.h
$podman run -v ${project_root}:/root/project -w /root/project godot-osx:${img_version} scons bxr_strip arch=arm64 -j4 osxcross_sdk=darwin20.4 . 2>&1 | tee logs/bxr_arm64.log
rm -f engine/modules/modules_enabled.gen.h
#lipo
$podman run -v ${project_root}:/root/project -w /root/project/tools/osx godot-osx:${img_version} bash -c ./lipo.sh
#ios
#$podman run -v ${project_root}:/root/project -w /root/project godot-ios:${img_version} scons bir_strip -j4 . 2>&1 | tee logs/bir.log
#rm -f engine/modules/modules_enabled.gen.h
# $podman run -v ${project_root}:/root/project -i -w /root/project -t godot-windows:${img_version} scons bew -j4
rm -f engine/modules/modules_enabled.gen.h
# Check files
cd ./engine/bin/
files=(
# Windows
"godot.windows.opt.64.exe"
"godot.windows.opt.debug.64.exe"
"godot.windows.opt.tools.64.exe"
# Linux
"godot.x11.opt.64"
"godot.x11.opt.debug.64"
"godot.x11.opt.tools.64"
# JS
"godot.javascript.opt.tools.threads.zip"
"godot.javascript.opt.zip"
# Android
"android_debug.apk"
"android_release.apk"
# OSX
"godot.osx.opt.arm64"
"godot.osx.opt.debug.arm64"
"godot.osx.opt.debug.universal"
"godot.osx.opt.debug.x86_64"
"godot.osx.opt.tools.arm64"
"godot.osx.opt.tools.universal"
"godot.osx.opt.tools.x86_64"
"godot.osx.opt.universal"
"godot.osx.opt.x86_64"
)
error=0
for f in ${files[*]}
do
if [ ! -e $f ]; then
error=1
echo "$f is not present!"
fi
done
if [ $error -eq 0 ]; then
echo "All files are present!"
fi
cd ../..

View File

@ -1,16 +1,18 @@
ARG img_version
FROM godot-fedora:${img_version}
RUN dnf -y install --setopt=install_weak_deps=False \
gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \
mkdir sdk && cd sdk && \
curl -LO https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \
unzip sdk-tools-linux-4333796.zip && \
rm sdk-tools-linux-4333796.zip && \
yes | tools/bin/sdkmanager --licenses && \
tools/bin/sdkmanager ndk-bundle 'build-tools;28.0.3' 'platforms;android-28' 'cmake;3.10.2.4988404'
ENV ANDROID_SDK_ROOT=/root/sdk
ENV ANDROID_NDK_VERSION=21.4.7075529
ENV ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/${ANDROID_NDK_VERSION}
ENV ANDROID_HOME=/root/sdk/
ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/
RUN dnf -y install --setopt=install_weak_deps=False \
gcc gcc-c++ java-11-openjdk-devel ncurses-compat-libs && \
mkdir -p sdk && cd sdk && \
export CMDLINETOOLS=commandlinetools-linux-7302050_latest.zip && \
curl -LO https://dl.google.com/android/repository/${CMDLINETOOLS} && \
unzip ${CMDLINETOOLS} && \
rm ${CMDLINETOOLS} && \
yes | cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" --licenses && \
cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" "ndk;${ANDROID_NDK_VERSION}" 'cmdline-tools;latest' 'build-tools;30.0.3' 'platforms;android-30' 'cmake;3.18.1'
CMD /bin/bash

View File

@ -1,9 +1,10 @@
FROM fedora:31
FROM fedora:34
WORKDIR /root
RUN dnf -y upgrade --setopt=install_weak_deps=False && \
dnf -y install --setopt=install_weak_deps=False \
bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz
bash bzip2 curl file findutils git make nano patch pkgconfig python3-pip unzip which xz yasm && \
pip install scons==4.1.0
CMD /bin/bash

View File

@ -1,30 +1,39 @@
ARG img_version
FROM godot-osx:${img_version}
ENV IOS_SDK=14.5
RUN dnf -y install --setopt=install_weak_deps=False \
automake autoconf clang gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel llvm-devel openssl-devel perl python yasm && \
git clone --progress https://github.com/tpoechtrager/cctools-port.git && \
cd /root/cctools-port && \
git checkout 8239a5211bcf07d6b9d359782e1a889ec1d7cce5 && \
sed -i 's#./autogen.sh#libtoolize -c -i --force\n./autogen.sh#' usage_examples/ios_toolchain/build.sh && \
usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS12.4.sdk.tar.xz arm64 && \
git checkout 236a426c1205a3bfcf0dbb2e2faf2296f0a100e5 && \
# arm64 device
usage_examples/ios_toolchain/build.sh /root/files/iPhoneOS${IOS_SDK}.sdk.tar.xz arm64 && \
mkdir -p /root/ioscross/arm64 && \
mv usage_examples/ios_toolchain/target/* /root/ioscross/arm64 && \
mkdir /root/ioscross/arm64/usr && \
ln -s /root/ioscross/arm64/bin /root/ioscross/arm64/usr/bin && \
# arm64 simulator
# Disabled for now as it doesn't work with cctools-port and current LLVM:
# Cf. https://github.com/tpoechtrager/cctools-port/issues/102
#sed -i 's/miphoneos-version-min/mios-simulator-version-min/g' usage_examples/ios_toolchain/wrapper.c && \
#usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz arm64 && \
#mkdir -p /root/ioscross/arm64_sim && \
#mv usage_examples/ios_toolchain/target/* /root/ioscross/arm64_sim && \
#mkdir /root/ioscross/arm64_sim/usr && \
#ln -s /root/ioscross/arm64_sim/bin /root/ioscross/arm64_sim/usr/bin && \
# x86_64 simulator
sed -i 's#^TRIPLE=.*#TRIPLE="x86_64-apple-darwin11"#' usage_examples/ios_toolchain/build.sh && \
usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator12.4.sdk.tar.xz x86_64 && \
mkdir -p /root/ioscross/x86_64 && \
mv usage_examples/ios_toolchain/target/* /root/ioscross/x86_64 && \
mkdir /root/ioscross/x86_64/usr && \
ln -s /root/ioscross/x86_64/bin /root/ioscross/x86_64/usr/bin
usage_examples/ios_toolchain/build.sh /root/files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz x86_64 && \
mkdir -p /root/ioscross/x86_64_sim && \
mv usage_examples/ios_toolchain/target/* /root/ioscross/x86_64_sim && \
mkdir /root/ioscross/x86_64_sim/usr && \
ln -s /root/ioscross/x86_64_sim/bin /root/ioscross/x86_64_sim/usr/bin
ENV OSXCROSS_IOS=not_nothing
ENV IOSCROSS_ROOT=/root/ioscross
ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/x86_64/bin:${PATH}"
# Until we can build the cross-compiler, we include a pre-made build in the container.
RUN mkdir -p /root/aot-compilers/iphone-arm64 && \
tar xvf /root/files/aarch64-apple-darwin-mono-sgen.tar.xz -C /root/aot-compilers/iphone-arm64
ENV PATH="/root/ioscross/arm64/bin:/root/ioscross/arm64_sim/bin:/root/ioscross/x86_64_sim/bin:${PATH}"
CMD /bin/bash

View File

@ -1,13 +1,13 @@
ARG img_version
FROM godot-fedora:${img_version}
ENV EMSCRIPTEN_CLASSICAL=2.0.25
RUN dnf -y install --setopt=install_weak_deps=False \
gcc gcc-c++ java-openjdk yasm && \
git clone --progress https://github.com/emscripten-core/emsdk && \
cd emsdk && \
git checkout a5082b232617c762cb65832429f896c838df2483 && \
./emsdk install 1.38.47-upstream && \
./emsdk activate 1.38.47-upstream && \
echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc
java-openjdk && \
git clone --branch ${EMSCRIPTEN_CLASSICAL} --progress https://github.com/emscripten-core/emsdk emsdk_${EMSCRIPTEN_CLASSICAL} && \
emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk install ${EMSCRIPTEN_CLASSICAL} && \
emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk activate ${EMSCRIPTEN_CLASSICAL}
# echo "source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh" >> /root/.bashrc
CMD /bin/bash

View File

@ -2,7 +2,6 @@ ARG img_version
FROM godot-fedora:${img_version}
RUN dnf -y install --setopt=install_weak_deps=False \
gcc-c++ xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers yasm
gcc-c++ libxcrypt-compat xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers yasm libstdc++ libstdc++-static
CMD /bin/bash

View File

@ -1,13 +1,16 @@
ARG img_version
FROM godot-fedora:${img_version}
#cmake
RUN dnf -y install --setopt=install_weak_deps=False \
automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \
automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm cmake && \
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
cd /root/osxcross && \
git checkout 542acc2ef6c21aeb3f109c03748b1015a71fed63 && \
ln -s /root/files/MacOSX10.14.sdk.tar.xz /root/osxcross/tarballs && \
UNATTENDED=1 ./build.sh
git checkout 0f87f567dfaf98460244471ad6c0f4311d62079c && \
ln -s /root/files/MacOSX11.3.sdk.tar.xz /root/osxcross/tarballs && \
UNATTENDED=1 ./build.sh && \
./build_compiler_rt.sh
ENV OSXCROSS_ROOT=/root/osxcross
ENV PATH="/root/osxcross/target/bin:${PATH}"

View File

@ -2,42 +2,76 @@ ARG img_version
FROM godot-fedora:${img_version}
RUN dnf -y install --setopt=install_weak_deps=False \
autoconf automake libtool clang cmake fuse fuse-devel libxml2-devel libicu-devel compat-openssl10-devel bzip2-devel kmod cpio && \
git clone --progress https://github.com/mackyle/xar.git && \
cd xar/xar && \
git checkout 66d451dab1ef859dd0c83995f2379335d35e53c9 && \
./autogen.sh --prefix=/usr && \
make -j && make install && \
cd /root && \
clang xar xar-devel xz-devel cpio && \
git clone --progress https://github.com/NiklasRosenstein/pbzx && \
cd pbzx && \
git checkout 2a4d7c3300c826d918def713a24d25c237c8ed53 && \
clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx
CMD mkdir -p /root/xcode && \
cd /root/xcode && \
xar -xf /root/files/Xcode_10.3.xip && \
xar -xf /root/files/Xcode_12.4.xip && \
/root/pbzx/pbzx -n Content | cpio -i && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/MacOSX10.14.sdk && \
mkdir -p /tmp/MacOSX10.14.sdk/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/MacOSX10.14.sdk/usr/include/c++/ && \
mkdir -p mkdir -p /tmp/MacOSX10.14.sdk/usr/share/man && \
export OSX_SDK=MacOSX11.1.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/${OSX_SDK} && \
mkdir -p mkdir -p /tmp/${OSX_SDK}/usr/share/man && \
cp -rf Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man3 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man5 /tmp/MacOSX10.14.sdk/usr/share/man/ && \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man5 /tmp/${OSX_SDK}/usr/share/man/ && \
cd /tmp && \
tar -cJf /root/files/MacOSX10.14.sdk.tar.xz MacOSX10.14.sdk && \
rm -rf MacOSX10.14 && \
tar -cJf /root/files/${OSX_SDK}.tar.xz ${OSX_SDK} && \
rm -rf ${OSX_SDK} && \
cd /root/xcode && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/iPhoneOS12.4.sdk && \
mkdir -p /tmp/iPhoneOS12.4.sdk/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/iPhoneOS12.4.sdk/usr/include/c++/ && \
export IOS_SDK=iPhoneOS14.4.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator14.4.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/iPhoneOS12.4.sdk.tar.xz iPhoneOS12.4.sdk && \
rm -rf iPhoneOS12.4.sdk && \
tar -cJf /root/files/${IOS_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK} && \
cd /root/xcode && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/iPhoneOS12.4.sdk && \
mkdir -p /tmp/iPhoneOS12.4.sdk/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/iPhoneOS12.4.sdk/usr/include/c++/ && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/iPhoneSimulator12.4.sdk.tar.xz iPhoneOS12.4.sdk
tar -cJf /root/files/${IOS_SIMULATOR_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK}
#XCODE_SDK=12.5.1
#OSX_SDK=11.3
#IOS_SDK=14.5
CMD mkdir -p /root/xcode && \
cd /root/xcode && \
xar -xf /root/files/Xcode_12.5.1.xip && \
/root/pbzx/pbzx -n Content | cpio -i && \
export OSX_SDK=MacOSX11.3.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /tmp/${OSX_SDK} && \
mkdir -p /tmp/${OSX_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${OSX_SDK}/usr/include/c++/ && \
mkdir -p mkdir -p /tmp/${OSX_SDK}/usr/share/man && \
cp -rf Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man3 \
Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man5 /tmp/${OSX_SDK}/usr/share/man/ && \
cd /tmp && \
tar -cJf /root/files/${OSX_SDK}.tar.xz ${OSX_SDK} && \
rm -rf ${OSX_SDK} && \
cd /root/xcode && \
export IOS_SDK=iPhoneOS14.5.sdk && \
export IOS_SIMULATOR_SDK=iPhoneSimulator14.5.sdk && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK} && \
cd /root/xcode && \
cp -r Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk /tmp/${IOS_SDK} && \
mkdir -p /tmp/${IOS_SDK}/usr/include/c++ && \
cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/${IOS_SDK}/usr/include/c++/ && \
cd /tmp && \
tar -cJf /root/files/${IOS_SIMULATOR_SDK}.tar.xz ${IOS_SDK} && \
rm -rf ${IOS_SDK}

View File

@ -17,37 +17,39 @@ export podman_build="$podman build --build-arg img_version=${img_version}"
$podman build -v ${files_root}:/root/files -t godot-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log
$podman_build -t godot-linux:${img_version} -f Dockerfile.linux . 2>&1 | tee logs/linux.log
$podman_build -t godot-mono:${img_version} -f Dockerfile.mono . 2>&1 | tee logs/mono.log
$podman_build -t godot-mono-glue:${img_version} -f Dockerfile.mono-glue . 2>&1 | tee logs/mono-glue.log
$podman_build -t godot-windows:${img_version} -f Dockerfile.windows --ulimit nofile=65536 . 2>&1 | tee logs/windows.log
$podman_build -t godot-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log
$podman_build -t godot-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log
if [ ! -e files/MacOSX10.14.sdk.tar.xz ] || [ ! -e files/iPhoneOS12.4.sdk.tar.xz ] || [ ! -e files/iPhoneSimulator12.4.sdk.tar.xz ]; then
if [ ! -e files/Xcode_10.3.xip ]; then
echo "files/Xcode_10.3.xip is required. It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID"
XCODE_SDK=12.5.1
OSX_SDK=11.3
IOS_SDK=14.5
if [ ! -e files/MacOSX${OSX_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneOS${IOS_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneSimulator${IOS_SDK}.sdk.tar.xz ]; then
if [ ! -e files/Xcode_${XCODE_SDK}.xip ]; then
echo "files/Xcode_${XCODE_SDK}.xip is required. It can be downloaded from https://developer.apple.com/download/more/ with a valid apple ID."
exit 1
fi
echo "Building OSX and iOS SDK packages. This will take a while"
$podman_build -t godot-xcode-packer:${img_version} -f Dockerfile.xcode -v ${files_root}:/root/files . 2>&1 | tee logs/xcode.log
$podman run -it --rm -v ${files_root}:/root/files godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.logw
$podman run -it --rm -v ${files_root}:/root/files godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log
fi
$podman_build -t godot-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log
$podman_build -t godot-ios:${img_version} -f Dockerfile.ios . 2>&1 | tee logs/ios.log
$podman_build -t godot-osx:${img_version} -v ${files_root}:/root/files -f Dockerfile.osx . 2>&1 | tee logs/osx.log
$podman_build -t godot-ios:${img_version} -v ${files_root}:/root/files -f Dockerfile.ios . 2>&1 | tee logs/ios.log
if [ ! -e files/msvc2017.tar ]; then
echo
echo "files/msvc2017.tar is missing. This file can be created on a Windows 7 or 10 machine by downloading the 'Visual Studio Tools' installer."
echo "here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017"
echo "The required components can be installed by running"
echo "vs_buildtools.exe --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive"
echo "after that create a zipfile of C:/Program Files (x86)/Microsoft Visual Studio"
echo "tar -cf msvc2017.tar -C \"c:/Program Files (x86)/ Microsoft Visual Studio\""
echo
exit 1
if [ "${build_msvc}" != "0" ]; then
if [ ! -e files/msvc2017.tar ]; then
echo
echo "files/msvc2017.tar is missing. This file can be created on a Windows 7 or 10 machine by downloading the 'Visual Studio Tools' installer."
echo "here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017"
echo "The required components can be installed by running"
echo "vs_buildtools.exe --add Microsoft.VisualStudio.Workload.UniversalBuildTools --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop --add Microsoft.VisualStudio.Component.Windows10SDK.16299.UWP.Native --passive"
echo "after that create a zipfile of C:/Program Files (x86)/Microsoft Visual Studio"
echo "tar -cf msvc2017.tar -C \"c:/Program Files (x86)/ Microsoft Visual Studio\""
echo
exit 1
fi
$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log
fi
$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log

0
tools/build-containers/files/msvc-fixup.sh Normal file → Executable file
View File

View File

@ -1,27 +0,0 @@
diff -u a/tools/gen_sdk_package_darling_dmg.sh b/tools/gen_sdk_package_darling_dmg.sh
--- a/tools/gen_sdk_package_darling_dmg.sh 2018-12-20 16:06:04.744507679 +0000
+++ b/tools/gen_sdk_package_darling_dmg.sh 2018-12-20 16:06:39.000379232 +0000
@@ -33,22 +33,6 @@
[ -n "$CC" ] && require $CC
[ -n "$CXX" ] && require $CXX
-set +e
-
-command -v lsb_release 2>&1 > /dev/null
-
-if [[ $? -eq 0 ]] && [[ -n $(lsb_release -a 2>&1 | grep -i ubuntu) ]]; then
- echo "Using ubuntu, skipping fuse module check"
-else
- modinfo fuse &>/dev/null
-fi
-
-if [ $? -ne 0 ]; then
- echo "Required kernel module 'fuse' not loaded" 1>&2
- echo "Please run 'insmod fuse' as root" 1>&2
- exit 1
-fi
-
set -e
pushd $BUILD_DIR &>/dev/null

View File

@ -0,0 +1,118 @@
From b875d7c1360c8ff2077463d7a5a12e1cff1cc683 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
Date: Mon, 12 Jul 2021 13:34:32 +0200
Subject: [PATCH] compiler-rt: Add option to automate install process
Also mention that compiler-rt can be needed to build code using
`__builtin_available()`.
Fixes #278.
---
README.COMPILER-RT.md | 4 ++++
README.md | 3 +++
build_compiler_rt.sh | 33 ++++++++++++++++++++++++---------
3 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/README.COMPILER-RT.md b/README.COMPILER-RT.md
index b2754dfcf..dced89686 100644
--- a/README.COMPILER-RT.md
+++ b/README.COMPILER-RT.md
@@ -10,6 +10,10 @@ Ensure you have finished `build.sh`,
then run: `./build_compiler_rt.sh`.
+By default, installation steps for compiler-rt will be printed to the terminal
+to run manually, but you can automate the installation process by defining
+`ENABLE_COMPILER_RT_INSTALL`.
+
You can verify compiler-rt is working by invoking the following command:
echo "int main(void){return 0;}" | xcrun clang -xc -o/dev/null -v - 2>&1 | \
diff --git a/README.md b/README.md
index 60d19f917..f32bf626c 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,9 @@ It also includes scripts for optionally building
* the "compiler-rt" runtime library, and
* the `llvm-dsymutil` tool required for debugging.
+Note: The "compiler-rt" library can be needed to link code that uses the
+`__builtin_available()` runtime version check.
+
### WHAT CAN BE BUILT WITH IT? ###
diff --git a/build_compiler_rt.sh b/build_compiler_rt.sh
index 8f47262a2..508742cab 100755
--- a/build_compiler_rt.sh
+++ b/build_compiler_rt.sh
@@ -182,22 +182,39 @@ fi
rm -f $BUILD_DIR/.compiler-rt_build_complete
+# Installation. Can be either automated (ENABLE_COMPILER_RT_INSTALL) or will
+# print the commands that the user should run manually.
+
+function print_or_run() {
+ if [ -z "$ENABLE_COMPILER_RT_INSTALL" ]; then
+ echo "$@"
+ else
+ $@
+ fi
+}
+
echo ""
echo ""
echo ""
-echo "Please run the following commands by hand to install compiler-rt:"
+if [ -z "$ENABLE_COMPILER_RT_INSTALL" ]; then
+ echo "Please run the following commands by hand to install compiler-rt:"
+else
+ echo "Installing compiler-rt headers and libraries to the following paths:"
+ echo " ${CLANG_INCLUDE_DIR}"
+ echo " ${CLANG_DARWIN_LIB_DIR}"
+fi
echo ""
-echo "mkdir -p ${CLANG_INCLUDE_DIR}"
-echo "mkdir -p ${CLANG_DARWIN_LIB_DIR}"
-echo "cp -rv $BUILD_DIR/compiler-rt/compiler-rt/include/sanitizer ${CLANG_INCLUDE_DIR}"
+print_or_run mkdir -p ${CLANG_INCLUDE_DIR}
+print_or_run mkdir -p ${CLANG_DARWIN_LIB_DIR}
+print_or_run cp -rv $BUILD_DIR/compiler-rt/compiler-rt/include/sanitizer ${CLANG_INCLUDE_DIR}
if [ $USE_CMAKE -eq 1 ]; then
### CMAKE ###
- echo "cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.a ${CLANG_DARWIN_LIB_DIR}"
- echo "cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.dylib ${CLANG_DARWIN_LIB_DIR}"
+ print_or_run cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.a ${CLANG_DARWIN_LIB_DIR}
+ print_or_run cp -v $BUILD_DIR/compiler-rt/compiler-rt/build/lib/darwin/*.dylib ${CLANG_DARWIN_LIB_DIR}
### CMAKE END ###
@@ -209,7 +226,7 @@ else
function print_install_command() {
if [ -f "$1" ]; then
- echo "cp $PWD/compiler-rt/$1 ${CLANG_DARWIN_LIB_DIR}/$2"
+ print_or_run cp $PWD/compiler-rt/$1 ${CLANG_DARWIN_LIB_DIR}/$2
fi
}
@@ -219,14 +236,12 @@ else
print_install_command "cc_kext/libcompiler_rt.a" "libclang_rt.cc_kext.a"
print_install_command "profile_osx/libcompiler_rt.a" "libclang_rt.profile_osx.a"
-
print_install_command "ubsan_osx_dynamic/libcompiler_rt.dylib" \
"libclang_rt.ubsan_osx_dynamic.dylib"
print_install_command "asan_osx_dynamic/libcompiler_rt.dylib" \
"libclang_rt.asan_osx_dynamic.dylib"
-
popd &>/dev/null
### MAKE END ###

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2019-2020 Péter Magyar
# Copyright (c) 2019-2021 Péter Magyar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ -51,7 +51,7 @@ def onerror(func, path, exc_info):
else:
raise
def copytree(src, dst):
def copytree(src, dst, warn = 0):
for item in os.listdir(src):
sp = os.path.join(src, item)
@ -66,7 +66,7 @@ def copytree(src, dst):
if os.path.isdir(dp):
shutil.rmtree(dp, onerror=onerror)
copytree(sp, dp)
copytree(sp, dp, warn)
else:
if item.endswith(".a") or item.endswith(".class") or item.endswith(".dex") or item.endswith(".pyc") or item.endswith(".o") or item.endswith(".bc") or item.endswith(".so") or item == "export_presets.cfg" or item.endswith(".gen.h") or item.endswith(".os") or item.endswith(".dblite") or item == ".scons_node_count" or item == ".scons_env.json" or item == "compile_commands.json" or item == "config.log" or item.endswith(".gen.inc") or item.endswith(".gen.cpp") :
continue
@ -76,6 +76,13 @@ def copytree(src, dst):
if not os.path.isdir(dst):
os.makedirs(dst)
file_size_bytes = os.path.getsize(sp)
if warn > 0 and file_size_bytes >= warn:
# Ignore assets, this is meant to catch temp / generated files
if not (item.endswith(".po") or item.endswith(".tres") or item.endswith(".ttf") or item.endswith(".tza") or item.endswith(".blend") or item.endswith(".blend1") or item.endswith(".pot")):
print("WARNING! File '", sp, "' (", file_size_bytes, "bytes) is over the warn threshold!")
shutil.copy2(sp, dp)
def copy_repository(data, target_folder, clone_path):
@ -86,14 +93,18 @@ def copy_repository(data, target_folder, clone_path):
#print(sys.argv)
if len(sys.argv) == 3:
if len(sys.argv) == 3 or len(sys.argv) == 4:
src_dir = sys.argv[1]
dst_dir = sys.argv[2]
warn = 0
if len(sys.argv) == 4:
warn = int(sys.argv[3])
src_dir = os.path.abspath(src_dir)
dst_dir = os.path.abspath(dst_dir)
copytree(src_dir, dst_dir)
copytree(src_dir, dst_dir, warn)
else:

View File

@ -7,7 +7,7 @@ custom_features=""
export_filter="all_resources"
include_filter="*.xml"
exclude_filter=""
export_path="../../_bs_export/0.3.1/android_debug/BrokenSeals.apk"
export_path=""
script_export_mode=1
script_encryption_key=""
@ -33,7 +33,6 @@ version/name="0.3.2"
package/unique_name="net.relintai.$genname"
package/name="Broken Seals"
package/signed=true
package/classify_as_game=true
launcher_icons/main_192x192="res://icon.png"
launcher_icons/adaptive_foreground_432x432="res://icon.png"
launcher_icons/adaptive_background_432x432="res://icon.png"
@ -48,7 +47,6 @@ screen/support_small=true
screen/support_normal=true
screen/support_large=true
screen/support_xlarge=true
user_data_backup/allow=false
command_line/extra_args=""
apk_expansion/enable=false
apk_expansion/SALT=""
@ -209,7 +207,7 @@ custom_features=""
export_filter="all_resources"
include_filter="*.xml"
exclude_filter=""
export_path="../../_bs_export/BrokenSeals.x86_64"
export_path=""
script_export_mode=1
script_encryption_key=""
@ -234,7 +232,7 @@ custom_features=""
export_filter="all_resources"
include_filter="*.xml"
exclude_filter=""
export_path="../../_bs_export/0.3.1/html/BrokenSeals.x86_64.html"
export_path=""
script_export_mode=1
script_encryption_key=""
@ -245,20 +243,10 @@ custom_template/release="../engine/bin/godot.javascript.opt.debug.zip"
variant/export_type=0
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=true
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color( 0, 0, 0, 1 )
[preset.3]
@ -269,7 +257,7 @@ custom_features=""
export_filter="all_resources"
include_filter="*.xml"
exclude_filter=""
export_path="../../_bs_export/0.3.1/windows/BrokenSeals.x86_64.exe"
export_path=""
script_export_mode=1
script_encryption_key=""
@ -336,7 +324,6 @@ version/name="0.3.2"
package/unique_name="net.relintai.$genname"
package/name="Broken Seals"
package/signed=true
package/classify_as_game=true
launcher_icons/main_192x192="res://icon.png"
launcher_icons/adaptive_foreground_432x432="res://icon.png"
launcher_icons/adaptive_background_432x432="res://icon.png"
@ -351,7 +338,6 @@ screen/support_small=true
screen/support_normal=true
screen/support_large=true
screen/support_xlarge=true
user_data_backup/allow=false
command_line/extra_args=""
apk_expansion/enable=false
apk_expansion/SALT=""
@ -512,7 +498,7 @@ custom_features=""
export_filter="all_resources"
include_filter="*.xml"
exclude_filter=""
export_path="../aaa/BrokenSeals.x86_64.x86"
export_path=""
script_export_mode=1
script_encryption_key=""
@ -530,9 +516,9 @@ texture_format/no_bptc_fallbacks=true
[preset.6]
name="FRT"
platform="Linux/X11"
runnable=false
name="Mac OSX"
platform="Mac OSX"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter="*.xml"
@ -541,14 +527,64 @@ export_path=""
script_export_mode=1
script_encryption_key=""
[preset.6.options]
custom_template/debug="../engine/bin/godot.x11.frt.opt.debug.32"
custom_template/release="../engine/bin/godot.x11.frt.opt.release.32"
binary_format/64_bits=false
binary_format/embed_pck=false
texture_format/bptc=false
texture_format/s3tc=false
texture_format/etc=true
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
custom_template/debug="../engine/bin/osx.zip"
custom_template/release="../engine/bin/osx.zip"
application/name="Broken Seals"
application/info="Made with Godot Engine"
application/icon=""
application/identifier="net.relintai.brokenseals"
application/signature=""
application/app_category="Role-playing-games"
application/short_version="1.0"
application/version="1.0"
application/copyright=""
display/high_res=false
privacy/microphone_usage_description=""
privacy/camera_usage_description=""
privacy/location_usage_description=""
privacy/address_book_usage_description=""
privacy/calendar_usage_description=""
privacy/photos_library_usage_description=""
privacy/desktop_folder_usage_description=""
privacy/documents_folder_usage_description=""
privacy/downloads_folder_usage_description=""
privacy/network_volumes_usage_description=""
privacy/removable_volumes_usage_description=""
codesign/enable=true
codesign/identity=""
codesign/timestamp=true
codesign/hardened_runtime=true
codesign/replace_existing_signature=true
codesign/entitlements/custom_file=""
codesign/entitlements/allow_jit_code_execution=false
codesign/entitlements/allow_unsigned_executable_memory=false
codesign/entitlements/allow_dyld_environment_variables=false
codesign/entitlements/disable_library_validation=false
codesign/entitlements/audio_input=false
codesign/entitlements/camera=false
codesign/entitlements/location=false
codesign/entitlements/address_book=false
codesign/entitlements/calendars=false
codesign/entitlements/photos_library=false
codesign/entitlements/apple_events=false
codesign/entitlements/debugging=false
codesign/entitlements/app_sandbox/enabled=false
codesign/entitlements/app_sandbox/network_server=false
codesign/entitlements/app_sandbox/network_client=false
codesign/entitlements/app_sandbox/device_usb=false
codesign/entitlements/app_sandbox/device_bluetooth=false
codesign/entitlements/app_sandbox/files_downloads=0
codesign/entitlements/app_sandbox/files_pictures=0
codesign/entitlements/app_sandbox/files_music=0
codesign/entitlements/app_sandbox/files_movies=0
codesign/custom_options=PoolStringArray( )
notarization/enable=false
notarization/apple_id_name=""
notarization/apple_id_password=""
notarization/apple_team_id=""
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false

12
tools/osx/create_editor_app.sh Executable file
View File

@ -0,0 +1,12 @@
cd ../../engine/bin/
rm -Rf Godot.app
rm -f Godot.app.zip
cp -r ../misc/dist/osx_tools.app Godot.app
mkdir -p Godot.app/Contents/MacOS
cp godot.osx.opt.tools.universal Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
zip -q -r Godot.app.zip Godot.app/*
cd ../../tools/osx/

View File

@ -0,0 +1,12 @@
#templates
cd ../../engine/bin
cp -r ../misc/dist/osx_template.app .
mkdir -p osx_template.app/Contents/MacOS
cp godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
cp godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
chmod +x osx_template.app/Contents/MacOS/godot_osx*
zip -q -9 -r osx.zip osx_template.app
cd ../../tools/osx

6
tools/osx/lipo.sh Executable file
View File

@ -0,0 +1,6 @@
# Tools
lipo -create ../../engine/bin/godot.osx.opt.tools.x86_64 ../../engine/bin/godot.osx.opt.tools.arm64 -output ../../engine/bin/godot.osx.opt.tools.universal
# Export Templates
lipo -create ../../engine/bin/godot.osx.opt.x86_64 ../../engine/bin/godot.osx.opt.arm64 -output ../../engine/bin/godot.osx.opt.universal
lipo -create ../../engine/bin/godot.osx.opt.debug.x86_64 ../../engine/bin/godot.osx.opt.debug.arm64 -output ../../engine/bin/godot.osx.opt.debug.universal

View File

@ -0,0 +1,48 @@
cd ../../engine/bin/
files=(
# Windows
"godot.windows.opt.64.exe"
"godot.windows.opt.debug.64.exe"
"godot.windows.opt.tools.64.exe"
# Linux
"godot.x11.opt.64"
"godot.x11.opt.debug.64"
"godot.x11.opt.tools.64"
# JS
"godot.javascript.opt.tools.threads.zip"
"godot.javascript.opt.zip"
# Android
"android_debug.apk"
"android_release.apk"
# OSX - Editor
"Godot.app.zip"
# OSX - export templates
"osx.zip"
# Pi4
"godot.x11.pi4.opt.32"
"godot.x11.pi4.opt.debug.32"
"godot.x11.pi4.opt.tools.32"
)
error=0
for f in ${files[*]}
do
if [ ! -e $f ]; then
error=1
echo "$f is not present!"
fi
done
if [ $error -eq 0 ]; then
echo "All files are present!"
fi
cd ../..