diff --git a/.github/build.sh b/.github/build.sh index c98b39b0a..b46f84667 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -53,9 +53,15 @@ fi if [ $PLATFORM_SHORT == "win" ]; then bin_postfix=$bin_postfix.exe fi +if echo $RELTYPECFG | base64 -d | grep snapshot; then + other_flags+=$'\t-Dupdate_server=starcatcher.us/TPT' +fi meson -Dbuildtype=release -Dbuild_render=true -Dbuild_font=true -Db_pie=false -Db_staticpic=false -Db_lto=true $static_flag -Dinstall_check=true $other_flags `echo $RELTYPECFG | base64 -d` build cd build ninja +if [ $PLATFORM_SHORT == "lin" ] || [ $PLATFORM_SHORT == "mac" ]; then + strip powder$bin_postfix render$bin_postfix font$bin_postfix +fi 7z a ../powder.zip powder$bin_postfix render$bin_postfix font$bin_postfix cd .. 7z a powder.zip README.md LICENSE diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 11f65b3f6..8d42b119d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -74,7 +74,7 @@ jobs: with: upload_url: ${{ steps.get_release_info.outputs.upload_url }} asset_path: powder.zip - asset_name: powder-${{ matrix.platform_short }}-${{ steps.get_type.outputs.NAME }}64.zip + asset_name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.platform_short }}64.zip asset_content_type: application/zip - uses: actions/upload-artifact@v2 if: steps.get_type.outputs.TYPE == 'dev' && matrix.static_dynamic == 'static' diff --git a/meson.build b/meson.build index c0fafa1a8..9074f82e8 100644 --- a/meson.build +++ b/meson.build @@ -228,6 +228,13 @@ conf_data.set('SNAPSHOT', get_option('snapshot')) conf_data.set('SNAPSHOT_ID', get_option('snapshot_id')) conf_data.set('FUTURE_SAVE_VERSION', get_option('future_major')) conf_data.set('FUTURE_MINOR_VERSION', get_option('future_minor')) +conf_data.set('SERVER', '"' + get_option('server') + '"') +conf_data.set('STATICSERVER', '"' + get_option('static_server') + '"') +if get_option('update_server') != '' + conf_data.set('UPDATESERVER', '"' + get_option('update_server') + '"') +else + conf_data.set('UPDATESERVER', false) +endif resources_files = [] diff --git a/meson_options.txt b/meson_options.txt index 286bf62ae..fd6972729 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -147,3 +147,21 @@ option( value: false, description: 'Build the font editor' ) +option( + 'server', + type: 'string', + value: 'powdertoy.co.uk', + description: 'Simulation server' +) +option( + 'static_server', + type: 'string', + value: 'static.powdertoy.co.uk', + description: 'Static simulation server' +) +option( + 'update_server', + type: 'string', + value: '', + description: 'Update server, only used by snapshots and mods, see \'snapshot_id\' and \'mod_id\'' +) diff --git a/src/Config.template.h b/src/Config.template.h index 43d4e5044..4dd50e648 100644 --- a/src/Config.template.h +++ b/src/Config.template.h @@ -21,6 +21,9 @@ #mesondefine X86_SSE2 #mesondefine X86_SSE3 #mesondefine _64BIT +#mesondefine SERVER +#mesondefine STATICSERVER +#mesondefine UPDATESERVER #ifdef WIN # define PATH_SEP "\\" @@ -89,9 +92,7 @@ #define MTOS(str) MTOS_EXPAND(str) #define SCHEME "https://" -#define SERVER "powdertoy.co.uk" #define STATICSCHEME "https://" -#define STATICSERVER "static.powdertoy.co.uk" #define ENFORCE_HTTPS #define LOCAL_SAVE_DIR "Saves"