Make servers configurable from meson
This commit is contained in:
parent
e9bed49906
commit
6ab46c20e7
6
.github/build.sh
vendored
6
.github/build.sh
vendored
@ -53,9 +53,15 @@ fi
|
|||||||
if [ $PLATFORM_SHORT == "win" ]; then
|
if [ $PLATFORM_SHORT == "win" ]; then
|
||||||
bin_postfix=$bin_postfix.exe
|
bin_postfix=$bin_postfix.exe
|
||||||
fi
|
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
|
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
|
cd build
|
||||||
ninja
|
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
|
7z a ../powder.zip powder$bin_postfix render$bin_postfix font$bin_postfix
|
||||||
cd ..
|
cd ..
|
||||||
7z a powder.zip README.md LICENSE
|
7z a powder.zip README.md LICENSE
|
||||||
|
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@ -74,7 +74,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
|
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
|
||||||
asset_path: powder.zip
|
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
|
asset_content_type: application/zip
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: steps.get_type.outputs.TYPE == 'dev' && matrix.static_dynamic == 'static'
|
if: steps.get_type.outputs.TYPE == 'dev' && matrix.static_dynamic == 'static'
|
||||||
|
@ -228,6 +228,13 @@ conf_data.set('SNAPSHOT', get_option('snapshot'))
|
|||||||
conf_data.set('SNAPSHOT_ID', get_option('snapshot_id'))
|
conf_data.set('SNAPSHOT_ID', get_option('snapshot_id'))
|
||||||
conf_data.set('FUTURE_SAVE_VERSION', get_option('future_major'))
|
conf_data.set('FUTURE_SAVE_VERSION', get_option('future_major'))
|
||||||
conf_data.set('FUTURE_MINOR_VERSION', get_option('future_minor'))
|
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 = []
|
resources_files = []
|
||||||
|
|
||||||
|
@ -147,3 +147,21 @@ option(
|
|||||||
value: false,
|
value: false,
|
||||||
description: 'Build the font editor'
|
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\''
|
||||||
|
)
|
||||||
|
@ -21,6 +21,9 @@
|
|||||||
#mesondefine X86_SSE2
|
#mesondefine X86_SSE2
|
||||||
#mesondefine X86_SSE3
|
#mesondefine X86_SSE3
|
||||||
#mesondefine _64BIT
|
#mesondefine _64BIT
|
||||||
|
#mesondefine SERVER
|
||||||
|
#mesondefine STATICSERVER
|
||||||
|
#mesondefine UPDATESERVER
|
||||||
|
|
||||||
#ifdef WIN
|
#ifdef WIN
|
||||||
# define PATH_SEP "\\"
|
# define PATH_SEP "\\"
|
||||||
@ -89,9 +92,7 @@
|
|||||||
#define MTOS(str) MTOS_EXPAND(str)
|
#define MTOS(str) MTOS_EXPAND(str)
|
||||||
|
|
||||||
#define SCHEME "https://"
|
#define SCHEME "https://"
|
||||||
#define SERVER "powdertoy.co.uk"
|
|
||||||
#define STATICSCHEME "https://"
|
#define STATICSCHEME "https://"
|
||||||
#define STATICSERVER "static.powdertoy.co.uk"
|
|
||||||
#define ENFORCE_HTTPS
|
#define ENFORCE_HTTPS
|
||||||
|
|
||||||
#define LOCAL_SAVE_DIR "Saves"
|
#define LOCAL_SAVE_DIR "Saves"
|
||||||
|
Reference in New Issue
Block a user