Skip to content

Commit

Permalink
update 20240323-204815
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanherrmannengel committed Mar 23, 2024
1 parent 2ca8d6c commit 93b2b03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ MOROway App uses Weblate for translations.
- Configuration files:
- `conf` and `conf_local` (for local override)
- `version`: MAJOR.MINOR.PATCH
- `beta`: 0 for release / beta off; 1,2,3,… for beta number
- `beta`: *0* for release / beta off; *1*,*2*,*3*,… for beta number
- `sharelink`: Share link displayed to users when creating a multiplayer game
- `serverlink`: Link to server backend without protocol
- `app_self_link`: Link to app (currently used for Open Graph metadata)
- `app_banner_link`: Link to app promotion image (currently used for Open Graph metadata)
- `convert_audio`: Convert ogg audios to specified file format (currently only supports mp3)
- `convert_audio`: Convert ogg audios to specified file format (unset, value *ogg* or value *0* = do not convert)
- prefixes:
- `debug`: Configuration only used for debug mode
- `[platform]`: Configuration only used for specific platform
Expand All @@ -82,11 +82,11 @@ See file: [./ABOUT](./ABOUT).
The following query parameters can be used with MOROway App (foremost web platform).

- all modes
- `mode`: normal, demo, demoStandalone, multiplay (_app mode_)
- `gui-3d`: 0, 1 (_3D view_)
- `gui-3d-night`: 0, 1 (_3D night view_)
- `mode`: normal, demo, demoStandalone, multiplay (*app mode*)
- `gui-3d`: 0, 1 (*3D view*)
- `gui-3d-night`: 0, 1 (*3D night view*)
- demo mode
- `gui-demo-3d-rotation-speed-percent`: 0-100 (_3D demo mode canvas rotation speed in percent_)
- `gui-demo-3d-rotation-speed-percent`: 0-100 (*3D demo mode canvas rotation speed in percent*)
- multiplay mode
- `key`: _game key_
- `id`: _game id_
- `key`: *game key*
- `id`: *game id*
8 changes: 5 additions & 3 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ for platform in ${platforms[@]}; do
app_link_self=$(echo "$(get_conf "app_self_link" "$debug" "$platform")" | sed 's!/!\\/!g' | sed 's/&/\\&/g' | sed 's/"/%22/g')
app_link_banner=$(echo "$(get_conf "app_banner_link" "$debug" "$platform")" | sed 's!/!\\/!g' | sed 's/&/\\&/g' | sed 's/"/%22/g')
convert_audio=$(echo "$(get_conf "convert_audio" "$debug" "$platform")" | sed 's/[^a-zA-Z0-9]//g')
sound_file_extension="ogg"
if [[ "$convert_audio" == "mp3" ]]; then
if [[ -z "$convert_audio" ]] || [[ "$convert_audio" == "ogg" ]] || [[ "$convert_audio" == "0" ]]; then
sound_file_extension="ogg"
else
ffmpeg -h >/dev/null 2>&1 || logexit 9 "FFmpeg not installed, but audio conversion enabled by configuration"
sound_file_extension="$convert_audio"
fi
Expand Down Expand Up @@ -198,6 +199,7 @@ for platform in ${platforms[@]}; do
fi
shareserver=$(echo "$sharelink" | sed "s!.*:/\{2\}\([^/]*\).*!\1!")
sed -i "s!{{sharelink}}!$sharelink!;s!{{shareserver}}!$shareserver!;s!{{serverlink}}!$serverlink!;s/{{hypertextprotocol}}/$hypertextprotocol/;s/{{websocketprotocol}}/$websocketprotocol/" "$file"
# Game Screen
file="$to/src/jsm/scripting.ts"
sed -i "s/{{sound_file_extension}}/$sound_file_extension/" "$file"
# TS Content
Expand Down Expand Up @@ -268,7 +270,7 @@ for platform in ${platforms[@]}; do
if [[ "$sound_file_extension" != "ogg" ]]; then
for ogg_file in ${all_files[@]}; do
if [[ "$ogg_file" =~ .ogg$ ]]; then
ffmpeg -i "$to/$ogg_file" -fflags +bitexact "$(echo "$to/$ogg_file" | sed 's/.ogg$/.'"$sound_file_extension"'/')" >/dev/null 2>&1 || logexit 10 "FFmpeg error"
ffmpeg -i "$to/$ogg_file" -vn -fflags +bitexact "$(echo "$to/$ogg_file" | sed 's/.ogg$/.'"$sound_file_extension"'/')" >/dev/null 2>&1 || logexit 10 "FFmpeg error"
rm "$to/$ogg_file"
fi
done
Expand Down

0 comments on commit 93b2b03

Please sign in to comment.