mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-20 07:01:27 +02:00
Handle steam builds in build.sh
Also report the package mode/type in tpt.version and the user agent, and make shared data folder support optional.
This commit is contained in:
9
.github/build.sh
vendored
9
.github/build.sh
vendored
@@ -208,6 +208,7 @@ meson_configure+=$'\t'-Dapp_vendor=$APP_VENDOR
|
|||||||
meson_configure+=$'\t'-Dstrip=false
|
meson_configure+=$'\t'-Dstrip=false
|
||||||
meson_configure+=$'\t'-Db_staticpic=false
|
meson_configure+=$'\t'-Db_staticpic=false
|
||||||
meson_configure+=$'\t'-Dmod_id=$MOD_ID
|
meson_configure+=$'\t'-Dmod_id=$MOD_ID
|
||||||
|
meson_configure+=$'\t'-Dpackage_mode=$PACKAGE_MODE
|
||||||
case $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_DEBUG_RELEASE in
|
case $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_DEBUG_RELEASE in
|
||||||
x86_64-linux-gnu-debug) ;&
|
x86_64-linux-gnu-debug) ;&
|
||||||
x86_64-windows-mingw-debug) ;&
|
x86_64-windows-mingw-debug) ;&
|
||||||
@@ -429,6 +430,12 @@ if [[ $PACKAGE_MODE == appimage ]]; then
|
|||||||
meson configure -Dcan_install=no -Dignore_updates=true -Dbuild_render=false -Dbuild_font=false
|
meson configure -Dcan_install=no -Dignore_updates=true -Dbuild_render=false -Dbuild_font=false
|
||||||
strip_target=$APP_EXE
|
strip_target=$APP_EXE
|
||||||
fi
|
fi
|
||||||
|
if [[ $PACKAGE_MODE == steam ]]; then
|
||||||
|
meson configure -Dshared_data_folder=false -Dignore_updates=true
|
||||||
|
if [[ $BSH_HOST_PLATFORM != darwin ]]; then
|
||||||
|
meson configure -Dcan_install=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
meson_compile=meson$'\t'compile
|
meson_compile=meson$'\t'compile
|
||||||
meson_compile+=$'\t'-v
|
meson_compile+=$'\t'-v
|
||||||
if [[ $BSH_BUILD_PLATFORM == windows ]] && [[ $PACKAGE_MODE != backendvs ]]; then
|
if [[ $BSH_BUILD_PLATFORM == windows ]] && [[ $PACKAGE_MODE != backendvs ]]; then
|
||||||
@@ -463,7 +470,7 @@ if [[ $BSH_HOST_PLATFORM == android ]]; then
|
|||||||
ANDROID_KEYSTORE_PASS=bagelsbagels ninja android/$APP_EXE.apk
|
ANDROID_KEYSTORE_PASS=bagelsbagels ninja android/$APP_EXE.apk
|
||||||
mv android/$APP_EXE.apk $APP_EXE.apk
|
mv android/$APP_EXE.apk $APP_EXE.apk
|
||||||
fi
|
fi
|
||||||
if [[ $PACKAGE_MODE == dmg ]]; then
|
if [[ $BSH_HOST_PLATFORM == darwin ]]; then
|
||||||
# so far this can only happen with $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == darwin-macos
|
# so far this can only happen with $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == darwin-macos
|
||||||
appdir=$APP_NAME.app
|
appdir=$APP_NAME.app
|
||||||
mkdir $appdir
|
mkdir $appdir
|
||||||
|
124
.github/prepare.py
vendored
124
.github/prepare.py
vendored
@@ -26,17 +26,17 @@ if match_stable:
|
|||||||
release_type = 'stable'
|
release_type = 'stable'
|
||||||
release_name = 'v%s.%s.%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3))
|
release_name = 'v%s.%s.%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3))
|
||||||
do_release = True
|
do_release = True
|
||||||
do_priority = 0
|
do_priority = -5
|
||||||
elif match_beta:
|
elif match_beta:
|
||||||
release_type = 'beta'
|
release_type = 'beta'
|
||||||
release_name = 'v%s.%s.%sb' % (match_beta.group(1), match_beta.group(2), match_beta.group(3))
|
release_name = 'v%s.%s.%sb' % (match_beta.group(1), match_beta.group(2), match_beta.group(3))
|
||||||
do_release = True
|
do_release = True
|
||||||
do_priority = 0
|
do_priority = -5
|
||||||
elif match_snapshot:
|
elif match_snapshot:
|
||||||
release_type = 'snapshot'
|
release_type = 'snapshot'
|
||||||
release_name = 'snapshot-%s' % match_snapshot.group(1)
|
release_name = 'snapshot-%s' % match_snapshot.group(1)
|
||||||
do_release = True
|
do_release = True
|
||||||
do_priority = 0
|
do_priority = -5
|
||||||
elif match_tptlibsdev:
|
elif match_tptlibsdev:
|
||||||
release_type = 'tptlibsdev'
|
release_type = 'tptlibsdev'
|
||||||
release_name = 'tptlibsdev-%s' % match_tptlibsdev.group(1)
|
release_name = 'tptlibsdev-%s' % match_tptlibsdev.group(1)
|
||||||
@@ -45,7 +45,7 @@ else:
|
|||||||
release_type = 'dev'
|
release_type = 'dev'
|
||||||
release_name = 'dev'
|
release_name = 'dev'
|
||||||
if match_alljobs:
|
if match_alljobs:
|
||||||
do_priority = 0
|
do_priority = -5
|
||||||
do_publish = publish_hostport and do_release
|
do_publish = publish_hostport and do_release
|
||||||
|
|
||||||
set_output('release_type', release_type)
|
set_output('release_type', release_type)
|
||||||
@@ -95,53 +95,56 @@ app_name_slug = re.sub('[^A-Za-z0-9]', '_', app_name)
|
|||||||
build_matrix = []
|
build_matrix = []
|
||||||
publish_matrix = []
|
publish_matrix = []
|
||||||
# consider disabling line wrapping to edit this monstrosity
|
# consider disabling line wrapping to edit this monstrosity
|
||||||
for arch, platform, libc, statdyn, bplatform, runson, suffix, publish, artifact, dbgsuffix, mode, starcatcher, dbgrel, priority in [
|
for arch, platform, libc, statdyn, bplatform, runson, suffix, reason, dbgsuffix, mode, starcatcher, dbgrel, priority in [
|
||||||
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', True, True, '.dbg', None, 'x86_64-lin-gcc-static', 'release', 10 ),
|
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', 'publish', '.dbg', None, 'x86_64-lin-gcc-static', 'release', 10 ),
|
||||||
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', False, True, '.dbg', 'appimage', None, 'release', 0 ), # priority = 0: appimage release
|
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', 'publish', '.dbg', 'steam', 'x86_64-lin-gcc-static', 'release', -5 ), # priority = -5: steam build
|
||||||
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', False, False, None, None, None, 'debug', 10 ),
|
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-22.04', '', 'archive', '.dbg', 'appimage', None, 'release', 0 ), # priority = 0: appimage release
|
||||||
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', False, False, None, 'nohttp', None, 'debug', 10 ),
|
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', 'check', None, None, None, 'debug', 10 ),
|
||||||
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', False, False, None, 'nolua', None, 'debug', 10 ),
|
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', 'check', None, 'nohttp', None, 'debug', 10 ),
|
||||||
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', False, False, None, None, None, 'release', 10 ),
|
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', 'check', None, 'nolua', None, 'debug', 10 ),
|
||||||
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-22.04', '', False, False, None, None, None, 'debug', 10 ), # ubuntu-22.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them; worse, it's a different toolchain
|
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-22.04', '', 'check', None, None, None, 'release', 10 ),
|
||||||
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-22.04', '', False, True, '.dbg', None, None, 'release', 10 ), # ubuntu-22.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them; worse, it's a different toolchain
|
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-22.04', '', 'check', None, None, None, 'debug', 10 ), # ubuntu-22.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them; worse, it's a different toolchain
|
||||||
# ( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-22.04', '', False, False, None, None, None, 'debug', 10 ), # ubuntu-22.04 doesn't have ucrt64-capable mingw >_>
|
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-22.04', '', 'archive', '.dbg', None, None, 'release', 10 ), # ubuntu-22.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them; worse, it's a different toolchain
|
||||||
# ( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-22.04', '', False, False, None, None, None, 'release', 10 ), # ubuntu-22.04 doesn't have ucrt64-capable mingw >_>
|
# ( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-22.04', '', 'check', None, None, None, 'debug', 10 ), # ubuntu-22.04 doesn't have ucrt64-capable mingw >_>
|
||||||
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
# ( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-22.04', '', 'check', None, None, None, 'release', 10 ), # ubuntu-22.04 doesn't have ucrt64-capable mingw >_>
|
||||||
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, True, '.dbg', None, None, 'release', 10 ),
|
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
|
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', 'archive', '.dbg', None, None, 'release', 10 ),
|
||||||
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
|
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 10 ),
|
||||||
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'release', 10 ),
|
||||||
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None,'x86_64-win-msvc-static', 'release', 10 ),
|
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
|
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'publish', '.pdb', None, 'x86_64-win-msvc-static', 'release', 10 ),
|
||||||
# ( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, 'backendvs', None, 'debug', 0 ), # priority = 0: backend=vs build
|
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'publish', '.pdb', 'steam', 'x86_64-win-msvc-static', 'release', -5 ), # priority = -5: steam build
|
||||||
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
|
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 10 ),
|
||||||
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
# ( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, 'backendvs', None, 'debug', 0 ), # priority = 0: backend=vs build
|
||||||
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None, 'i686-win-msvc-static', 'release', 10 ),
|
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'release', 10 ),
|
||||||
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
|
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
|
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'publish', '.pdb', None, 'i686-win-msvc-static', 'release', 10 ),
|
||||||
( 'aarch64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 10 ),
|
||||||
( 'aarch64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None, 'arm64-win-msvc-static', 'release', 10 ),
|
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'release', 10 ),
|
||||||
( 'aarch64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
|
( 'aarch64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'aarch64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
|
( 'aarch64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', 'publish', '.pdb', None, 'arm64-win-msvc-static', 'release', 10 ),
|
||||||
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', False, False, None, 'dmg', None, 'debug', 0 ), # priority = 0: static debug build
|
( 'aarch64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'debug', 10 ),
|
||||||
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', True, True, None, 'dmg', 'x86_64-mac-gcc-static', 'release', 10 ), # I have no idea how to separate debug info on macos
|
( 'aarch64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', 'check', None, None, None, 'release', 10 ),
|
||||||
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', False, False, None, 'dmg', None, 'debug', 10 ),
|
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', False, False, None, 'dmg', None, 'release', 10 ),
|
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', 'publish', None, None, 'x86_64-mac-gcc-static', 'release', 10 ), # I have no idea how to separate debug info on macos
|
||||||
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', False, False, None, 'dmg', None, 'debug', 0 ), # priority = 0: static debug build
|
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', 'publish', None, 'steam', 'x86_64-mac-gcc-static', 'release', -5 ), # priority = -5: steam build, see above regarding debug info
|
||||||
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', True, True, None, 'dmg', 'arm64-mac-gcc-static', 'release', 10 ),
|
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', 'check', None, None, None, 'debug', 10 ),
|
||||||
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', False, False, None, 'dmg', None, 'debug', 10 ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
|
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', 'check', None, None, None, 'release', 10 ),
|
||||||
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', False, False, None, 'dmg', None, 'release', 10 ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
|
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', 'check', None, None, None, 'debug', 0 ), # priority = 0: static debug build
|
||||||
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-13', '.dmg', 'publish', None, None, 'arm64-mac-gcc-static', 'release', 10 ),
|
||||||
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', True, True, '.dbg', None, 'i686-and-gcc-static', 'release', 10 ),
|
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', 'check', None, None, None, 'debug', 10 ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
|
||||||
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-13', '.dmg', 'check', None, None, None, 'release', 10 ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
|
||||||
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', True, True, '.dbg', None, 'x86_64-and-gcc-static', 'release', 10 ),
|
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'check', None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
||||||
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'publish', '.dbg', None, 'i686-and-gcc-static', 'release', 10 ),
|
||||||
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', True, True, '.dbg', None, 'arm-and-gcc-static', 'release', 10 ),
|
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'check', None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
||||||
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'publish', '.dbg', None, 'x86_64-and-gcc-static', 'release', 10 ),
|
||||||
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', True, True, '.dbg', None, 'arm64-and-gcc-static', 'release', 10 ),
|
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'check', None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
||||||
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'publish', '.dbg', None, 'arm-and-gcc-static', 'release', 10 ),
|
||||||
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', True, True, None, 'emscripten', 'wasm32-ems-static', 'release', 10 ), # I have no idea how to separate debug info on emscripten
|
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'check', None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
||||||
|
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-22.04', '.apk', 'publish', '.dbg', None, 'arm64-and-gcc-static', 'release', 10 ),
|
||||||
|
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', 'check', None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
|
||||||
|
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-22.04', '.tar', 'publish', None, 'emscripten', 'wasm32-ems-static', 'release', 10 ), # I have no idea how to separate debug info on emscripten
|
||||||
]:
|
]:
|
||||||
if priority < do_priority:
|
if priority < do_priority:
|
||||||
continue
|
continue
|
||||||
@@ -162,21 +165,30 @@ for arch, platform, libc, statdyn, bplatform, runso
|
|||||||
separate_debug = False
|
separate_debug = False
|
||||||
if not starcatcher:
|
if not starcatcher:
|
||||||
starcatcher = 'BOGUS'
|
starcatcher = 'BOGUS'
|
||||||
if publish:
|
job_release_name = release_name
|
||||||
assert artifact
|
if mode == 'steam':
|
||||||
|
job_release_name += '+steam'
|
||||||
|
job_name += '+steam'
|
||||||
|
artifact = False
|
||||||
|
publish = False
|
||||||
|
if reason == 'publish':
|
||||||
|
artifact = True
|
||||||
|
publish = True
|
||||||
|
if reason == 'archive':
|
||||||
|
artifact = True
|
||||||
if dbgrel != 'release':
|
if dbgrel != 'release':
|
||||||
assert not publish
|
assert not publish
|
||||||
assert not artifact
|
assert not artifact
|
||||||
asset_path = f'{app_exe}{suffix}'
|
asset_path = f'{app_exe}{suffix}'
|
||||||
asset_name = f'{app_exe}-{release_name}-{arch}-{platform}-{libc}{suffix}'
|
asset_name = f'{app_exe}-{job_release_name}-{arch}-{platform}-{libc}{suffix}'
|
||||||
debug_asset_path = f'{app_exe}{dbgsuffix}'
|
debug_asset_path = f'{app_exe}{dbgsuffix}'
|
||||||
debug_asset_name = f'{app_exe}-{release_name}-{arch}-{platform}-{libc}{dbgsuffix}'
|
debug_asset_name = f'{app_exe}-{job_release_name}-{arch}-{platform}-{libc}{dbgsuffix}'
|
||||||
if mode == 'appimage':
|
if mode == 'appimage':
|
||||||
asset_path = f'{app_name_slug}-{arch}.AppImage'
|
asset_path = f'{app_name_slug}-{arch}.AppImage'
|
||||||
asset_name = f'{app_name_slug}-{arch}.AppImage'
|
asset_name = f'{app_name_slug}-{arch}.AppImage'
|
||||||
debug_asset_path = f'{app_name_slug}-{arch}.AppImage.dbg'
|
debug_asset_path = f'{app_name_slug}-{arch}.AppImage.dbg'
|
||||||
debug_asset_name = f'{app_name_slug}-{arch}.AppImage.dbg'
|
debug_asset_name = f'{app_name_slug}-{arch}.AppImage.dbg'
|
||||||
starcatcher_name = f'powder-{release_name}-{starcatcher}{suffix}'
|
starcatcher_name = f'powder-{job_release_name}-{starcatcher}{suffix}'
|
||||||
msys2_bash = (bplatform == 'windows' and libc == 'mingw')
|
msys2_bash = (bplatform == 'windows' and libc == 'mingw')
|
||||||
shell = 'bash'
|
shell = 'bash'
|
||||||
if msys2_bash:
|
if msys2_bash:
|
||||||
|
@@ -24,6 +24,12 @@ option(
|
|||||||
value: 'auto',
|
value: 'auto',
|
||||||
description: 'Disable (\'no\') or enable (\'yes\') setting up file and URL associations, or even offer to do it at startup (\'yes_check\')'
|
description: 'Disable (\'no\') or enable (\'yes\') setting up file and URL associations, or even offer to do it at startup (\'yes_check\')'
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'shared_data_folder',
|
||||||
|
type: 'boolean',
|
||||||
|
value: true,
|
||||||
|
description: 'Handle the shared data folder, e.g. automatically chdir over to it and offering migration to it'
|
||||||
|
)
|
||||||
option(
|
option(
|
||||||
'http',
|
'http',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
@@ -183,6 +189,12 @@ option(
|
|||||||
value: '',
|
value: '',
|
||||||
description: 'tpt-libs vtag override, only used for tpt-libs development'
|
description: 'tpt-libs vtag override, only used for tpt-libs development'
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'package_mode',
|
||||||
|
type: 'string',
|
||||||
|
value: 'default',
|
||||||
|
description: 'Package mode override, only used by official builds, see prepare.py'
|
||||||
|
)
|
||||||
option(
|
option(
|
||||||
'android_keystore',
|
'android_keystore',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
@@ -13,6 +13,7 @@ constexpr bool LUACONSOLE = @LUACONSOLE@;
|
|||||||
constexpr bool ALLOW_FAKE_NEWER_VERSION = @ALLOW_FAKE_NEWER_VERSION@;
|
constexpr bool ALLOW_FAKE_NEWER_VERSION = @ALLOW_FAKE_NEWER_VERSION@;
|
||||||
constexpr bool USE_UPDATESERVER = @USE_UPDATESERVER@;
|
constexpr bool USE_UPDATESERVER = @USE_UPDATESERVER@;
|
||||||
constexpr bool CAN_INSTALL = @CAN_INSTALL@;
|
constexpr bool CAN_INSTALL = @CAN_INSTALL@;
|
||||||
|
constexpr bool SHARED_DATA_FOLDER = @SHARED_DATA_FOLDER@;
|
||||||
constexpr bool USE_BLUESCREEN = @USE_BLUESCREEN@;
|
constexpr bool USE_BLUESCREEN = @USE_BLUESCREEN@;
|
||||||
constexpr bool INSTALL_CHECK = @INSTALL_CHECK@;
|
constexpr bool INSTALL_CHECK = @INSTALL_CHECK@;
|
||||||
constexpr bool IGNORE_UPDATES = @IGNORE_UPDATES@;
|
constexpr bool IGNORE_UPDATES = @IGNORE_UPDATES@;
|
||||||
@@ -45,6 +46,7 @@ constexpr char APPEXE[] = "@APPEXE@";
|
|||||||
constexpr char APPID[] = "@APPID@";
|
constexpr char APPID[] = "@APPID@";
|
||||||
constexpr char APPDATA[] = "@APPDATA@";
|
constexpr char APPDATA[] = "@APPDATA@";
|
||||||
constexpr char APPVENDOR[] = "@APPVENDOR@";
|
constexpr char APPVENDOR[] = "@APPVENDOR@";
|
||||||
|
constexpr char PACKAGE_MODE[] = "@PACKAGE_MODE@";
|
||||||
|
|
||||||
constexpr int MOD_ID = @MOD_ID@;
|
constexpr int MOD_ID = @MOD_ID@;
|
||||||
|
|
||||||
|
@@ -321,7 +321,7 @@ int Main(int argc, char *argv[])
|
|||||||
else
|
else
|
||||||
perror("failed to chdir to requested ddir");
|
perror("failed to chdir to requested ddir");
|
||||||
}
|
}
|
||||||
else
|
else if constexpr (SHARED_DATA_FOLDER)
|
||||||
{
|
{
|
||||||
auto ddir = Platform::DefaultDdir();
|
auto ddir = Platform::DefaultDdir();
|
||||||
if (!Platform::FileExists("powder.pref"))
|
if (!Platform::FileExists("powder.pref"))
|
||||||
|
@@ -16,6 +16,7 @@ namespace http
|
|||||||
" (", IDENT_PLATFORM,
|
" (", IDENT_PLATFORM,
|
||||||
"; NO", // Unused, used to be SSE level.
|
"; NO", // Unused, used to be SSE level.
|
||||||
"; M", MOD_ID,
|
"; M", MOD_ID,
|
||||||
|
"; P", PACKAGE_MODE,
|
||||||
"; ", IDENT,
|
"; ", IDENT,
|
||||||
") TPTPP/", apiVersion[0], ".", apiVersion[1], ".", APP_VERSION.build, IDENT_RELTYPE, ".", APP_VERSION.build
|
") TPTPP/", apiVersion[0], ".", apiVersion[1], ".", APP_VERSION.build, IDENT_RELTYPE, ".", APP_VERSION.build
|
||||||
);
|
);
|
||||||
|
@@ -107,4 +107,5 @@ if can_install != 'no' and can_install_enforce_no
|
|||||||
error('cannot provide install support, configure with -Dcan_install=no to fix this error')
|
error('cannot provide install support, configure with -Dcan_install=no to fix this error')
|
||||||
endif
|
endif
|
||||||
conf_data.set('CAN_INSTALL', (can_install != 'no').to_string())
|
conf_data.set('CAN_INSTALL', (can_install != 'no').to_string())
|
||||||
|
conf_data.set('SHARED_DATA_FOLDER', get_option('shared_data_folder').to_string())
|
||||||
conf_data.set('INSTALL_CHECK', (can_install == 'yes_check').to_string())
|
conf_data.set('INSTALL_CHECK', (can_install == 'yes_check').to_string())
|
||||||
|
@@ -331,7 +331,7 @@ OptionsView::OptionsView() : ui::Window(ui::Point(-1, -1), ui::Point(320, 340))
|
|||||||
});
|
});
|
||||||
|
|
||||||
currentY += 4;
|
currentY += 4;
|
||||||
if (ALLOW_DATA_FOLDER)
|
if constexpr (ALLOW_DATA_FOLDER)
|
||||||
{
|
{
|
||||||
auto *dataFolderButton = new ui::Button(ui::Point(10, currentY), ui::Point(90, 16), "Open data folder");
|
auto *dataFolderButton = new ui::Button(ui::Point(10, currentY), ui::Point(90, 16), "Open data folder");
|
||||||
dataFolderButton->SetActionCallback({ [] {
|
dataFolderButton->SetActionCallback({ [] {
|
||||||
@@ -346,6 +346,8 @@ OptionsView::OptionsView() : ui::Window(ui::Point(-1, -1), ui::Point(320, 340))
|
|||||||
}
|
}
|
||||||
} });
|
} });
|
||||||
scrollPanel->AddChild(dataFolderButton);
|
scrollPanel->AddChild(dataFolderButton);
|
||||||
|
if constexpr (SHARED_DATA_FOLDER)
|
||||||
|
{
|
||||||
auto *migrationButton = new ui::Button(ui::Point(Size.X - 178, currentY), ui::Point(163, 16), "Migrate to shared data directory");
|
auto *migrationButton = new ui::Button(ui::Point(Size.X - 178, currentY), ui::Point(163, 16), "Migrate to shared data directory");
|
||||||
migrationButton->SetActionCallback({ [] {
|
migrationButton->SetActionCallback({ [] {
|
||||||
ByteString from = Platform::originalCwd;
|
ByteString from = Platform::originalCwd;
|
||||||
@@ -356,6 +358,7 @@ OptionsView::OptionsView() : ui::Window(ui::Point(-1, -1), ui::Point(320, 340))
|
|||||||
} });
|
} });
|
||||||
} });
|
} });
|
||||||
scrollPanel->AddChild(migrationButton);
|
scrollPanel->AddChild(migrationButton);
|
||||||
|
}
|
||||||
currentY += 26;
|
currentY += 26;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@@ -294,6 +294,8 @@ void LuaMisc::Open(lua_State *L)
|
|||||||
tpt_lua_pushByteString(L, vcsTag);
|
tpt_lua_pushByteString(L, vcsTag);
|
||||||
lua_setfield(L, -2, "vcstag");
|
lua_setfield(L, -2, "vcstag");
|
||||||
}
|
}
|
||||||
|
lua_pushstring(L, PACKAGE_MODE);
|
||||||
|
lua_setfield(L, -2, "packagemode");
|
||||||
lua_setfield(L, -2, "version");
|
lua_setfield(L, -2, "version");
|
||||||
}
|
}
|
||||||
lua_setglobal(L, "tpt");
|
lua_setglobal(L, "tpt");
|
||||||
|
@@ -90,6 +90,7 @@ conf_data.set('APPEXE', app_exe)
|
|||||||
conf_data.set('APPID', app_id)
|
conf_data.set('APPID', app_id)
|
||||||
conf_data.set('APPDATA', get_option('app_data'))
|
conf_data.set('APPDATA', get_option('app_data'))
|
||||||
conf_data.set('APPVENDOR', get_option('app_vendor'))
|
conf_data.set('APPVENDOR', get_option('app_vendor'))
|
||||||
|
conf_data.set('PACKAGE_MODE', get_option('package_mode'))
|
||||||
|
|
||||||
if host_platform == 'android'
|
if host_platform == 'android'
|
||||||
android_permissions = [
|
android_permissions = [
|
||||||
|
Reference in New Issue
Block a user