2022-10-14 18:55:53 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Run this script form it's own folder
|
|
|
|
|
2022-12-22 19:51:25 +01:00
|
|
|
# Before using this script, I recommend using:
|
2022-10-14 18:55:53 +02:00
|
|
|
# pre_release_check_files_present.sh
|
|
|
|
# strip_all.sh
|
|
|
|
|
|
|
|
cd ../..
|
|
|
|
project_root=$(pwd)
|
|
|
|
|
|
|
|
full_project_name=$1
|
|
|
|
|
|
|
|
version=""
|
|
|
|
version_snake_cased=""
|
|
|
|
|
|
|
|
if [ ! -z $1 ]; then
|
|
|
|
version="."
|
|
|
|
version+=$1
|
|
|
|
|
|
|
|
version_snake_cased=${version//./_}
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -Rf ./release
|
|
|
|
mkdir release
|
|
|
|
|
|
|
|
mkdir release/temp
|
|
|
|
mkdir release/temp/templates
|
2024-04-21 23:18:57 +02:00
|
|
|
mkdir release/temp/templates_server
|
|
|
|
mkdir release/temp/templates_sbc
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# ==== Copy Normal Templates ====
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# Windows
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.windows.opt.32.exe release/temp/templates/windows_32_release.exe
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium.windows.opt.64.exe release/temp/templates/windows_64_release.exe
|
|
|
|
|
|
|
|
cp bin/pandemonium.windows.opt.debug.32.exe release/temp/templates/windows_32_debug.exe
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.windows.opt.debug.64.exe release/temp/templates/windows_64_debug.exe
|
|
|
|
|
|
|
|
# Linux
|
|
|
|
|
|
|
|
cp bin/pandemonium.x11.opt.32 release/temp/templates/linux_x11_32_release
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium.x11.opt.64 release/temp/templates/linux_x11_64_release
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.x11.opt.arm release/temp/templates/linux_x11_arm32_release
|
|
|
|
cp bin/pandemonium.x11.opt.arm64 release/temp/templates/linux_x11_arm64_release
|
|
|
|
|
|
|
|
cp bin/pandemonium.x11.opt.debug.32 release/temp/templates/linux_x11_32_debug
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium.x11.opt.debug.64 release/temp/templates/linux_x11_64_debug
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.x11.opt.debug.arm release/temp/templates/linux_x11_arm32_debug
|
|
|
|
cp bin/pandemonium.x11.opt.debug.arm64 release/temp/templates/linux_x11_arm64_debug
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# Server (Linux)
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium_server.x11.opt.32 release/temp/templates_server/linux_server_32_release
|
|
|
|
cp bin/pandemonium_server.x11.opt.64 release/temp/templates_server/linux_server_64_release
|
|
|
|
cp bin/pandemonium_server.x11.opt.arm release/temp/templates_server/linux_server_arm32_release
|
|
|
|
cp bin/pandemonium_server.x11.opt.arm64 release/temp/templates_server/linux_server_arm64_release
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium_server.x11.opt.debug.32 release/temp/templates_server/linux_server_32_debug
|
|
|
|
cp bin/pandemonium_server.x11.opt.debug.64 release/temp/templates_server/linux_server_64_debug
|
|
|
|
cp bin/pandemonium_server.x11.opt.debug.arm release/temp/templates_server/linux_server_arm32_debug
|
|
|
|
cp bin/pandemonium_server.x11.opt.debug.arm64 release/temp/templates_server/linux_server_arm64_debug
|
|
|
|
|
|
|
|
# HTTP Server (Linux)
|
|
|
|
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.32 release/temp/templates_server/linux_http_server_32_release
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.64 release/temp/templates_server/linux_http_server_64_release
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.arm release/temp/templates_server/linux_http_server_arm32_release
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.arm64 release/temp/templates_server/linux_http_server_arm64_release
|
|
|
|
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.debug.32 release/temp/templates_server/linux_http_server_32_debug
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.debug.64 release/temp/templates_server/linux_http_server_64_debug
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.debug.arm release/temp/templates_server/linux_http_server_arm32_debug
|
|
|
|
cp bin/pandemonium_http_server.x11.opt.debug.arm64 release/temp/templates_server/linux_http_server_arm64_debug
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
# JS
|
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.javascript.opt.zip release/temp/templates/webassembly_release.zip
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium.javascript.opt.threads.zip release/temp/templates/webassembly_threads_release.zip
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.javascript.opt.gdnative.zip release/temp/templates/webassembly_gdnative_release.zip
|
|
|
|
|
|
|
|
cp bin/pandemonium.javascript.opt.debug.zip release/temp/templates/webassembly_debug.zip
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium.javascript.opt.debug.threads.zip release/temp/templates/webassembly_threads_debug.zip
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.javascript.opt.debug.gdnative.zip release/temp/templates/webassembly_gdnative_debug.zip
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
# Android
|
|
|
|
cp bin/android_source.zip release/temp/templates/android_source.zip
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/android_release.apk release/temp/templates/android_release.apk
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/android_debug.apk release/temp/templates/android_debug.apk
|
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium-lib.release.aar release/temp/templates/android_pandemonium-lib.release.aar
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium-lib.debug.aar release/temp/templates/android_pandemonium-lib.debug.aar
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
# OSX - export templates
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/osx.zip release/temp/templates/osx.zip
|
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# IOS
|
|
|
|
cp bin/iphone.zip release/temp/templates/iphone.zip
|
|
|
|
|
|
|
|
# FRT
|
|
|
|
|
|
|
|
cp bin/pandemonium.frt.opt.arm32v6 release/temp/templates_sbc/linux_frt_arm32v6_release
|
|
|
|
cp bin/pandemonium.frt.opt.arm32v7 release/temp/templates_sbc/linux_frt_arm32v7_release
|
|
|
|
cp bin/pandemonium.frt.opt.arm64v8 release/temp/templates_sbc/linux_frt_arm64v8_release
|
|
|
|
|
|
|
|
cp bin/pandemonium.frt.opt.debug.arm32v6 release/temp/templates_sbc/linux_frt_arm32v6_debug
|
|
|
|
cp bin/pandemonium.frt.opt.debug.arm32v7 release/temp/templates_sbc/linux_frt_arm32v7_debug
|
|
|
|
cp bin/pandemonium.frt.opt.debug.arm64v8 release/temp/templates_sbc/linux_frt_arm64v8_debug
|
|
|
|
|
|
|
|
# FRT SDL
|
|
|
|
|
|
|
|
cp bin/pandemonium.frt_sdl.opt.arm32v6 release/temp/templates_sbc/linux_frt_sdl_arm32v6_release
|
|
|
|
cp bin/pandemonium.frt_sdl.opt.arm32v7 release/temp/templates_sbc/linux_frt_sdl_arm32v7_release
|
|
|
|
cp bin/pandemonium.frt_sdl.opt.arm64v8 release/temp/templates_sbc/linux_frt_sdl_arm64v8_release
|
|
|
|
|
|
|
|
cp bin/pandemonium.frt_sdl.opt.debug.arm32v6 release/temp/templates_sbc/linux_frt_sdl_arm32v6_debug
|
|
|
|
cp bin/pandemonium.frt_sdl.opt.debug.arm32v7 release/temp/templates_sbc/linux_frt_sdl_arm32v7_debug
|
|
|
|
cp bin/pandemonium.frt_sdl.opt.debug.arm64v8 release/temp/templates_sbc/linux_frt_sdl_arm64v8_debug
|
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
# ==== Copy Enditors ====
|
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# Windows
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
cp bin/pandemonium.windows.opt.tools.32.exe release/temp/pandemonium_v${version_snake_cased}_stable_win32.exe
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.windows.opt.tools.64.exe release/temp/pandemonium_v${version_snake_cased}_stable_win64.exe
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# Linux
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
cp bin/pandemonium.x11.opt.tools.32 release/temp/pandemonium_v${version_snake_cased}_stable_linux_32
|
|
|
|
cp bin/pandemonium.x11.opt.tools.64 release/temp/pandemonium_v${version_snake_cased}_stable_linux_64
|
|
|
|
cp bin/pandemonium.x11.opt.tools.arm release/temp/pandemonium_v${version_snake_cased}_stable_linux_arm32
|
|
|
|
cp bin/pandemonium.x11.opt.tools.arm64 release/temp/pandemonium_v${version_snake_cased}_stable_linux_arm64
|
2022-10-14 18:55:53 +02:00
|
|
|
|
2024-04-21 23:18:57 +02:00
|
|
|
# Server (Linux)
|
|
|
|
|
|
|
|
cp bin/pandemonium_server.x11.opt.tools.32 release/temp/pandemonium_v${version_snake_cased}_stable_linux_server_32
|
|
|
|
cp bin/pandemonium_server.x11.opt.tools.64 release/temp/pandemonium_v${version_snake_cased}_stable_linux_server_64
|
|
|
|
cp bin/pandemonium_server.x11.opt.tools.arm release/temp/pandemonium_v${version_snake_cased}_stable_linux_server_arm32
|
|
|
|
cp bin/pandemonium_server.x11.opt.tools.arm64 release/temp/pandemonium_v${version_snake_cased}_stable_linux_server_arm64
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
# JS
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/pandemonium.javascript.opt.tools.threads.zip release/temp/pandemonium_v${version_snake_cased}_stable_javascript.zip
|
|
|
|
|
|
|
|
# Android
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp bin/android_editor.apk release/temp/pandemonium_v${version_snake_cased}_stable_android.apk
|
|
|
|
|
|
|
|
# OSX - Editor
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp -r bin/Pandemonium.app release/temp/pandemonium_v${version_snake_cased}_stable_osx.app
|
|
|
|
|
|
|
|
# ==== Copy sources ====
|
|
|
|
|
|
|
|
mkdir release/temp/pandemonium_v${version_snake_cased}_source
|
|
|
|
|
|
|
|
# Warn if a file is over a megabyte. Used to catch big temporary files that would slip through outherwise
|
|
|
|
python ./misc/scripts_app/copy_repos.py . ./release/temp/pandemonium_v${version_snake_cased}_source 1048576
|
|
|
|
|
|
|
|
# ==== Create version.txt for the export templates ====
|
|
|
|
|
|
|
|
./bin/pandemonium.x11.opt.tools.64 --version-full-config > release/temp/templates/version.txt
|
2024-04-21 23:18:57 +02:00
|
|
|
./bin/pandemonium.x11.opt.tools.64 --version-full-config > release/temp/templates_server/version.txt
|
|
|
|
./bin/pandemonium.x11.opt.tools.64 --version-full-config > release/temp/templates_sbc/version.txt
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
# ==== Zip everything ====
|
|
|
|
|
|
|
|
cd release/temp
|
|
|
|
|
|
|
|
# Export templates
|
|
|
|
|
|
|
|
zip -q -r ../pandemonium_v${version_snake_cased}_stable_export_templates.zip ./templates/*
|
2024-04-21 23:18:57 +02:00
|
|
|
zip -q -r ../pandemonium_v${version_snake_cased}_stable_export_templates_server.zip ./templates_server/*
|
|
|
|
zip -q -r ../pandemonium_v${version_snake_cased}_stable_export_templates_sbc.zip ./templates_sbc/*
|
|
|
|
|
|
|
|
# == Editors ==
|
|
|
|
|
|
|
|
# Windows
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_win32.zip ./pandemonium_v${version_snake_cased}_stable_win32.exe
|
2024-04-21 23:18:57 +02:00
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_win64.zip ./pandemonium_v${version_snake_cased}_stable_win64.exe
|
|
|
|
|
|
|
|
# Linux
|
|
|
|
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_32.zip ./pandemonium_v${version_snake_cased}_stable_linux_32
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_64.zip ./pandemonium_v${version_snake_cased}_stable_linux_64
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_arm32.zip ./pandemonium_v${version_snake_cased}_stable_linux_arm32
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_arm64.zip ./pandemonium_v${version_snake_cased}_stable_linux_arm64
|
|
|
|
|
|
|
|
# Server (Linux)
|
|
|
|
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_server_32.zip ./pandemonium_v${version_snake_cased}_stable_linux_server_32
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_server_64.zip ./pandemonium_v${version_snake_cased}_stable_linux_server_64
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_server_arm32.zip ./pandemonium_v${version_snake_cased}_stable_linux_server_arm32
|
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_linux_server_arm64.zip ./pandemonium_v${version_snake_cased}_stable_linux_server_arm64
|
|
|
|
|
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
# Android
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
zip -q ../pandemonium_v${version_snake_cased}_stable_android.zip ./pandemonium_v${version_snake_cased}_stable_android.apk
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
# OSX - Editor
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
zip -r -q ../pandemonium_v${version_snake_cased}_stable_osx.app.zip ./pandemonium_v${version_snake_cased}_stable_osx.app
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-15 15:10:55 +02:00
|
|
|
# Sources
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-15 15:10:55 +02:00
|
|
|
zip -r -q ../pandemonium_v${version_snake_cased}_source.zip ./pandemonium_v${version_snake_cased}_source
|
2022-10-14 18:55:53 +02:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
# JS
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
cp ./temp/pandemonium_v${version_snake_cased}_stable_javascript.zip pandemonium_v${version_snake_cased}_stable_javascript.zip
|
|
|
|
|
|
|
|
# ==== Rename export temlpates to tpz ====
|
|
|
|
# It's still a normal zip though
|
|
|
|
# Maybe it should be just kept as a normal zip?
|
2024-04-21 23:18:57 +02:00
|
|
|
|
2022-10-14 18:55:53 +02:00
|
|
|
mv pandemonium_v${version_snake_cased}_stable_export_templates.zip pandemonium_v${version_snake_cased}_stable_export_templates.tpz
|
2024-04-21 23:18:57 +02:00
|
|
|
mv pandemonium_v${version_snake_cased}_stable_export_templates_server.zip pandemonium_v${version_snake_cased}_stable_export_templates_server.tpz
|
|
|
|
mv pandemonium_v${version_snake_cased}_stable_export_templates_sbc.zip pandemonium_v${version_snake_cased}_stable_export_templates_sbc.tpz
|