91 Commits
3.1 ... 3.3

Author SHA1 Message Date
Rémi Verschelde
5bf3bab772 Android: Install platform30 manually
Just because I didn't feel like rebuild the Android container used for 3.3.
2021-09-29 09:27:01 +02:00
Rémi Verschelde
d381d33b8e Minor fixes (typo, fix git owner too)
(cherry picked from commit a2e4b98977)
2021-08-16 18:41:59 +02:00
Rémi Verschelde
dea7aa483e Fix release tarball folder name after #44
(cherry picked from commits e11c111d4a
and b801e7174c)
2021-08-04 13:43:27 +02:00
Rémi Verschelde
9da8d72dfe Move ANGLE download to deps directory
We'll reuse it in 4.0 for MoltenVK.

(cherry picked from commit 6824ba765b)
2021-08-03 10:46:31 +02:00
Rémi Verschelde
4e25acea96 Make tarball with Git hash info, use env status override
Depends on https://github.com/godotengine/godot/pull/51001 and
https://github.com/godotengine/godot/pull/51002, see the PRs for details.

(cherry picked from commit f2e9922e2d)
2021-08-03 10:46:13 +02:00
Rémi Verschelde
f6ddb4e192 Merge pull request #39 from godotengine/javascript-rename-EMSDK-vars
JavaScript: Rename EMSDK env vars, `emsdk_env.sh` nukes them
2021-05-16 17:49:08 +02:00
Rémi Verschelde
2bdb21c164 JavaScript: Rename EMSDK env vars, emsdk_env.sh nukes them
Companion commit to https://github.com/godotengine/build-containers/pull/81.
2021-05-16 17:48:31 +02:00
Rémi Verschelde
a94d978de6 Mono glue: Export DISPLAY=:0 to attempt solving occasional failure 2021-05-11 10:48:59 +02:00
Rémi Verschelde
faba7ebc50 Merge pull request #33 from godotengine/linux32-gcc5-static-nolto
Linux 32-bit x86: Use GCC 5, static cpp but no LTO
2021-04-27 15:17:13 +02:00
Rémi Verschelde
9f2d00d177 Linux 32-bit x86: Use GCC 5, static cpp but no LTO
See https://github.com/godotengine/build-containers/pull/79.

Also fixup our CC and CXX overrides which were not doing what was expected.
The i386 builds did use GCC 9 too due to manual creation of symlinks in the
build container.

See https://godotforums.org/discussion/comment/48209/#Comment_48209
2021-04-26 13:30:37 +02:00
Rémi Verschelde
ba0aa611d5 Mono glue: Use dummy audio driver to silence errors 2021-04-20 12:19:43 +02:00
Rémi Verschelde
2e84f0b015 macOS signing: Prefix local variables with _ to prevent overriding globals 2021-04-06 17:06:51 +02:00
Rémi Verschelde
162cced016 Merge pull request #30 from godotengine/osx-dummy-sign-templates
OSX: Dummy sign templates with linker-signed
2021-03-30 09:26:03 +02:00
Rémi Verschelde
01bf08cd9b OSX: Dummy sign templates with linker-signed
This should fix potentially improper signing done by osxcross,
and allow running those on Apple M1.
2021-03-29 21:23:57 +02:00
Rémi Verschelde
2d656c918b OSX: Cosmetic change to build-release.sh signing routine 2021-03-29 21:23:30 +02:00
Rémi Verschelde
39d2591051 Merge pull request #29 from godotengine/mono-6.12.0.122
Use images version 3.x-mono-6.12.0.122
2021-03-28 13:58:51 +02:00
Rémi Verschelde
9d80bcad67 Use images version 3.x-mono-6.12.0.122
Follow-up to https://github.com/godotengine/build-containers/pull/77.

OSX/iOS: Now using Xcode 12.4 and newer osxcross
`NO_LDID` no longer needed as osxcross is no longer fake-signing with LDID.
2021-03-28 01:34:12 +01:00
Rémi Verschelde
78d64f285a macOS: Disable LDID fake signing for arm64
It doesn't work and makes it impossible to sign binaries properly
without using --force.
2021-03-28 01:26:44 +01:00
Rémi Verschelde
e0d7b61e0e Strip Linux and macOS binaries in addition to Windows ones
For other platforms:

- Android is stripped by gradle already.
- HTML5 already has stripped release builds.
  Debug builds could be stripped with fastcomp's wasm-strip but it might be
  deprecated?
- iOS is a static lib and shouldn't be stripped.
- UWP can't be stripped by default GNU strip it seems.
2021-03-28 01:26:44 +01:00
Rémi Verschelde
55373a69fb macOS: Make notarization waiting loop more reliable
The previous one would sometime return early even though it's still 'in progress'.
Hopefully this command is more reliable.
2021-03-28 01:26:44 +01:00
Rémi Verschelde
e4c94535c7 Merge pull request #28 from Faless/js/editor_zip
[HTML5] Produce the editor zip in release folder.
2021-03-14 12:25:39 +01:00
Fabio Alessandrelli
236efef7aa [HTML5] Produce the editor zip in release folder.
It's time we start distributing the web editor as self-hostable
application if so desired.
2021-03-14 12:00:15 +01:00
Rémi Verschelde
365596d3f0 Fix Mono Windows signing after #24 2021-03-09 08:35:06 +01:00
Rémi Verschelde
38be71ef26 Merge pull request #27 from bruvzg/macos_gdn_load
Add `Disable Library Validation` entitlement.
2021-03-09 08:33:23 +01:00
bruvzg
6e1556cf2b Add Disable Library Validation entitlement to allow loading GDNative plug-ins, without requiring code signing. 2021-03-09 08:14:29 +02:00
Rémi Verschelde
8d9ed90058 Merge pull request #26 from goostengine/gitignore-angle
Add `angle.7z` to `.gitignore`
2021-03-06 18:14:03 +01:00
Rémi Verschelde
2e2fa65c67 Merge pull request #25 from goostengine/config-build-name
Make `BUILD_NAME` globally configurable
2021-03-06 16:21:59 +01:00
Andrii Doroshenko (Xrayez)
f40716e53e Make BUILD_NAME globally configurable 2021-03-06 17:16:24 +02:00
Andrii Doroshenko (Xrayez)
33c8511a37 Add angle.7z to .gitignore
Generated by UWP build scripts.
2021-03-06 17:03:18 +02:00
Rémi Verschelde
f3a5097159 Merge pull request #24 from godotengine/macos-mono-codesign
Mono/macOS: Change .app packaging and codesign editor binary
2021-03-04 15:55:25 +01:00
Rémi Verschelde
c371cddcb5 Mono/macOS: Codesign the editor binary
Using --deep to also sign the AOT cross-compilers.
2021-03-04 15:19:10 +01:00
Rémi Verschelde
a5d0f200b2 Mono/macOS: Change .app packaging following https://github.com/godotengine/godot/pull/43768
This allows signing the editor .app (will be done in next commit) and should
let users sign their macOS exports.

Co-authored-by: Shane Liesegang <shane@techie.net>
2021-03-04 15:19:10 +01:00
Rémi Verschelde
e0da42acd5 Merge pull request #23 from naithar/fix/macos-editor-entitlements
macOS editor entitlements
2021-03-02 13:25:44 +01:00
Sergey Minakov
6499c248c1 macOS runtime entitlements
Enables permission request to camera and microphone for signed .app
2021-02-28 03:55:09 +03:00
Rémi Verschelde
abe22bbfcb Fix permissions on generated files/folders when running as sudo 2021-02-24 12:01:06 +01:00
Rémi Verschelde
5bc7435255 Merge pull request #22 from godotengine/production-settings
Use new production=yes option
2021-02-22 14:43:23 +01:00
Rémi Verschelde
2190e23987 Use new production=yes option
Equivalent to debug_symbols=no use_lto=yes use_static_cpp=yes.
We keep LTO disabled for iOS as users need to relink on deploy, and that's very slow
and memory hungry with LTO.
2021-02-22 12:13:13 +01:00
Rémi Verschelde
37ecf63e62 Merge pull request #19 from godotengine/linux32-use-gcc4.8
Linux: Use GCC 4.8 for 32-bit x86
2021-02-22 12:13:04 +01:00
Rémi Verschelde
0a5547b12c Linux: Use GCC 4.8 for 32-bit x86
Also remove the definition of use_static_cpp as this is now done
automatically in the SCons script.
2021-02-22 12:09:31 +01:00
Rémi Verschelde
02510df163 Merge pull request #20 from Faless/js/editor
[HTML5] Add tools builds to release scripts.
2021-02-12 20:24:16 +01:00
Fabio Alessandrelli
21da21455b [HTML5] Add tools builds to release scripts.
Will unpack the zip, compress each file with brotli, and place them into
the `web` folder (to be uploaded to the web editor host server).
2021-02-12 19:15:13 +01:00
Hein-Pieter van Braam-Stewart
1dddb1fb3a Add support for signing OSX binaries
Note this requires a real mac (for now)
2021-02-12 17:52:15 +01:00
Rémi Verschelde
7024ac71f9 Merge pull request #18 from godotengine/ios-plugins-3.2.4
iOS: arkit and camera no longer built here as of 3.2.4
2021-01-27 21:09:25 +01:00
Rémi Verschelde
6bee8dec2e iOS: arkit and camera no longer built here as of 3.2.4 2021-01-27 21:08:23 +01:00
Rémi Verschelde
cab5d6f3c8 Merge pull request #17 from godotengine/versions-update
Mono 6.12.0.114, EMSDK values now defined in container
2021-01-27 21:07:01 +01:00
Rémi Verschelde
8eae1668f5 Mono 6.12.0.114, EMSDK values now defined in container 2021-01-27 21:05:01 +01:00
Rémi Verschelde
74cc8c712c macOS: Temporarily build Mono without ARM64
We don't have containers with ARM64 Mono yet.
This can be reverted once we do.
2020-12-10 21:20:33 +01:00
Rémi Verschelde
0d85e09ebd Merge pull request #14 from godotengine/js-threads-gdnative
JS: Build with threads and gdnative where supported + re-enable LTO
2020-12-10 14:26:20 +01:00
Rémi Verschelde
1bd06975a9 JS: Build with threads and gdnative where supported
Classical builds now use Emscripten 2.0.10 and have threads and gdnative
templates.

Mono builds still use Emscripten 1.39.9 for compatibility with Mono 6.12.x, so
they cannot have GDNative support which requires 2.0.10+. And threads build
triggers wasm-ld errors without LTO, and wasm-ld crash with LTO, so no dice
there either.

Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2020-12-10 12:28:33 +01:00
Rémi Verschelde
37d7666b7b JS: Re-enable LTO for classical builds
I had done this locally already but somehow forgot to commit and lost the changes,
so re-doing.

