mirror of
https://github.com/godotengine/godot-build-scripts.git
synced 2026-01-04 02:09:44 +03:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bf3bab772 | ||
|
|
d381d33b8e | ||
|
|
dea7aa483e | ||
|
|
9da8d72dfe | ||
|
|
4e25acea96 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,9 +4,10 @@ config.sh
|
|||||||
|
|
||||||
# Generated by build scripts
|
# Generated by build scripts
|
||||||
angle/
|
angle/
|
||||||
|
deps/
|
||||||
git/
|
git/
|
||||||
mono-glue/
|
mono-glue/
|
||||||
godot.tar.gz
|
godot*.tar.gz
|
||||||
angle.7z
|
angle.7z
|
||||||
|
|
||||||
# Output
|
# Output
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ export OPTIONS="production=yes"
|
|||||||
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
|
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
|
||||||
export TERM=xterm
|
export TERM=xterm
|
||||||
|
|
||||||
|
${ANDROID_SDK_ROOT}/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" 'platforms;android-30'
|
||||||
|
|
||||||
rm -rf godot
|
rm -rf godot
|
||||||
mkdir godot
|
mkdir godot
|
||||||
cd godot
|
cd godot
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ mkdir -p ${templatesdir_mono}
|
|||||||
|
|
||||||
# Tarball
|
# Tarball
|
||||||
|
|
||||||
zcat godot.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz
|
zcat godot-${godot_version}.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz
|
||||||
pushd ${reldir}
|
pushd ${reldir}
|
||||||
sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
|
sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
|
||||||
popd
|
popd
|
||||||
@@ -293,17 +293,19 @@ if [ "${build_classical}" == "1" ]; then
|
|||||||
|
|
||||||
## UWP (Classical) ##
|
## UWP (Classical) ##
|
||||||
|
|
||||||
if [ ! -d "angle" ]; then
|
if [ ! -d "deps/angle" ]; then
|
||||||
echo "Downloading ANGLE binaries from https://github.com/GodotBuilder/godot-builds/releases/tag/_tools"
|
echo "Downloading ANGLE binaries from https://github.com/GodotBuilder/godot-builds/releases/tag/_tools"
|
||||||
|
mkdir -p deps && cd deps
|
||||||
curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z
|
curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z
|
||||||
7z x angle.7z && rm -f angle.7z
|
7z x angle.7z && rm -f angle.7z
|
||||||
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf uwp_template_*
|
rm -rf uwp_template_*
|
||||||
for arch in ARM Win32 x64; do
|
for arch in ARM Win32 x64; do
|
||||||
cp -r git/misc/dist/uwp_template uwp_template_${arch}
|
cp -r git/misc/dist/uwp_template uwp_template_${arch}
|
||||||
cp angle/winrt/10/src/Release_${arch}/libEGL.dll \
|
cp deps/angle/winrt/10/src/Release_${arch}/libEGL.dll \
|
||||||
angle/winrt/10/src/Release_${arch}/libGLESv2.dll \
|
deps/angle/winrt/10/src/Release_${arch}/libGLESv2.dll \
|
||||||
uwp_template_${arch}/
|
uwp_template_${arch}/
|
||||||
cp -r uwp_template_${arch} uwp_template_${arch}_debug
|
cp -r uwp_template_${arch} uwp_template_${arch}_debug
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ tar xf /root/godot.tar.gz --strip-components=1
|
|||||||
# Classical
|
# Classical
|
||||||
|
|
||||||
if [ "${CLASSICAL}" == "1" ]; then
|
if [ "${CLASSICAL}" == "1" ]; then
|
||||||
echo "Starting classical build for Server..."
|
echo "Starting classical build for UWP..."
|
||||||
|
|
||||||
for arch in ${BUILD_ARCHES}; do
|
for arch in ${BUILD_ARCHES}; do
|
||||||
for release in release release_debug; do
|
for release in release release_debug; do
|
||||||
|
|||||||
26
build.sh
26
build.sh
@@ -104,6 +104,16 @@ if [ -z "${godot_version}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
IFS=- read version status <<< "$godot_version"
|
||||||
|
echo "Building Godot ${version} ${status} from commit or branch ${git_treeish}."
|
||||||
|
read -p "Is this correct (y/n)? " choice
|
||||||
|
case "$choice" in
|
||||||
|
y|Y ) echo "yes";;
|
||||||
|
n|N ) echo "No, aborting."; exit 0;;
|
||||||
|
* ) echo "Invalid choice, aborting."; exit 1;;
|
||||||
|
esac
|
||||||
|
export GODOT_VERSION_STATUS="${status}"
|
||||||
|
|
||||||
if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then
|
if [ ! -z "${username}" ] && [ ! -z "${password}" ]; then
|
||||||
if ${podman} login ${registry} -u "${username}" -p "${password}"; then
|
if ${podman} login ${registry} -u "${username}" -p "${password}"; then
|
||||||
export logged_in=true
|
export logged_in=true
|
||||||
@@ -147,18 +157,18 @@ if [ "${skip_git_checkout}" == 0 ]; then
|
|||||||
correct_version=$(python3 << EOF
|
correct_version=$(python3 << EOF
|
||||||
import version;
|
import version;
|
||||||
if hasattr(version, "patch") and version.patch != 0:
|
if hasattr(version, "patch") and version.patch != 0:
|
||||||
git_version = f"{version.major}.{version.minor}.{version.patch}-{version.status}"
|
git_version = f"{version.major}.{version.minor}.{version.patch}"
|
||||||
else:
|
else:
|
||||||
git_version = f"{version.major}.{version.minor}-{version.status}"
|
git_version = f"{version.major}.{version.minor}"
|
||||||
print(git_version == "${godot_version}")
|
print(git_version == "${version}")
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
if [[ "$correct_version" != "True" ]]; then
|
if [[ "$correct_version" != "True" ]]; then
|
||||||
echo "Version in version.py doesn't match the passed ${godot_version}."
|
echo "Version in version.py doesn't match the passed ${version}."
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git archive --format=tar $git_treeish --prefix=godot-${godot_version}/ | gzip > ../godot.tar.gz
|
sh misc/scripts/make_tarball.sh -v ${godot_version} -g ${git_treeish}
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -166,7 +176,7 @@ export basedir="$(pwd)"
|
|||||||
mkdir -p ${basedir}/out
|
mkdir -p ${basedir}/out
|
||||||
mkdir -p ${basedir}/out/logs
|
mkdir -p ${basedir}/out/logs
|
||||||
|
|
||||||
export podman_run="${podman} run -it --rm --env BUILD_NAME --env NUM_CORES --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
|
export podman_run="${podman} run -it --rm --env BUILD_NAME --env GODOT_VERSION_STATUS --env NUM_CORES --env CLASSICAL=${build_classical} --env MONO=${build_mono} -v ${basedir}/godot-${godot_version}.tar.gz:/root/godot.tar.gz -v ${basedir}/mono-glue:/root/mono-glue -w /root/"
|
||||||
export img_version=3.x-mono-6.12.0.122
|
export img_version=3.x-mono-6.12.0.122
|
||||||
|
|
||||||
# Get AOT compilers from their containers.
|
# Get AOT compilers from their containers.
|
||||||
@@ -205,5 +215,5 @@ mkdir -p ${basedir}/out/uwp
|
|||||||
${podman_run} --ulimit nofile=32768:32768 -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp
|
${podman_run} --ulimit nofile=32768:32768 -v ${basedir}/build-uwp:/root/build -v ${basedir}/out/uwp:/root/out ${registry}/godot-private/uwp:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/uwp
|
||||||
|
|
||||||
if [ ! -z "$SUDO_UID" ]; then
|
if [ ! -z "$SUDO_UID" ]; then
|
||||||
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/out ${basedir}/mono-glue ${basedir}/godot.tar.gz
|
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user