From f9d4a62aa6146b16be97fcbc6220439e5842173e Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 30 May 2024 00:09:52 -0400 Subject: [PATCH] temp changes for steam: disable update / install check set mod id to 15, but disable the alternate update server disable most builds I don't care about use alternate secrets so that it doesn't conflict with "modtest" disable shared data directory --- .github/build.sh | 15 ++++++++------- .github/mod_id.txt | 2 +- .github/prepare.py | 3 +++ .github/workflows/build.yaml | 10 +++++----- src/PowderToy.cpp | 4 ++-- src/common/platform/meson.build | 2 +- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.github/build.sh b/.github/build.sh index 5065b626ef..f74347bcab 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -202,6 +202,7 @@ meson_configure+=$'\t'-Dapp_vendor=$APP_VENDOR meson_configure+=$'\t'-Dstrip=false meson_configure+=$'\t'-Db_staticpic=false meson_configure+=$'\t'-Dmod_id=$MOD_ID +meson_configure+=$'\t'-Dignore_updates=true case $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_DEBUG_RELEASE in x86_64-linux-gnu-debug) ;& x86_64-windows-mingw-debug) ;& @@ -288,13 +289,13 @@ if [[ $RELEASE_TYPE == snapshot ]] && [[ $MOD_ID != 0 ]]; then >&2 echo "mods and snapshots do not mix" exit 1 fi -if [[ $RELEASE_TYPE == snapshot ]] || [[ $MOD_ID != 0 ]]; then - meson_configure+=$'\t'-Dupdate_server=starcatcher.us/TPT - if [[ $BSH_HOST_PLATFORM == emscripten ]]; then - meson_configure+=$'\t'-Dserver=tptserv.starcatcher.us - meson_configure+=$'\t'-Dstatic_server=tptserv.starcatcher.us/Static - fi -fi +#if [[ $RELEASE_TYPE == snapshot ]] || [[ $MOD_ID != 0 ]]; then +# meson_configure+=$'\t'-Dupdate_server=starcatcher.us/TPT +# if [[ $BSH_HOST_PLATFORM == emscripten ]]; then +# meson_configure+=$'\t'-Dserver=tptserv.starcatcher.us +# meson_configure+=$'\t'-Dstatic_server=tptserv.starcatcher.us/Static +# fi +#fi if [[ $RELEASE_TYPE != dev ]]; then meson_configure+=$'\t'-Dignore_updates=false fi diff --git a/.github/mod_id.txt b/.github/mod_id.txt index 573541ac97..60d3b2f4a4 100644 --- a/.github/mod_id.txt +++ b/.github/mod_id.txt @@ -1 +1 @@ -0 +15 diff --git a/.github/prepare.py b/.github/prepare.py index 1778023c33..d72ce0593c 100755 --- a/.github/prepare.py +++ b/.github/prepare.py @@ -141,6 +141,9 @@ def set_output(key, value): ]: if priority < do_priority: continue + # Skip unimportant builds for Steam + if not publish: + continue job_name = f'build' if starcatcher: job_name += f'+target=starcatcher-{starcatcher}' diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7131e51c85..d97b2aeef8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,7 +39,7 @@ jobs: - id: prepare run: python ./.github/prepare.py env: - PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }} + PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT_STEAM }} GITHUB_REF: ${{ github.ref }} - if: steps.prepare.outputs.do_release == 'yes' id: create_release @@ -155,10 +155,10 @@ jobs: - run: mv ${{ matrix.asset_path }} ${{ matrix.starcatcher_name }} - run: sudo apt update && sudo apt install curlftpfs && bash -c './.github/starcatcher-publish.sh' env: - PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }} - PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }} - PUBLISH_PASSWORD: ${{ secrets.STARCATCHER_PUBLISH_PASSWORD }} - PUBLISH_DIRECTORY: ${{ secrets.STARCATCHER_PUBLISH_DIRECTORY }} + PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT_STEAM }} + PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME_STEAM }} + PUBLISH_PASSWORD: ${{ secrets.STARCATCHER_PUBLISH_PASSWORD_STEAM }} + PUBLISH_DIRECTORY: ${{ secrets.STARCATCHER_PUBLISH_DIRECTORY_STEAM }} PUBLISH_FILENAME: ${{ matrix.starcatcher_name }} release: runs-on: ubuntu-latest diff --git a/src/PowderToy.cpp b/src/PowderToy.cpp index f96409945d..d408e01251 100644 --- a/src/PowderToy.cpp +++ b/src/PowderToy.cpp @@ -321,7 +321,7 @@ int Main(int argc, char *argv[]) else perror("failed to chdir to requested ddir"); } - else + /*else { auto ddir = Platform::DefaultDdir(); if (!Platform::FileExists("powder.pref")) @@ -340,7 +340,7 @@ int Main(int argc, char *argv[]) { Platform::sharedCwd = ddir; } - } + }*/ // We're now in the correct directory, time to get prefs. explicitSingletons->globalPrefs = std::make_unique(); diff --git a/src/common/platform/meson.build b/src/common/platform/meson.build index 5dc9d17878..ad48e599c1 100644 --- a/src/common/platform/meson.build +++ b/src/common/platform/meson.build @@ -96,7 +96,7 @@ conf_data.set('USE_BLUESCREEN', use_bluescreen.to_string()) can_install = get_option('can_install') if can_install == 'auto' - can_install = 'yes_check' + can_install = 'yes' if is_debug can_install = 'yes' endif