Not enabling it for Mono builds as it causes errors (or crashes with threads enabled)
with Emscripten 1.39.9.
2020-12-10 12:27:51 +01:00
Rémi Verschelde
fe6e7b1e4e Use GCC 9 on Linux 2020-12-10 10:15:30 +01:00
Rémi Verschelde
744b520910 Skip download by default 2020-11-26 16:21:11 +01:00
Rémi Verschelde
463b957716 Merge pull request #10 from godotengine/macos-arm64
OSX: Build universal binaries with ARM64
2020-11-20 17:18:08 +01:00
Rémi Verschelde
c44015dcec OSX: Build universal binaries with ARM64 2020-11-19 13:09:49 +01:00
Rémi Verschelde
9ddda05e01 Build against containers with Xcode 12.0.1 2020-11-19 13:07:35 +01:00
Rémi Verschelde
046ad85d00 Bump image version to 3.2-mono-6.12.0.111 2020-11-19 13:06:11 +01:00
Rémi Verschelde
279085ccce JS: Disable LTO again, doesn't work with emscripten 1.38.47-upstream
I'll re-enable it later once I find time to upgrade the containers for a more recent Mono
version and the matching Emscripten version.
2020-09-01 13:30:50 +02:00
Rémi Verschelde
4797f217f0 Merge pull request #12 from Faless/js/lto
JavaScript: Enable lto.
2020-08-27 23:51:20 +02:00
Fabio Alessandrelli
964f9ca78f JavaScript: Enable lto. 2020-08-27 22:26:46 +01:00
Rémi Verschelde
7a413ea5ec UWP: Use NUM_CORES instead of hardcoding -j4, it seems to work 2020-07-31 13:30:10 +02:00
Rémi Verschelde
4b05de4339 build.sh: Validation version in Git repo to prevent mismatch 2020-07-31 13:29:23 +02:00
Rémi Verschelde
3a3777b4db Merge pull request #9 from godotengine/android-aar-mono
Android: Add .mono suffix for the Mono-enabled AAR
2020-06-22 08:47:35 +02:00
Rémi Verschelde
e365a856d3 Merge pull request #8 from godotengine/mono-ubuntu-cil
Mono: Workaround segfault issue with Mono MSBuild on Ubuntu 14.04
2020-06-22 08:47:26 +02:00
Rémi Verschelde
5167633b6a Android: Add .mono suffix for the Mono-enabled AAR 2020-06-22 08:45:39 +02:00
Rémi Verschelde
5a7ffb3722 Mono: Workaround segfault issue with Mono MSBuild on Ubuntu 14.04
Using the dotnet CLI can be a valid workaround, but it's not available
for 32-bit Linux.

Instead, we build the Godot API and GodotTools solutions (CIL) on Fedora
in the mono-glue container, and copy them to the Ubuntu-based Linux
containers.
2020-06-05 13:47:37 +02:00
Rémi Verschelde
4d8e6dcb49 Android: Include 'status' in AAR lib name
Follow-up to https://github.com/godotengine/godot-build-scripts/issues/6#issuecomment-635962906.
2020-06-05 13:32:09 +02:00
Rémi Verschelde
7b2cf596dc Merge pull request #7 from godotengine/android-lib-standalone
Android: Provide godot-lib.release.aar in download folder
2020-05-22 11:30:42 +02:00
Rémi Verschelde
313cd37206 Android: Provide godot-lib.release.aar in download folder
Closes #6.
2020-05-22 10:53:47 +02:00
Rémi Verschelde
c53fb590aa Merge pull request #5 from godotengine/add-sha512-sums
Compute and backup SHA-512 sums for release files
2020-05-07 14:58:50 +02:00
Rémi Verschelde
9176967e98 Compute and backup SHA-512 sums for release files
The sums are included both in the release folder, and in a separate
`sha512sums` folder in the base directory, to allow verifying that
the sums on the download repository haven't been tampered with.
2020-05-07 14:50:24 +02:00
Rémi Verschelde
d93b0785a8 Merge pull request #4 from godotengine/merge-release-templates
Merge build-templates.sh into build-release.sh
2020-05-07 14:49:51 +02:00
Rémi Verschelde
4e6b7462b6 Merge build-templates.sh into build-release.sh
Having the two separated was a bit redundant.
2020-05-07 14:45:52 +02:00
Rémi Verschelde
ee823e5177 Merge pull request #3 from godotengine/mono-ios
Mono: Add support for iOS
2020-04-16 11:05:55 +02:00
Rémi Verschelde
0341022b36 Mono: Add support for iOS 2020-04-16 11:04:42 +02:00
Rémi Verschelde
1da72c73c3 Use local images version 3.2-mono-6.6.0.166
This is a hack I've been keeping locally for a while but now I need to
commit it to make other changes.

This should be refactored to allow selecting either registry or local
images without having to hack the build script.
2020-04-14 17:07:22 +02:00
Rémi Verschelde
bb7dfba9e7 Add MIT license 2020-02-26 11:24:01 +01:00
Rémi Verschelde
651e5be851 Add README.md with some introduction 2020-02-26 11:22:54 +01:00
Rémi Verschelde
751b30283e Disable signing of Windows/UWP export templates
This causes issues for people who want to embed the PCK,
change PE data with rcedit or sign the executable themselves.

See godotengine/godot#32310 and godotengine/godot#33466.
2020-01-22 09:35:20 +01:00
Rémi Verschelde
3319757d9d Linux: Disable use_static_cpp for 32-bit
The binaries seem to crash on Ubuntu 18.04 i386 when using it.
2020-01-16 23:59:23 +01:00
Rémi Verschelde
b4e081345c OSX: Don't re-copy config, it's already taken from there in the build 2020-01-10 10:58:50 +01:00
Rémi Verschelde
930cdb67c7 Mono: Add net_4_x_win and net_4_x BCLs to templates
Also accommodate recent change with mono-glue files.
2020-01-07 14:48:22 +01:00
Rémi Verschelde
b2b7bea05f Templates: Fix zip having full pwd instead of templates/ parent
Was a regression from #2.
2019-12-18 17:06:38 +01:00
Rémi Verschelde
340eba3966 Android: Fix packaging of Mono.Android with the bcl 2019-12-18 15:25:50 +01:00
Rémi Verschelde
4d14345d37 Fix parsing of -b option with OPTARG
Follow-up to #2.
2019-12-18 10:54:01 +01:00
Rémi Verschelde
1f7430025d Sync .gitignore with changes from #2 2019-12-13 20:10:37 +01:00
Rémi Verschelde
0ef67e8796 Merge pull request #2 from godotengine/classical-mono-optional
Refactor build scripts to allow building only Classical or Mono
2019-12-13 20:08:05 +01:00
Rémi Verschelde
067d3f3a49 Refactor build scripts to allow building only Classical or Mono
The in-container build scripts now get passed CLASSICAL and MONO env
variables which can be used to build one or the other, or both
(default).

`build.sh`, `build-release.sh` and `build-templates.sh` now all expect
command line switches to specify the version details, and optionally
which flavor to build.

For example to build Mono only:

  ./build.sh -v 3.2-beta4 -g master -b mono
  ./build-release.sh -v 3.2-beta4 -b mono
  ./build-templates.sh -v 3.2-beta4 -t 3.2.beta4 -b mono

Also took the opportunity to do some extra cleanup, like removing
unnecessary `builtin_*` options since they all default to True, even
for Linux in 3.2, as well as `use_lto` and `use_static_cpp` options
on platforms which don't implement them.

And I improved the `build-release.sh` script to be a bit easier to
read, and avoid having too many stray folders to cleanup.
The build scripts should now generate the final structure that we'd use
on the official mirrors, with the `mono` distribution as a subfolder of
the main release folder.
2019-12-13 20:05:40 +01:00
Rémi Verschelde
7b376804d7 iOS: Handle split arkit/camera modules 2019-12-13 13:10:00 +01:00
Rémi Verschelde
77091a9872 Mono: WebAssembly and Server builds, pack BCL 2019-12-02 10:06:49 +01:00
Rémi Verschelde
84f058dd24 Update macOS and iOS to darwin18 osxcross SDK 2019-12-02 10:01:14 +01:00
Rémi Verschelde
0c2d825451 Port build scripts for Godot 3.2 / master branch
- Add Mono builds for Android.
- Remove now unused `MONO*_PREFIX` env variables (replaced by `mono_prefix`
  command line option).
- Update iOS to SDK 12.4 and darwin17 for proper ARKit support.
- Drop 32-bit support for iOS (armv7, x86).
2019-12-02 09:59:49 +01:00
18 changed files with 1107 additions and 503 deletions

11
.gitignore vendored
View File

@@ -4,12 +4,15 @@ config.sh
# Generated by build scripts
angle/
deps/
git/
mono-glue/
godot.tar.gz
godot*.tar.gz
angle.7z
# Output
mono/
out/
release-*/
templates/
releases/
sha512sums/
tmp/
web/

19
LICENSE.txt Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2019-2020 Godot Engine contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

34
README.md Normal file
View File

@@ -0,0 +1,34 @@
# Godot in-container build scripts
Build scripts used for official Godot Engine releases using containers
built from https://github.com/godotengine/build-containers
## Disclaimer
This repository is **not** intended for end users, and thus not
supported. It's only public as a way to document our build workflow,
and for anyone to use as reference for their own buildsystems.
We will eventually release a public build script that integrates all
this in a simple and user-friendly interface.
## Usage
- Build containers using https://github.com/godotengine/build-containers
- Copy `config.sh.in` as `config.sh` and configure it as you want.
- Edit `build.sh` to properly reference those containers if local, or
use `config.sh` to point to your own registry if you uploaded
containers.
- Build with `build.sh` (check `--help` for usage).
- Package binaries with `build-release.sh` (check `--help` for usage).
Example that builds Godot 3.2-stable Classical (not Mono):
```
./build.sh -v 3.2-stable -g 3.2-stable -b classical
./build-release.sh -v 3.2-stable -t 3.2.stable -b classical
```
Again, this is intended for release managers and usability is not the
main focus. Tweak the build scripts to match your own requirements if
you want to use this until we provide a better, user-friendly
interface.

View File

@@ -2,33 +2,81 @@
set -e
export BUILD_NAME=official
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=no"
export TERM=xterm
export ANDROID_HOME=/root/
export ANDROID_NDK_ROOT=/root/ndk-bundle/
${ANDROID_SDK_ROOT}/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_SDK_ROOT}" 'platforms;android-30'
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release
# Classical
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Android..."
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=armv7 $OPTIONS tools=no target=release
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=arm64v8 $OPTIONS tools=no target=release
pushd platform/android/java
./gradlew build
popd
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=x86 $OPTIONS tools=no target=release
cp bin/*.apk /root/out
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release_debug
$SCONS platform=android android_arch=x86_64 $OPTIONS tools=no target=release
pushd platform/android/java
./gradlew generateGodotTemplates
popd
mkdir -p /root/out/templates
cp bin/android_source.zip /root/out/templates
cp bin/android_debug.apk /root/out/templates/android_debug.apk
cp bin/android_release.apk /root/out/templates/android_release.apk
cp bin/godot-lib.release.aar /root/out/templates/godot-lib.release.aar
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Android..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armeabi-v7a-release tools=no target=release_debug
$SCONS platform=android android_arch=armv7 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-armeabi-v7a-release tools=no target=release
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64-v8a-release tools=no target=release_debug
$SCONS platform=android android_arch=arm64v8 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-arm64-v8a-release tools=no target=release
$SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release_debug
$SCONS platform=android android_arch=x86 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86-release tools=no target=release
$SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release_debug
$SCONS platform=android android_arch=x86_64 $OPTIONS $OPTIONS_MONO mono_prefix=/root/mono-installs/android-x86_64-release tools=no target=release
pushd platform/android/java
./gradlew generateGodotTemplates
popd
mkdir -p /root/out/templates-mono
cp bin/android_source.zip /root/out/templates-mono
cp bin/android_debug.apk /root/out/templates-mono/android_debug.apk
cp bin/android_release.apk /root/out/templates-mono/android_release.apk
cp bin/godot-lib.release.aar /root/out/templates-mono/godot-lib.release.aar
mkdir -p /root/out/templates-mono/bcl
cp -r /root/mono-installs/android-bcl/* /root/out/templates-mono/bcl/
fi
echo "Android build successful"

View File

@@ -2,36 +2,78 @@
set -e
export BUILD_NAME=official
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export IOS_SDK="11.2"
export OPTIONS="osxcross_sdk=darwin15 builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes"
# Keep LTO disabled for iOS - it works but it makes linking apps on deploy very slow,
# which is seen as a regression in the current workflow.
export OPTIONS="production=yes use_lto=no"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
export OSXCROSS_IOS=not_nothing
export IOS_SDK="14.4"
export IOS_LIPO="/root/ioscross/arm64/bin/arm-apple-darwin11-lipo"
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
$SCONS platform=iphone $OPTIONS arch=arm tools=no target=release_debug IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
# Classical
$SCONS platform=iphone $OPTIONS arch=arm tools=no target=release IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for iOS..."
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release_debug IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release_debug \
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release \
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=iphone $OPTIONS arch=arm64 tools=no target=release IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release_debug \
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release \
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
$SCONS platform=iphone $OPTIONS arch=x86 tools=no target=release_debug IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
mkdir -p /root/out/templates
$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/templates/libgodot.iphone.opt.fat
$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/templates/libgodot.iphone.opt.debug.fat
fi
$SCONS platform=iphone $OPTIONS arch=x86 tools=no target=release IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
# Mono
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release_debug IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for iOS..."
$SCONS platform=iphone $OPTIONS arch=x86_64 tools=no target=release IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
/root/ioscross/arm64/bin/arm-apple-darwin11-lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/libgodot.iphone.opt.fat
/root/ioscross/arm64/bin/arm-apple-darwin11-lipo -create bin/libgodot.iphone.opt.debug.arm.a bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/libgodot.iphone.opt.debug.fat
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 mono_prefix=/root/mono-installs/ios-arm64-release tools=no target=release_debug \
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=arm64 mono_prefix=/root/mono-installs/ios-arm64-release tools=no target=release \
IPHONESDK="/root/ioscross/arm64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/arm64/" ios_triple="arm-apple-darwin11-"
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release_debug \
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
$SCONS platform=iphone $OPTIONS $OPTIONS_MONO arch=x86_64 mono_prefix=/root/mono-installs/ios-x86_64-release tools=no target=release \
IPHONESDK="/root/ioscross/x86_64/SDK/iPhoneOS${IOS_SDK}.sdk" IPHONEPATH="/root/ioscross/x86_64/" ios_triple="x86_64-apple-darwin11-"
mkdir -p /root/out/templates-mono
$IOS_LIPO -create bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.a -output /root/out/templates-mono/libgodot.iphone.opt.fat
$IOS_LIPO -create bin/libgodot.iphone.opt.debug.arm64.a bin/libgodot.iphone.opt.debug.x86_64.a -output /root/out/templates-mono/libgodot.iphone.opt.debug.fat
mkdir -p /root/out/templates-mono/iphone-mono-libs
$IOS_LIPO -create bin/libmonosgen-2.0.iphone.arm64.a bin/libmonosgen-2.0.iphone.x86_64.a -output /root/out/templates-mono/iphone-mono-libs/libmonosgen-2.0.iphone.fat.a
$IOS_LIPO -create bin/libmono-native.iphone.arm64.a bin/libmono-native.iphone.x86_64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-native.iphone.fat.a
$IOS_LIPO -create bin/libmono-profiler-log.iphone.arm64.a bin/libmono-profiler-log.iphone.x86_64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-profiler-log.iphone.fat.a
# The Mono libraries for the interpreter are not available for simulator builds
$IOS_LIPO -create bin/libmono-ee-interp.iphone.arm64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-ee-interp.iphone.fat.a
$IOS_LIPO -create bin/libmono-icall-table.iphone.arm64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-icall-table.iphone.fat.a
$IOS_LIPO -create bin/libmono-ilgen.iphone.arm64.a -output /root/out/templates-mono/iphone-mono-libs/libmono-ilgen.iphone.fat.a
mkdir -p /root/out/templates-mono/bcl
cp -r /root/mono-installs/ios-bcl/* /root/out/templates-mono/bcl
fi
echo "iOS build successful"

View File

@@ -2,20 +2,66 @@
set -e
export BUILD_NAME=official
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
# Config
source /root/emsdk/emsdk_env.sh
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/mono-installs/wasm-runtime-release use_lto=no"
export TERM=xterm
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no
$SCONS platform=javascript ${OPTIONS} target=release tools=no
# Classical
cp -rvp bin/* /root/out/
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for JavaScript..."
source /root/emsdk_${EMSCRIPTEN_CLASSICAL}/emsdk_env.sh
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no
$SCONS platform=javascript ${OPTIONS} target=release tools=no
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no threads_enabled=yes
$SCONS platform=javascript ${OPTIONS} target=release tools=no threads_enabled=yes
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=no gdnative_enabled=yes
$SCONS platform=javascript ${OPTIONS} target=release tools=no gdnative_enabled=yes
mkdir -p /root/out/templates
cp -rvp bin/*.zip /root/out/templates
rm -f bin/*.zip
$SCONS platform=javascript ${OPTIONS} target=release_debug tools=yes threads_enabled=yes use_closure_compiler=yes
mkdir -p /root/out/tools
cp -rvp bin/*.zip /root/out/tools
rm -f bin/*.zip
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for JavaScript..."
source /root/emsdk_${EMSCRIPTEN_MONO}/emsdk_env.sh
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release_debug tools=no
$SCONS platform=javascript ${OPTIONS} ${OPTIONS_MONO} target=release tools=no
mkdir -p /root/out/templates-mono
cp -rvp bin/*.zip /root/out/templates-mono
rm -f bin/*.zip
mkdir -p /root/out/templates-mono/bcl
cp -r /root/mono-installs/wasm-bcl/wasm /root/out/templates-mono/bcl/
fi
echo "JavaScript build successful"

View File

@@ -2,42 +2,67 @@
set -e
export BUILD_NAME=official
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
export MONO32_PREFIX=/usr
export MONO64_PREFIX=/usr
export CC="gcc-8"
export CXX="g++-8"
# For i386 we're still using an old GCC 5 version from Ubuntu 16.04 as
# upgrading the compiler seems to introduce weird issues.
# Since that GCC version is fairly old, let's avoid LTO which wasn't so
# mature at the time.
if [ "$(getconf LONG_BIT)" == "32" ]; then
export OPTIONS="$OPTIONS use_lto=no"
fi
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
cp /root/mono-glue/*.cpp modules/mono/glue
# Classical
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Linux..."
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=no target=release_debug
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS tools=no target=release
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
$SCONS platform=x11 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
$SCONS platform=x11 $OPTIONS tools=no target=release_debug
$SCONS platform=x11 $OPTIONS tools=no target=release
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
fi
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=no target=release_debug
$SCONS platform=x11 CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=no target=release
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Linux..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
mkdir -p bin
cp -r /root/mono-glue/cil/GodotSharp bin/
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
$SCONS platform=x11 $OPTIONS $OPTIONS_MONO tools=no target=release
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
fi
echo "Linux build successful"

View File

@@ -2,48 +2,80 @@
set -e
export BUILD_NAME=official
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="osxcross_sdk=darwin17 builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export OPTIONS="osxcross_sdk=darwin20.2 production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes mono_prefix=/root/dependencies/mono"
export TERM=xterm
export MONO64_PREFIX=/root/dependencies/mono
export PATH=/root/osxcross/target/bin:$PATH
export OSXCROSS_ROOT=/root/osxcross
export STRIP="x86_64-apple-darwin20.2-strip -u -r"
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
cp /root/mono-glue/*.cpp modules/mono/glue
# Classical
$SCONS platform=osx $OPTIONS tools=yes target=release_debug
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for macOS..."
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
$SCONS platform=osx $OPTIONS arch=x86_64 tools=yes target=release_debug
$SCONS platform=osx $OPTIONS arch=arm64 tools=yes target=release_debug
lipo -create bin/godot.osx.opt.tools.x86_64 bin/godot.osx.opt.tools.arm64 -output bin/godot.osx.opt.tools.universal
$STRIP bin/godot.osx.opt.tools.universal
$SCONS platform=osx $OPTIONS tools=no target=release_debug
$SCONS platform=osx $OPTIONS tools=no target=release
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release_debug
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release_debug
lipo -create bin/godot.osx.opt.debug.x86_64 bin/godot.osx.opt.debug.arm64 -output bin/godot.osx.opt.debug.universal
$STRIP bin/godot.osx.opt.debug.universal
$SCONS platform=osx $OPTIONS arch=x86_64 tools=no target=release
$SCONS platform=osx $OPTIONS arch=arm64 tools=no target=release
lipo -create bin/godot.osx.opt.x86_64 bin/godot.osx.opt.arm64 -output bin/godot.osx.opt.universal
$STRIP bin/godot.osx.opt.universal
$SCONS platform=osx $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
fi
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
# Mono
$SCONS platform=osx $OPTIONS $OPTIONS_MONO tools=no target=release_debug
$SCONS platform=osx $OPTIONS $OPTIONS_MONO tools=no target=release
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for macOS..."
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
find /root/out -name config -exec cp /root/dependencies/mono/etc/config {} \;
$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=x86_64 tools=yes target=release_debug copy_mono_root=yes
$STRIP bin/godot.osx.opt.tools.x86_64.mono
#$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=arm64 tools=yes target=release_debug copy_mono_root=yes
#lipo -create bin/godot.osx.opt.tools.x86_64.mono bin/godot.osx.opt.tools.arm64.mono -output bin/godot.osx.opt.tools.universal.mono
#$STRIP bin/godot.osx.opt.tools.universal.mono
echo "MacOS build successful"
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=x86_64 tools=no target=release_debug
$STRIP bin/godot.osx.opt.debug.x86_64.mono
#$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=arm64 tools=no target=release_debug
#lipo -create bin/godot.osx.opt.debug.x86_64.mono bin/godot.osx.opt.debug.arm64.mono -output bin/godot.osx.opt.debug.universal.mono
#$STRIP bin/godot.osx.opt.debug.universal.mono
$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=x86_64 tools=no target=release
$STRIP bin/godot.osx.opt.x86_64.mono
#$SCONS platform=osx $OPTIONS $OPTIONS_MONO arch=arm64 tools=no target=release
#lipo -create bin/godot.osx.opt.x86_64.mono bin/godot.osx.opt.arm64.mono -output bin/godot.osx.opt.universal.mono
#$STRIP bin/godot.osx.opt.universal.mono
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
fi
echo "macOS build successful"

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
</dict>
</plist>

View File

@@ -2,23 +2,38 @@
set -e
export BUILD_NAME=official
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no"
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="debug_symbols=no use_static_cpp=no"
export TERM=xterm
export MONO32_PREFIX=/usr
export MONO64_PREFIX=/usr
export DISPLAY=:0
rm -rf godot
mkdir godot
cd godot
tar xf ../godot.tar.gz --strip-components=1
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-mono-glue /root/mono-glue || /bin/true
# Mono
xvfb-run bin/godot.x11.opt.tools.64.mono --generate-cs-api /tmp/build_GodotSharp || /bin/true
xvfb-run msbuild /tmp/build_GodotSharp/GodotSharp.sln /p:Configuration=Release
mkdir -p /root/mono-glue/Api
cp -r /tmp/build_GodotSharp/GodotSharp/bin/Release/{GodotSharp.dll,GodotSharp.pdb,GodotSharp.xml} /root/mono-glue/Api
cp -r /tmp/build_GodotSharp/GodotSharpEditor/bin/Release/{GodotSharpEditor.dll,GodotSharpEditor.pdb,GodotSharpEditor.xml} /root/mono-glue/Api
if [ "${MONO}" == "1" ]; then
echo "Building and generating Mono glue..."
mono --version
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=no
rm -rf /root/mono-glue/*
xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue /root/mono-glue || /bin/true
# Build and copy CIL that we'll need for Ubuntu 14.04 Linux builds
# to workaround Mono MSBuild segfault in our containers.
xvfb-run bin/godot.x11.opt.tools.64.mono --audio-driver Dummy --generate-mono-glue modules/mono/glue || /bin/true
${SCONS} platform=x11 bits=64 ${OPTIONS} target=release_debug tools=yes module_mono_enabled=yes mono_glue=yes build_cil=yes
mkdir /root/mono-glue/cil
cp -r bin/GodotSharp /root/mono-glue/cil/
fi
echo "Mono glue generated successfully"

View File

@@ -2,12 +2,7 @@
set -e
if [ -z $1 ]; then
echo "Usage: $0 <version>"
echo " For example: $0 3.0.3-rc3"
echo ""
exit 1
fi
# Config
# For signing keystore and password.
source ./config.sh
@@ -19,7 +14,7 @@ else
echo "Disabling binary signing as config.sh does not define the required data."
fi
function sign {
sign_windows() {
if [ $can_sign == 0 ]; then
return
fi
@@ -27,301 +22,507 @@ function sign {
mv $1-signed $1
}
export GODOT_VERSION=$1
sign_macos() {
if [ -z "${OSX_HOST}" ]; then
return
fi
_osx_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
_reldir="$1"
_binname="$2"
_is_mono="$3"
if [[ "${_is_mono}" == "1" ]]; then
_appname="Godot_mono.app"
_entitlements=editor_mono.entitlements
_sharpdir="${_appname}/Contents/Resources/GodotSharp"
_extra_files="${_sharpdir}/Mono/lib/*.dylib ${_sharpdir}/Tools/aot-compilers/*/*"
else
_appname="Godot.app"
_entitlements=editor.entitlements
fi
scp "${_reldir}/${_binname}.zip" "${OSX_HOST}:${_osx_tmpdir}"
scp "${basedir}/build-macosx/${_entitlements}" "${OSX_HOST}:${_osx_tmpdir}"
ssh "${OSX_HOST}" "
cd ${_osx_tmpdir} && \
unzip ${_binname}.zip && \
codesign --force --timestamp \
--options=runtime --entitlements ${_entitlements} \
-s ${OSX_KEY_ID} -v ${_extra_files} ${_appname} && \
zip -r ${_binname}_signed.zip ${_appname}"
_request_uuid=$(ssh "${OSX_HOST}" "xcrun altool --notarize-app --primary-bundle-id \"${OSX_BUNDLE_ID}\" --username \"${APPLE_ID}\" --password \"${APPLE_ID_PASSWORD}\" --file ${_osx_tmpdir}/${_binname}_signed.zip")
_request_uuid=$(echo ${_request_uuid} | sed -e 's/.*RequestUUID = //')
ssh "${OSX_HOST}" "while xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ in\ progress; do echo Waiting on Apple notarization...; sleep 30s; done"
if ! ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\" | grep -q Status:\ success"; then
echo "Notarization failed."
_notarization_log=$(ssh "${OSX_HOST}" "xcrun altool --notarization-info ${_request_uuid} -u \"${APPLE_ID}\" -p \"${APPLE_ID_PASSWORD}\"")
echo "${_notarization_log}"
ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
exit 1
else
ssh "${OSX_HOST}" "
cd ${_osx_tmpdir} && \
xcrun stapler staple ${_appname} && \
zip -r ${_binname}_stapled.zip ${_appname}"
scp "${OSX_HOST}:${_osx_tmpdir}/${_binname}_stapled.zip" "${_reldir}/${_binname}.zip"
ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
fi
}
sign_macos_template() {
if [ -z "${OSX_HOST}" ]; then
return
fi
_osx_tmpdir=$(ssh "${OSX_HOST}" "mktemp -d")
_reldir="$1"
_is_mono="$2"
if [[ "${_is_mono}" == "1" ]]; then
_extra_files="osx_template.app/Contents/Resources/data.mono.*/Mono/lib/*.dylib"
fi
scp "${_reldir}/osx.zip" "${OSX_HOST}:${_osx_tmpdir}"
ssh "${OSX_HOST}" "
cd ${_osx_tmpdir} && \
unzip osx.zip && \
codesign --force -s - \
--options=linker-signed \
-v ${_extra_files} osx_template.app/Contents/MacOS/* && \
zip -r osx_signed.zip osx_template.app"
scp "${OSX_HOST}:${_osx_tmpdir}/osx_signed.zip" "${_reldir}/osx.zip"
ssh "${OSX_HOST}" "rm -rf ${_osx_tmpdir}"
}
godot_version=""
templates_version=""
build_classical=1
build_mono=1
while getopts "h?v:t:b:" opt; do
case "$opt" in
h|\?)
echo "Usage: $0 [OPTIONS...]"
echo
echo " -v godot version (e.g: 3.2-stable) [mandatory]"
echo " -t templates version (e.g. 3.2.stable) [mandatory]"
echo " -b all|classical|mono (default: all)"
echo
exit 1
;;
v)
godot_version=$OPTARG
;;
t)
templates_version=$OPTARG
;;
b)
if [ "$OPTARG" == "classical" ]; then
build_mono=0
elif [ "$OPTARG" == "mono" ]; then
build_classical=0
fi
;;
esac
done
if [ -z "${godot_version}" -o -z "${templates_version}" ]; then
echo "Mandatory argument -v or -t missing."
exit 1
fi
export basedir=$(pwd)
export webdir="${basedir}/web/${godot_version}"
export reldir="${basedir}/releases/${godot_version}"
export reldir_mono="${reldir}/mono"
export tmpdir="${basedir}/tmp"
export templatesdir="${tmpdir}/templates"
export templatesdir_mono="${tmpdir}/mono/templates"
export godot_basename="Godot_v${godot_version}"
# Cleanup and setup
rm -rf ${webdir}
rm -rf ${reldir}
rm -rf ${tmpdir}
mkdir -p ${webdir}
mkdir -p ${reldir}
mkdir -p ${reldir_mono}
mkdir -p ${templatesdir}
mkdir -p ${templatesdir_mono}
# Tarball
mkdir -p release-${GODOT_VERSION}
rm -rf release-${GODOT_VERSION}/*.xz release-${GODOT_VERSION}/*.sha256
zcat godot.tar.gz | xz -c > release-${GODOT_VERSION}/godot-${GODOT_VERSION}.tar.xz
sha256sum release-${GODOT_VERSION}/godot-${GODOT_VERSION}.tar.xz > release-${GODOT_VERSION}/godot-${GODOT_VERSION}.tar.xz.sha256
zcat godot-${godot_version}.tar.gz | xz -c > ${reldir}/godot-${godot_version}.tar.xz
pushd ${reldir}
sha256sum godot-${godot_version}.tar.xz > godot-${godot_version}.tar.xz.sha256
popd
# Linux 64
# Classical
mkdir -p templates
rm -f templates/linux_x11_64*
if [ "${build_classical}" == "1" ]; then
cp out/linux/x64/templates/godot.x11.opt.debug.64 templates/linux_x11_64_debug
cp out/linux/x64/templates/godot.x11.opt.64 templates/linux_x11_64_release
## Linux (Classical) ##
mkdir -p release-${GODOT_VERSION}
rm -f release-${GODOT_VERSION}/*linux*64*
# Editor
binname="${godot_basename}_x11.64"
cp out/linux/x64/tools/godot.x11.opt.tools.64 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
cp out/linux/x64/tools/godot.x11.opt.tools.64 Godot_v${GODOT_VERSION}_x11.64
zip -q -9 Godot_v${GODOT_VERSION}_x11.64.zip Godot_v${GODOT_VERSION}_x11.64
mv Godot_v${GODOT_VERSION}_x11.64.zip release-${GODOT_VERSION}
rm Godot_v${GODOT_VERSION}_x11.64
binname="${godot_basename}_x11.32"
cp out/linux/x86/tools/godot.x11.opt.tools.32 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
mkdir -p mono/release-${GODOT_VERSION}
rm -rf mono/release-${GODOT_VERSION}/*linux*64*
# Templates
cp out/linux/x64/templates/godot.x11.opt.64 ${templatesdir}/linux_x11_64_release
cp out/linux/x64/templates/godot.x11.opt.debug.64 ${templatesdir}/linux_x11_64_debug
cp out/linux/x86/templates/godot.x11.opt.32 ${templatesdir}/linux_x11_32_release
cp out/linux/x86/templates/godot.x11.opt.debug.32 ${templatesdir}/linux_x11_32_debug
strip ${templatesdir}/linux_x11_*
mkdir -p Godot_v${GODOT_VERSION}_mono_x11_64
cp out/linux/x64/tools-mono/godot.x11.opt.tools.64.mono Godot_v${GODOT_VERSION}_mono_x11_64/Godot_v${GODOT_VERSION}_mono_x11.64
cp -rp out/linux/x64/tools-mono/GodotSharp Godot_v${GODOT_VERSION}_mono_x11_64
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_x11_64/GodotSharp/Api
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_x11_64.zip Godot_v${GODOT_VERSION}_mono_x11_64
mv Godot_v${GODOT_VERSION}_mono_x11_64.zip mono/release-${GODOT_VERSION}
rm -rf Godot_v${GODOT_VERSION}_mono_x11_64
## Windows (Classical) ##
mkdir -p mono/templates
rm -rf mono/templates/*linux*64*
# Editor
binname="${godot_basename}_win64.exe"
cp out/windows/x64/tools/godot.windows.opt.tools.64.exe ${binname}
strip ${binname}
sign_windows ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
cp -rp out/linux/x64/templates-mono/data.mono.x11.64.* mono/templates/
cp out/linux/x64/templates-mono/godot.x11.opt.debug.64.mono mono/templates/linux_x11_64_debug
cp out/linux/x64/templates-mono/godot.x11.opt.64.mono mono/templates/linux_x11_64_release
binname="${godot_basename}_win32.exe"
cp out/windows/x86/tools/godot.windows.opt.tools.32.exe ${binname}
strip ${binname}
sign_windows ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
# Linux 32
# Templates
cp out/windows/x64/templates/godot.windows.opt.64.exe ${templatesdir}/windows_64_release.exe
cp out/windows/x64/templates/godot.windows.opt.debug.64.exe ${templatesdir}/windows_64_debug.exe
cp out/windows/x86/templates/godot.windows.opt.32.exe ${templatesdir}/windows_32_release.exe
cp out/windows/x86/templates/godot.windows.opt.debug.32.exe ${templatesdir}/windows_32_debug.exe
strip ${templatesdir}/windows*.exe
mkdir -p templates
rm -f templates/linux_x11_32*
## OSX (Classical) ##
cp out/linux/x86/templates/godot.x11.opt.debug.32 templates/linux_x11_32_debug
cp out/linux/x86/templates/godot.x11.opt.32 templates/linux_x11_32_release
# Editor
binname="${godot_basename}_osx.universal"
rm -rf Godot.app
cp -r git/misc/dist/osx_tools.app Godot.app
mkdir -p Godot.app/Contents/MacOS
cp out/macosx/tools/godot.osx.opt.tools.universal Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
zip -q -9 -r "${reldir}/${binname}.zip" Godot.app
rm -rf Godot.app
sign_macos ${reldir} ${binname} 0
mkdir -p release-${GODOT_VERSION}
rm -f release-${GODOT_VERSION}/*linux*32*
# Templates
rm -rf osx_template.app
cp -r git/misc/dist/osx_template.app .
mkdir -p osx_template.app/Contents/MacOS
cp out/linux/x86/tools/godot.x11.opt.tools.32 Godot_v${GODOT_VERSION}_x11.32
zip -q -9 Godot_v${GODOT_VERSION}_x11.32.zip Godot_v${GODOT_VERSION}_x11.32
mv Godot_v${GODOT_VERSION}_x11.32.zip release-${GODOT_VERSION}
rm Godot_v${GODOT_VERSION}_x11.32
cp out/macosx/templates/godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
cp out/macosx/templates/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 "${templatesdir}/osx.zip" osx_template.app
rm -rf osx_template.app
sign_macos_template ${templatesdir} 0
mkdir -p mono/release-${GODOT_VERSION}
rm -rf mono/release-${GODOT_VERSION}/*linux*32*
## Server (Classical) ##
mkdir -p Godot_v${GODOT_VERSION}_mono_x11_32
cp out/linux/x86/tools-mono/godot.x11.opt.tools.32.mono Godot_v${GODOT_VERSION}_mono_x11_32/Godot_v${GODOT_VERSION}_mono_x11.32
cp -rp out/linux/x86/tools-mono/GodotSharp/ Godot_v${GODOT_VERSION}_mono_x11_32
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_x11_32/GodotSharp/Api
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_x11_32.zip Godot_v${GODOT_VERSION}_mono_x11_32
mv Godot_v${GODOT_VERSION}_mono_x11_32.zip mono/release-${GODOT_VERSION}
rm -rf Godot_v${GODOT_VERSION}_mono_x11_32
# Headless (editor)
binname="${godot_basename}_linux_headless.64"
cp out/server/x64/tools/godot_server.x11.opt.tools.64 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
mkdir -p mono/templates
rm -rf mono/templates/*linux*32*
# Server (template)
binname="${godot_basename}_linux_server.64"
cp out/server/x64/templates/godot_server.x11.opt.64 ${binname}
strip ${binname}
zip -q -9 "${reldir}/${binname}.zip" ${binname}
rm ${binname}
cp -rp out/linux/x86/templates-mono/data.mono.x11.32.* mono/templates/
cp out/linux/x86/templates-mono/godot.x11.opt.debug.32.mono mono/templates/linux_x11_32_debug
cp out/linux/x86/templates-mono/godot.x11.opt.32.mono mono/templates/linux_x11_32_release
## Javascript (Classical) ##
# Windows
# Editor
unzip out/javascript/tools/godot.javascript.opt.tools.threads.zip -d ${webdir}/
brotli --keep --force --quality=11 ${webdir}/*
binname="${godot_basename}_web_editor.zip"
cp out/javascript/tools/godot.javascript.opt.tools.threads.zip ${reldir}/${binname}
mkdir -p release-${GODOT_VERSION}
rm -f release-${GODOT_VERSION}/*win*zip
# Templates
cp out/javascript/templates/godot.javascript.opt.zip ${templatesdir}/webassembly_release.zip
cp out/javascript/templates/godot.javascript.opt.debug.zip ${templatesdir}/webassembly_debug.zip
cp out/windows/x64/tools/godot.windows.opt.tools.64.exe Godot_v${GODOT_VERSION}_win64.exe
strip Godot_v${GODOT_VERSION}_win64.exe
sign Godot_v${GODOT_VERSION}_win64.exe
zip -q -9 Godot_v${GODOT_VERSION}_win64.exe.zip Godot_v${GODOT_VERSION}_win64.exe
mv Godot_v${GODOT_VERSION}_win64.exe.zip release-${GODOT_VERSION}
rm Godot_v${GODOT_VERSION}_win64.exe
cp out/javascript/templates/godot.javascript.opt.threads.zip ${templatesdir}/webassembly_threads_release.zip
cp out/javascript/templates/godot.javascript.opt.debug.threads.zip ${templatesdir}/webassembly_threads_debug.zip
cp out/windows/x86/tools/godot.windows.opt.tools.32.exe Godot_v${GODOT_VERSION}_win32.exe
strip Godot_v${GODOT_VERSION}_win32.exe
sign Godot_v${GODOT_VERSION}_win32.exe
zip -q -9 Godot_v${GODOT_VERSION}_win32.exe.zip Godot_v${GODOT_VERSION}_win32.exe
mv Godot_v${GODOT_VERSION}_win32.exe.zip release-${GODOT_VERSION}
rm Godot_v${GODOT_VERSION}_win32.exe
cp out/javascript/templates/godot.javascript.opt.gdnative.zip ${templatesdir}/webassembly_gdnative_release.zip
cp out/javascript/templates/godot.javascript.opt.debug.gdnative.zip ${templatesdir}/webassembly_gdnative_debug.zip
mkdir -p templates
rm -rf templates/*win*
## Android (Classical) ##
cp out/windows/x64/templates/godot.windows.opt.64.exe templates/windows_64_release.exe
cp out/windows/x64/templates/godot.windows.opt.debug.64.exe templates/windows_64_debug.exe
cp out/windows/x86/templates/godot.windows.opt.32.exe templates/windows_32_release.exe
cp out/windows/x86/templates/godot.windows.opt.debug.32.exe templates/windows_32_debug.exe
# Lib for direct download
cp out/android/templates/godot-lib.release.aar ${reldir}/godot-lib.${templates_version}.release.aar
strip templates/windows*.exe
# Templates
cp out/android/templates/*.apk ${templatesdir}/
cp out/android/templates/android_source.zip ${templatesdir}/
sign templates/windows_64_release.exe
sign templates/windows_64_debug.exe
sign templates/windows_32_release.exe
sign templates/windows_32_debug.exe
## iOS (Classical) ##
mkdir -p mono/release-${GODOT_VERSION}
rm -rf mono/release-${GODOT_VERSION}/*win*
rm -rf ios_xcode
cp -r git/misc/dist/ios_xcode ios_xcode
cp out/ios/templates/libgodot.iphone.opt.fat ios_xcode/libgodot.iphone.release.fat.a
cp out/ios/templates/libgodot.iphone.opt.debug.fat ios_xcode/libgodot.iphone.debug.fat.a
chmod +x ios_xcode/libgodot.iphone.*
cd ios_xcode
zip -q -9 -r "${templatesdir}/iphone.zip" *
cd ..
rm -rf ios_xcode
mkdir -p mono/templates
rm -rf mono/templates/*win*
## UWP (Classical) ##
mkdir -p Godot_v${GODOT_VERSION}_mono_win64
cp out/windows/x64/tools-mono/godot.windows.opt.tools.64.mono.exe Godot_v${GODOT_VERSION}_mono_win64/Godot_v${GODOT_VERSION}_mono_win64.exe
strip Godot_v${GODOT_VERSION}_mono_win64/Godot_v${GODOT_VERSION}_mono_win64.exe
sign Godot_v${GODOT_VERSION}_mono_win64/Godot_v${GODOT_VERSION}_mono_win64.exe
cp -rp out/windows/x64/tools-mono/GodotSharp Godot_v${GODOT_VERSION}_mono_win64
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_win64/GodotSharp/Api
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_win64.zip Godot_v${GODOT_VERSION}_mono_win64
mv Godot_v${GODOT_VERSION}_mono_win64.zip mono/release-${GODOT_VERSION}
rm -rf Godot_v${GODOT_VERSION}_mono_win64
if [ ! -d "deps/angle" ]; then
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
7z x angle.7z && rm -f angle.7z
cd ..
fi
cp -rp out/windows/x64/templates-mono/data.mono.windows.64.* mono/templates/
cp out/windows/x64/templates-mono/godot.windows.opt.debug.64.mono.exe mono/templates/windows_64_debug.exe
cp out/windows/x64/templates-mono/godot.windows.opt.64.mono.exe mono/templates/windows_64_release.exe
rm -rf uwp_template_*
for arch in ARM Win32 x64; do
cp -r git/misc/dist/uwp_template uwp_template_${arch}
cp deps/angle/winrt/10/src/Release_${arch}/libEGL.dll \
deps/angle/winrt/10/src/Release_${arch}/libGLESv2.dll \
uwp_template_${arch}/
cp -r uwp_template_${arch} uwp_template_${arch}_debug
done
mkdir -p Godot_v${GODOT_VERSION}_mono_win32
cp out/windows/x86/tools-mono/godot.windows.opt.tools.32.mono.exe Godot_v${GODOT_VERSION}_mono_win32/Godot_v${GODOT_VERSION}_mono_win32.exe
strip Godot_v${GODOT_VERSION}_mono_win32/Godot_v${GODOT_VERSION}_mono_win32.exe
sign Godot_v${GODOT_VERSION}_mono_win32/Godot_v${GODOT_VERSION}_mono_win32.exe
cp -rp out/windows/x86/tools-mono/GodotSharp Godot_v${GODOT_VERSION}_mono_win32
cp -rp mono-glue/Api Godot_v${GODOT_VERSION}_mono_win32/GodotSharp/Api
zip -r -q -9 Godot_v${GODOT_VERSION}_mono_win32.zip Godot_v${GODOT_VERSION}_mono_win32
mv Godot_v${GODOT_VERSION}_mono_win32.zip mono/release-${GODOT_VERSION}
rm -rf Godot_v${GODOT_VERSION}_mono_win32
cp out/uwp/arm/godot.uwp.opt.32.arm.exe uwp_template_ARM/godot.uwp.exe
cp out/uwp/arm/godot.uwp.opt.debug.32.arm.exe uwp_template_ARM_debug/godot.uwp.exe
cd uwp_template_ARM && zip -q -9 -r "${templatesdir}/uwp_arm_release.zip" * && cd ..
cd uwp_template_ARM_debug && zip -q -9 -r "${templatesdir}/uwp_arm_debug.zip" * && cd ..
rm -rf uwp_template_ARM*
cp -rp out/windows/x86/templates-mono/data.mono.windows.32.* mono/templates/
cp out/windows/x86/templates-mono/godot.windows.opt.debug.32.mono.exe mono/templates/windows_32_debug.exe
cp out/windows/x86/templates-mono/godot.windows.opt.32.mono.exe mono/templates/windows_32_release.exe
cp out/uwp/x86/godot.uwp.opt.32.x86.exe uwp_template_Win32/godot.uwp.exe
cp out/uwp/x86/godot.uwp.opt.debug.32.x86.exe uwp_template_Win32_debug/godot.uwp.exe
cd uwp_template_Win32 && zip -q -9 -r "${templatesdir}/uwp_x86_release.zip" * && cd ..
cd uwp_template_Win32_debug && zip -q -9 -r "${templatesdir}/uwp_x86_debug.zip" * && cd ..
rm -rf uwp_template_Win32*
strip mono/templates/windows*.exe
cp out/uwp/x64/godot.uwp.opt.64.x64.exe uwp_template_x64/godot.uwp.exe
cp out/uwp/x64/godot.uwp.opt.debug.64.x64.exe uwp_template_x64_debug/godot.uwp.exe
cd uwp_template_x64 && zip -q -9 -r "${templatesdir}/uwp_x64_release.zip" * && cd ..
cd uwp_template_x64_debug && zip -q -9 -r "${templatesdir}/uwp_x64_debug.zip" * && cd ..
rm -rf uwp_template_x64*
sign mono/templates/windows_64_debug.exe
sign mono/templates/windows_64_release.exe
sign mono/templates/windows_32_debug.exe
sign mono/templates/windows_32_release.exe
## Templates TPZ (Classical) ##
# OSX
echo "${templates_version}" > ${templatesdir}/version.txt
pushd ${templatesdir}/..
zip -q -9 -r -D "${reldir}/${godot_basename}_export_templates.tpz" templates/*
popd
mkdir -p templates
rm -f templates/osx*
## SHA-512 sums (Classical) ##
rm -rf osx_template
mkdir -p osx_template
cd osx_template
pushd ${reldir}
sha512sum [Gg]* > SHA512-SUMS.txt
mkdir -p ${basedir}/sha512sums/${godot_version}
cp SHA512-SUMS.txt ${basedir}/sha512sums/${godot_version}/
popd
cp -r ../git/misc/dist/osx_template.app .
mkdir osx_template.app/Contents/MacOS
cp ../out/macosx/x64/templates/godot.osx.opt.64 osx_template.app/Contents/MacOS/godot_osx_release.64
cp ../out/macosx/x64/templates/godot.osx.opt.debug.64 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 ..
mv osx_template/osx.zip templates
rm -rf osx_template
mkdir -p release-${GODOT_VERSION}
rm -f release-${GODOT_VERSION}/*osx*
cp -r git/misc/dist/osx_tools.app Godot.app
mkdir -p Godot.app/Contents/MacOS
cp out/macosx/x64/tools/godot.osx.opt.tools.64 Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
zip -q -9 -r "release-${GODOT_VERSION}/Godot_v${GODOT_VERSION}_osx.64.zip" Godot.app
rm -rf Godot.app
mkdir -p mono/templates
rm -rf mono/templates/osx*
rm -rf osx_template
mkdir -p osx_template
cd osx_template
cp -r ../git/misc/dist/osx_template.app .
mkdir osx_template.app/Contents/MacOS
cp ../out/macosx/x64/templates-mono/godot.osx.opt.64.mono osx_template.app/Contents/MacOS/godot_osx_release.64
cp ../out/macosx/x64/templates-mono/godot.osx.opt.debug.64.mono osx_template.app/Contents/MacOS/godot_osx_debug.64
cp -rp ../out/macosx/x64/templates-mono/data.mono.osx.64.* osx_template.app/Contents/MacOS/
chmod +x osx_template.app/Contents/MacOS/godot_osx*
zip -q -9 -r osx.zip osx_template.app
cd ..
mv osx_template/osx.zip mono/templates
rm -rf osx_template
mkdir -p mono/release-${GODOT_VERSION}
rm -f mono/release-${GODOT_VERSION}/*osx*
cp -r git/misc/dist/osx_tools.app Godot_mono.app
mkdir -p Godot_mono.app/Contents/MacOS
cp out/macosx/x64/tools-mono/godot.osx.opt.tools.64.mono Godot_mono.app/Contents/MacOS/Godot
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}/GodotSharp
mkdir -p Godot_mono.app/Contents/{Frameworks,Resources}/GodotSharp/Mono
cp -rp out/macosx/x64/tools-mono/GodotSharp/Mono/lib Godot_mono.app/Contents/Frameworks/GodotSharp/Mono
cp -rp out/macosx/x64/tools-mono/GodotSharp/Tools Godot_mono.app/Contents/Frameworks/GodotSharp
cp -rp mono-glue/Api Godot_mono.app/Contents/Frameworks/GodotSharp
cp -rp out/macosx/x64/tools-mono/GodotSharp/Mono/etc Godot_mono.app/Contents/Resources/GodotSharp/Mono
chmod +x Godot_mono.app/Contents/MacOS/Godot
zip -q -9 -r "mono/release-${GODOT_VERSION}/Godot_v${GODOT_VERSION}_mono_osx.64.zip" Godot_mono.app
rm -rf Godot_mono.app
# Server
cp out/server/x64/templates/godot_server.x11.opt.64 Godot_v${GODOT_VERSION}_linux_server.64
zip -q -9 Godot_v${GODOT_VERSION}_linux_server.64.zip Godot_v${GODOT_VERSION}_linux_server.64
mv Godot_v${GODOT_VERSION}_linux_server.64.zip release-${GODOT_VERSION}
rm Godot_v${GODOT_VERSION}_linux_server.64
cp out/server/x64/tools/godot_server.x11.opt.tools.64 Godot_v${GODOT_VERSION}_linux_headless.64
zip -q -9 Godot_v${GODOT_VERSION}_linux_headless.64.zip Godot_v${GODOT_VERSION}_linux_headless.64
mv Godot_v${GODOT_VERSION}_linux_headless.64.zip release-${GODOT_VERSION}
rm Godot_v${GODOT_VERSION}_linux_headless.64
# Javascript
cp out/javascript/godot.javascript.opt.zip templates/webassembly_release.zip
cp out/javascript/godot.javascript.opt.debug.zip templates/webassembly_debug.zip
# Android
cp out/android/*.apk templates
# iOS
cp -r git/misc/dist/ios_xcode ios_xcode
cp out/ios/libgodot.iphone.opt.fat ios_xcode/libgodot.iphone.release.fat.a
cp out/ios/libgodot.iphone.opt.debug.fat ios_xcode/libgodot.iphone.debug.fat.a
chmod +x ios_xcode/libgodot.iphone.*
cd ios_xcode
zip -q -9 -r ../templates/iphone.zip *
cd ..
rm -rf ios_xcode
# UWP
if [ ! -d "angle" ]; then
echo "Downloading ANGLE binaries from https://github.com/GodotBuilder/godot-builds/releases/tag/_tools"
curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z
7z x angle.7z && rm -f angle.7z
fi
mkdir -p templates
rm -f templates/uwp*
rm -rf uwp_template_*
# Mono
for arch in ARM Win32 x64; do
cp -r git/misc/dist/uwp_template uwp_template_${arch}
if [ "${build_mono}" == "1" ]; then
cp angle/winrt/10/src/Release_${arch}/libEGL.dll \
angle/winrt/10/src/Release_${arch}/libGLESv2.dll \
uwp_template_${arch}/
cp -r uwp_template_${arch} uwp_template_${arch}_debug
done
## Linux (Mono) ##
cp out/uwp/arm/godot.uwp.opt.32.arm.exe uwp_template_ARM/godot.uwp.exe
cp out/uwp/arm/godot.uwp.opt.debug.32.arm.exe uwp_template_ARM_debug/godot.uwp.exe
sign uwp_template_ARM/godot.uwp.exe
sign uwp_template_ARM_debug/godot.uwp.exe
cd uwp_template_ARM && zip -q -9 -r ../templates/uwp_arm_release.zip * && cd ..
cd uwp_template_ARM_debug && zip -q -9 -r ../templates/uwp_arm_debug.zip * && cd ..
# Editor
binbasename="${godot_basename}_mono_x11"
mkdir -p ${binbasename}_64
cp out/linux/x64/tools-mono/godot.x11.opt.tools.64.mono ${binbasename}_64/${binbasename}.64
strip ${binbasename}_64/${binbasename}.64
cp -rp out/linux/x64/tools-mono/GodotSharp ${binbasename}_64/
cp -rp out/aot-compilers ${binbasename}_64/GodotSharp/Tools/
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
rm -rf ${binbasename}_64
cp out/uwp/x86/godot.uwp.opt.32.x86.exe uwp_template_Win32/godot.uwp.exe
cp out/uwp/x86/godot.uwp.opt.debug.32.x86.exe uwp_template_Win32_debug/godot.uwp.exe
sign uwp_template_Win32/godot.uwp.exe
sign uwp_template_Win32_debug/godot.uwp.exe
cd uwp_template_Win32 && zip -q -9 -r ../templates/uwp_x86_release.zip * && cd ..
cd uwp_template_Win32_debug && zip -q -9 -r ../templates/uwp_x86_debug.zip * && cd ..
binbasename="${godot_basename}_mono_x11"
mkdir -p ${binbasename}_32
cp out/linux/x86/tools-mono/godot.x11.opt.tools.32.mono ${binbasename}_32/${binbasename}.32
strip ${binbasename}_32/${binbasename}.32
cp -rp out/linux/x86/tools-mono/GodotSharp/ ${binbasename}_32/
cp -rp out/aot-compilers ${binbasename}_32/GodotSharp/Tools/
zip -r -q -9 "${reldir_mono}/${binbasename}_32.zip" ${binbasename}_32
rm -rf ${binbasename}_32
cp out/uwp/x64/godot.uwp.opt.64.x64.exe uwp_template_x64/godot.uwp.exe
cp out/uwp/x64/godot.uwp.opt.debug.64.x64.exe uwp_template_x64_debug/godot.uwp.exe
sign uwp_template_x64/godot.uwp.exe
sign uwp_template_x64_debug/godot.uwp.exe
cd uwp_template_x64 && zip -q -9 -r ../templates/uwp_x64_release.zip * && cd ..
cd uwp_template_x64_debug && zip -q -9 -r ../templates/uwp_x64_debug.zip * && cd ..
# Templates
cp -rp out/linux/x64/templates-mono/data.mono.x11.64.* ${templatesdir_mono}/
cp out/linux/x64/templates-mono/godot.x11.opt.debug.64.mono ${templatesdir_mono}/linux_x11_64_debug
cp out/linux/x64/templates-mono/godot.x11.opt.64.mono ${templatesdir_mono}/linux_x11_64_release
cp -rp out/linux/x86/templates-mono/data.mono.x11.32.* ${templatesdir_mono}/
cp out/linux/x86/templates-mono/godot.x11.opt.debug.32.mono ${templatesdir_mono}/linux_x11_32_debug
cp out/linux/x86/templates-mono/godot.x11.opt.32.mono ${templatesdir_mono}/linux_x11_32_release
strip ${templatesdir_mono}/linux_x11*
rm -rf uwp_template_*
mkdir -p ${templatesdir_mono}/bcl
cp -r out/linux/x64/tools-mono/GodotSharp/Mono/lib/mono/4.5/ ${templatesdir_mono}/bcl/net_4_x
exit 0
## Windows (Mono) ##
# Editor
binname="${godot_basename}_mono_win64"
mkdir -p ${binname}
cp out/windows/x64/tools-mono/godot.windows.opt.tools.64.mono.exe ${binname}/${binname}.exe
strip ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe
cp -rp out/windows/x64/tools-mono/GodotSharp ${binname}/
cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname}
binname="${godot_basename}_mono_win32"
mkdir -p ${binname}
cp out/windows/x86/tools-mono/godot.windows.opt.tools.32.mono.exe ${binname}/${binname}.exe
strip ${binname}/${binname}.exe
sign_windows ${binname}/${binname}.exe
cp -rp out/windows/x86/tools-mono/GodotSharp ${binname}/
cp -rp out/aot-compilers ${binname}/GodotSharp/Tools/
zip -r -q -9 "${reldir_mono}/${binname}.zip" ${binname}
rm -rf ${binname}
# Templates
cp -rp out/windows/x64/templates-mono/data.mono.windows.64.* ${templatesdir_mono}/
cp out/windows/x64/templates-mono/godot.windows.opt.debug.64.mono.exe ${templatesdir_mono}/windows_64_debug.exe
cp out/windows/x64/templates-mono/godot.windows.opt.64.mono.exe ${templatesdir_mono}/windows_64_release.exe
cp -rp out/windows/x86/templates-mono/data.mono.windows.32.* ${templatesdir_mono}/
cp out/windows/x86/templates-mono/godot.windows.opt.debug.32.mono.exe ${templatesdir_mono}/windows_32_debug.exe
cp out/windows/x86/templates-mono/godot.windows.opt.32.mono.exe ${templatesdir_mono}/windows_32_release.exe
strip ${templatesdir_mono}/windows*.exe
mkdir -p ${templatesdir_mono}/bcl
cp -r out/windows/x64/tools-mono/GodotSharp/Mono/lib/mono/4.5/ ${templatesdir_mono}/bcl/net_4_x_win
## OSX (Mono) ##
# Editor
binname="${godot_basename}_mono_osx.64"
rm -rf Godot_mono.app
cp -r git/misc/dist/osx_tools.app Godot_mono.app
mkdir -p Godot_mono.app/Contents/{MacOS,Resources}
cp out/macosx/tools-mono/godot.osx.opt.tools.x86_64.mono Godot_mono.app/Contents/MacOS/Godot
cp -rp out/macosx/tools-mono/GodotSharp Godot_mono.app/Contents/Resources/GodotSharp
cp -rp out/aot-compilers Godot_mono.app/Contents/Resources/GodotSharp/Tools/
chmod +x Godot_mono.app/Contents/MacOS/Godot
zip -q -9 -r "${reldir_mono}/${binname}.zip" Godot_mono.app
rm -rf Godot_mono.app
sign_macos ${reldir_mono} ${binname} 1
# Templates
rm -rf osx_template.app
cp -r git/misc/dist/osx_template.app .
mkdir -p osx_template.app/Contents/{MacOS,Resources}
cp out/macosx/templates-mono/godot.osx.opt.debug.x86_64.mono osx_template.app/Contents/MacOS/godot_osx_debug.64
cp out/macosx/templates-mono/godot.osx.opt.x86_64.mono osx_template.app/Contents/MacOS/godot_osx_release.64
cp -rp out/macosx/templates-mono/data.mono.osx.64.* osx_template.app/Contents/Resources/
chmod +x osx_template.app/Contents/MacOS/godot_osx*
zip -q -9 -r "${templatesdir_mono}/osx.zip" osx_template.app
rm -rf osx_template.app
sign_macos_template ${templatesdir_mono} 1
## Server (Mono) ##
# Headless (editor)
binbasename="${godot_basename}_mono_linux_headless"
mkdir -p ${binbasename}_64
cp out/server/x64/tools-mono/godot_server.x11.opt.tools.64.mono ${binbasename}_64/${binbasename}.64
strip ${binbasename}_64/${binbasename}.64
cp -rp out/server/x64/tools-mono/GodotSharp ${binbasename}_64/
cp -rp out/aot-compilers ${binbasename}_64/GodotSharp/Tools/
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
rm -rf ${binbasename}_64
# Server (template)
binbasename="${godot_basename}_mono_linux_server"
mkdir -p ${binbasename}_64
cp out/server/x64/templates-mono/godot_server.x11.opt.64.mono ${binbasename}_64/${binbasename}.64
strip ${binbasename}_64/${binbasename}.64
cp -rp out/server/x64/templates-mono/data.mono.server.64.release ${binbasename}_64/data_${binbasename}_64
zip -r -q -9 "${reldir_mono}/${binbasename}_64.zip" ${binbasename}_64
rm -rf ${binbasename}_64
## Javascript (Mono) ##
# Templates
cp out/javascript/templates-mono/godot.javascript.opt.debug.mono.zip ${templatesdir_mono}/webassembly_debug.zip
cp out/javascript/templates-mono/godot.javascript.opt.mono.zip ${templatesdir_mono}/webassembly_release.zip
mkdir -p ${templatesdir_mono}/bcl
cp -r out/javascript/templates-mono/bcl/wasm ${templatesdir_mono}/bcl/
## Android (Mono) ##
# Lib for direct download
cp out/android/templates-mono/godot-lib.release.aar ${reldir_mono}/godot-lib.${templates_version}.mono.release.aar
# Templates
cp out/android/templates-mono/*.apk ${templatesdir_mono}/
cp out/android/templates-mono/android_source.zip ${templatesdir_mono}/
mkdir -p ${templatesdir_mono}/bcl
cp -r out/android/templates-mono/bcl/godot_android_ext ${templatesdir_mono}/bcl/
cp -r out/android/templates-mono/bcl/monodroid ${templatesdir_mono}/bcl/
## iOS (Mono) ##
rm -rf ios_xcode
cp -r git/misc/dist/ios_xcode ios_xcode
cp out/ios/templates-mono/libgodot.iphone.opt.fat ios_xcode/libgodot.iphone.release.fat.a
cp out/ios/templates-mono/libgodot.iphone.opt.debug.fat ios_xcode/libgodot.iphone.debug.fat.a
chmod +x ios_xcode/libgodot.iphone.*
cd ios_xcode
zip -q -9 -r "${templatesdir_mono}/iphone.zip" *
cd ..
rm -rf ios_xcode
mkdir -p ${templatesdir_mono}/bcl
cp -r out/ios/templates-mono/bcl/monotouch* ${templatesdir_mono}/bcl/
cp -r out/ios/templates-mono/iphone-mono-libs ${templatesdir_mono}/
## UWP (Mono) ##
# Not supported yet.
## Templates TPZ (Mono) ##
echo "${templates_version}.mono" > ${templatesdir_mono}/version.txt
pushd ${templatesdir_mono}/..
zip -q -9 -r -D "${reldir_mono}/${godot_basename}_mono_export_templates.tpz" templates/*
popd
## SHA-512 sums (Mono) ##
pushd ${reldir_mono}
sha512sum [Gg]* >> SHA512-SUMS.txt
mkdir -p ${basedir}/sha512sums/${godot_version}/mono
cp SHA512-SUMS.txt ${basedir}/sha512sums/${godot_version}/mono/
popd
fi
echo "All editor binaries and templates prepared successfully for release"

View File

@@ -2,29 +2,60 @@
set -e
export BUILD_NAME=official
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
export MONO_OPTIONS="module_mono_enabled=yes mono_static=yes copy_mono_root=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
export MONO32_PREFIX=/usr
export MONO64_PREFIX=/usr
export CC="gcc-8"
export CXX="g++-8"
export CC="gcc-9"
export CXX="g++-9"
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=no target=release_debug
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=no target=release
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
# Classical
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Server..."
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/tools
cp -rvp bin/* /root/out/tools
rm -rf bin
#$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=no target=release_debug
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS tools=no target=release
mkdir -p /root/out/templates
cp -rvp bin/* /root/out/templates
rm -rf bin
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Server..."
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
# Workaround for MSBuild segfault on Ubuntu containers, we build the CIL on Fedora and copy here.
mkdir -p bin
cp -r /root/mono-glue/cil/GodotSharp bin/
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes build_cil=no
mkdir -p /root/out/tools-mono
cp -rvp bin/* /root/out/tools-mono
rm -rf bin
#$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=no target=release_debug
$SCONS platform=server CC=$CC CXX=$CXX $OPTIONS $OPTIONS_MONO tools=no target=release
mkdir -p /root/out/templates-mono
cp -rvp bin/* /root/out/templates-mono
rm -rf bin
fi
echo "Server build successful"

View File

@@ -1,26 +0,0 @@
#!/bin/bash
set -e
if [ -z "$1" ] || [ -z "$2" ]; then
echo "usage: $0 <version> <file version>"
echo " like : $0 3.0.3.rc1 3.0.3-rc1"
exit 1
fi
VERSION=$1
FILE_VERSION=$2
MONO_VERSION=$3
echo "$VERSION" > templates/version.txt
mkdir -p release-${FILE_VERSION}
rm -f release-${FILE_VERSION}/*templates.tpz
zip -q -9 -r -D release-${FILE_VERSION}/Godot_v${FILE_VERSION}_export_templates.tpz templates
mkdir -p mono/release-${FILE_VERSION}
rm -f mono/release-${FILE_VERSION}/*templates.tpz
cd mono
echo "$VERSION".mono > templates/version.txt
zip -q -9 -r -D release-${FILE_VERSION}/Godot_v${FILE_VERSION}_mono_export_templates.tpz templates
cd ..

View File

@@ -2,25 +2,42 @@
set -e
# Config
export SCONS="call scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="production=yes"
export BUILD_ARCHES="x86 x64 arm"
export ANGLE_SRC_PATH='c:\angle'
export BUILD_NAME=official
export SCONS="call scons -j4 verbose=yes warnings=no progress=no"
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no"
rm -rf godot
mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
for arch in x86 x64 arm; do
for release in release release_debug; do
wine cmd /c /root/build/build.bat $arch $release
# Classical
sync
wineserver -kw
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for UWP..."
mkdir -p /root/out/$arch
mv bin/* /root/out/$arch
for arch in ${BUILD_ARCHES}; do
for release in release release_debug; do
wine cmd /c /root/build/build.bat $arch $release
sync
wineserver -kw
mkdir -p /root/out/$arch
mv bin/* /root/out/$arch
done
done
done
fi
# Mono
if [ "${MONO}" == "1" ]; then
echo "No Mono support for UWP yet."
#cp /root/mono-glue/*.cpp modules/mono/glue/
#cp -r /root/mono-glue/Managed/Generated modules/mono/glue/Managed/
fi
echo "UWP build successful"

View File

@@ -2,9 +2,10 @@
set -e
export BUILD_NAME=official
# Config
export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
export OPTIONS="builtin_libpng=yes builtin_openssl=yes builtin_zlib=yes debug_symbols=no use_static_cpp=yes use_lto=yes"
export OPTIONS="production=yes"
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
export TERM=xterm
export MONO32_PREFIX=/root/dependencies/mono-32
@@ -15,48 +16,64 @@ mkdir godot
cd godot
tar xf /root/godot.tar.gz --strip-components=1
cp /root/mono-glue/*.cpp modules/mono/glue
# Classical
$SCONS platform=windows bits=32 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x86/tools
cp -rvp bin/* /root/out/x86/tools
rm -rf bin
if [ "${CLASSICAL}" == "1" ]; then
echo "Starting classical build for Windows..."
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release_debug
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release
mkdir -p /root/out/x86/templates
cp -rvp bin/* /root/out/x86/templates
rm -rf bin
$SCONS platform=windows bits=64 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x64/tools
cp -rvp bin/* /root/out/x64/tools
rm -rf bin
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/x86/tools-mono
cp -rvp bin/* /root/out/x86/tools-mono
rm -rf bin
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release_debug
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release
mkdir -p /root/out/x64/templates
cp -rvp bin/* /root/out/x64/templates
rm -rf bin
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO tools=no target=release
mkdir -p /root/out/x86/templates-mono
cp -rvp bin/* /root/out/x86/templates-mono
rm -rf bin
$SCONS platform=windows bits=32 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x86/tools
cp -rvp bin/* /root/out/x86/tools
rm -rf bin
$SCONS platform=windows bits=64 $OPTIONS tools=yes target=release_debug
mkdir -p /root/out/x64/tools
cp -rvp bin/* /root/out/x64/tools
rm -rf bin
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release_debug
$SCONS platform=windows bits=32 $OPTIONS tools=no target=release
mkdir -p /root/out/x86/templates
cp -rvp bin/* /root/out/x86/templates
rm -rf bin
fi
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release_debug
$SCONS platform=windows bits=64 $OPTIONS tools=no target=release
mkdir -p /root/out/x64/templates
cp -rvp bin/* /root/out/x64/templates
rm -rf bin
# Mono
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/x64/tools-mono
cp -rvp bin/* /root/out/x64/tools-mono
rm -rf bin
if [ "${MONO}" == "1" ]; then
echo "Starting Mono build for Windows..."
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO tools=no target=release_debug
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO tools=no target=release
mkdir -p /root/out/x64/templates-mono
cp -rvp bin/* /root/out/x64/templates-mono
rm -rf bin
cp /root/mono-glue/*.cpp modules/mono/glue/
cp -r /root/mono-glue/GodotSharp/GodotSharp/Generated modules/mono/glue/GodotSharp/GodotSharp/
cp -r /root/mono-glue/GodotSharp/GodotSharpEditor/Generated modules/mono/glue/GodotSharp/GodotSharpEditor/
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/x64/tools-mono
cp -rvp bin/* /root/out/x64/tools-mono
rm -rf bin
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=no target=release_debug
$SCONS platform=windows bits=64 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO64_PREFIX tools=no target=release
mkdir -p /root/out/x64/templates-mono
cp -rvp bin/* /root/out/x64/templates-mono
rm -rf bin
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=yes target=release_debug copy_mono_root=yes
mkdir -p /root/out/x86/tools-mono
cp -rvp bin/* /root/out/x86/tools-mono
rm -rf bin
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=no target=release_debug
$SCONS platform=windows bits=32 $OPTIONS $OPTIONS_MONO mono_prefix=$MONO32_PREFIX tools=no target=release
mkdir -p /root/out/x86/templates-mono
cp -rvp bin/* /root/out/x86/templates-mono
rm -rf bin
fi
echo "Windows build successful"

153
build.sh
View File

@@ -4,6 +4,8 @@ set -e
OPTIND=1
# Config
# For default registry and number of cores.
if [ ! -e config.sh ]; then
echo "No config.sh, copying default values from config.sh.in."
@@ -11,6 +13,10 @@ if [ ! -e config.sh ]; then
fi
source ./config.sh
if [ -z "${BUILD_NAME}" ]; then
export BUILD_NAME="custom_build"
fi
if [ -z "${NUM_CORES}" ]; then
export NUM_CORES=16
fi
@@ -20,43 +26,61 @@ username=""
password=""
godot_version=""
git_treeish="master"
build_classical=1
build_mono=1
force_download=0
skip_download=0
skip_download=1
skip_git_checkout=0
while getopts "h?r:u:p:v:g:fsc" opt; do
case "$opt" in
h|\?)
echo "Usage: $0 [OPTIONS...]"
echo
echo " -r registry"
echo " -u username"
echo " -p password"
echo " -v godot version (e.g: 3.1-alpha5) [mandatory]"
echo " -g git treeish (e.g: master)"
echo " -f force redownload of all images"
echo " -s skip downloading"
echo " -c skip checkout"
echo
exit 1
;;
r) registry=$OPTARG
;;
u) username=$OPTARG
;;
p) password=$OPTARG
;;
v) godot_version=$OPTARG
;;
g) git_treeish=$OPTARG
;;
f) force_download=1
;;
s) skip_download=1
;;
c) skip_git_checkout=1
;;
esac
while getopts "h?r:u:p:v:g:b:fsc" opt; do
case "$opt" in
h|\?)
echo "Usage: $0 [OPTIONS...]"
echo
echo " -r registry"
echo " -u username"
echo " -p password"
echo " -v godot version (e.g. 3.1-alpha5) [mandatory]"
echo " -g git treeish (e.g. master)"
echo " -b all|classical|mono (default: all)"
echo " -f force redownload of all images"
echo " -s skip downloading"
echo " -c skip checkout"
echo
exit 1
;;
r)
registry=$OPTARG
;;
u)
username=$OPTARG
;;
p)
password=$OPTARG
;;
v)
godot_version=$OPTARG
;;
g)
git_treeish=$OPTARG
;;
b)
if [ "$OPTARG" == "classical" ]; then
build_mono=0
elif [ "$OPTARG" == "mono" ]; then
build_classical=0
fi
;;
f)
force_download=1
;;
s)
skip_download=1
;;
c)
skip_git_checkout=1
;;
esac
done
export podman=none
@@ -80,6 +104,16 @@ if [ -z "${godot_version}" ]; then
exit 1
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 ${podman} login ${registry} -u "${username}" -p "${password}"; then
export logged_in=true
@@ -119,7 +153,22 @@ if [ "${skip_git_checkout}" == 0 ]; then
git clean -fdx
git pull origin ${git_treeish} || /bin/true
git archive --format=tar $git_treeish --prefix=godot-${godot_version}/ | gzip > ../godot.tar.gz
# Validate version
correct_version=$(python3 << EOF
import version;
if hasattr(version, "patch") and version.patch != 0:
git_version = f"{version.major}.{version.minor}.{version.patch}"
else:
git_version = f"{version.major}.{version.minor}"
print(git_version == "${version}")
EOF
)
if [[ "$correct_version" != "True" ]]; then
echo "Version in version.py doesn't match the passed ${version}."
exit 1
fi
sh misc/scripts/make_tarball.sh -v ${godot_version} -g ${git_treeish}
popd
fi
@@ -127,38 +176,44 @@ export basedir="$(pwd)"
mkdir -p ${basedir}/out
mkdir -p ${basedir}/out/logs
export podman_run="${podman} run -it --rm --env NUM_CORES -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
# Get AOT compilers from their containers.
mkdir -p ${basedir}/out/aot-compilers
${podman} run -it --rm -w /root -v ${basedir}/out/aot-compilers:/root/out localhost/godot-ios:${img_version} bash -c "cp -r /root/aot-compilers/* /root/out"
chmod +x ${basedir}/out/aot-compilers/*/*
mkdir -p ${basedir}/mono-glue
${podman_run} -v ${basedir}/build-mono-glue:/root/build ${registry}/godot/mono-glue:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
${podman_run} -v ${basedir}/build-mono-glue:/root/build localhost/godot-mono-glue:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/mono-glue
mkdir -p ${basedir}/out/windows
${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out ${registry}/godot/windows:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows
${podman_run} -v ${basedir}/build-windows:/root/build -v ${basedir}/out/windows:/root/out localhost/godot-windows:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/windows
mkdir -p ${basedir}/out/linux/x64
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x64:/root/out ${registry}/godot/ubuntu-64:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux64
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x64:/root/out localhost/godot-ubuntu-64:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux64
mkdir -p ${basedir}/out/linux/x86
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x86:/root/out ${registry}/godot/ubuntu-32:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux32
mkdir -p ${basedir}/out/server/x64
${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server/x64:/root/out ${registry}/godot/ubuntu-64:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server
${podman_run} -v ${basedir}/build-linux:/root/build -v ${basedir}/out/linux/x86:/root/out localhost/godot-ubuntu-32:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/linux32
mkdir -p ${basedir}/out/javascript
${podman_run} -v ${basedir}/build-javascript:/root/build -v ${basedir}/out/javascript:/root/out ${registry}/godot/javascript:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/javascript
${podman_run} -v ${basedir}/build-javascript:/root/build -v ${basedir}/out/javascript:/root/out localhost/godot-javascript:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/javascript
mkdir -p ${basedir}/out/macosx/x64
${podman_run} -v ${basedir}/build-macosx:/root/build -v ${basedir}/out/macosx/x64:/root/out ${registry}/godot-private/macosx:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx
mkdir -p ${basedir}/out/macosx
${podman_run} -v ${basedir}/build-macosx:/root/build -v ${basedir}/out/macosx:/root/out localhost/godot-osx:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/macosx
mkdir -p ${basedir}/out/android
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out ${registry}/godot-private/android:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
${podman_run} -v ${basedir}/build-android:/root/build -v ${basedir}/out/android:/root/out localhost/godot-android:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/android
mkdir -p ${basedir}/out/ios
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out ${registry}/godot-private/ios:latest bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
${podman_run} -v ${basedir}/build-ios:/root/build -v ${basedir}/out/ios:/root/out localhost/godot-ios:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/ios
mkdir -p ${basedir}/out/server/x64
${podman_run} -v ${basedir}/build-server:/root/build -v ${basedir}/out/server/x64:/root/out localhost/godot-ubuntu-64:${img_version} bash build/build.sh 2>&1 | tee ${basedir}/out/logs/server
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
if [ ! -z "$SUDO_UID" ]; then
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/out
chown -R "${SUDO_UID}":"${SUDO_GID}" ${basedir}/git ${basedir}/out ${basedir}/mono-glue ${basedir}/godot*.tar.gz
fi

View File

@@ -11,6 +11,9 @@
# https://github.com/godotengine/build-containers
export REGISTRY="registry.prehensile-tales.com"
# Default build name used to distinguish between official and custom builds.
export BUILD_NAME="custom_build"
# Default number of parallel cores for each build.
export NUM_CORES=16
@@ -27,3 +30,15 @@ export SIGN_PASSWORD=""
# Use your own when making a thirdparty build.
export SIGN_NAME=""
export SIGN_URL=""
# Hostname or IP address of an OSX host (Needed for signing)
# eg "user@10.1.0.10"
export OSX_HOST=""
# ID of the Apple certificate used to sign
export OSX_KEY_ID=""
# Bundle id for the signed app
export OSX_BUNDLE_ID=""
# Username/password for Apple's signing APIs (used for atltool)
export APPLE_ID=""
export APPLE_ID_PASSWORD=""