Add a web build script

This commit is contained in:
Luke Hubmayer-Werner 2023-12-06 14:45:02 +10:30
parent 47fc6d38ef
commit 6c0c04fe21
3 changed files with 53 additions and 0 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@
*.sfc *.sfc
*.gba *.gba
downloaded_saves/ downloaded_saves/
.import/
build/
output/

34
export_presets.cfg Normal file
View File

@ -0,0 +1,34 @@
[preset.0]
name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter="data/*"
exclude_filter=""
export_path="output/ChocolateBird.html"
script_export_mode=1
script_encryption_key=""
[preset.0.options]
custom_template/debug=""
custom_template/release=""
variant/export_type=0
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include=""
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
progressive_web_app/enabled=false
progressive_web_app/offline_page=""
progressive_web_app/display=1
progressive_web_app/orientation=0
progressive_web_app/icon_144x144=""
progressive_web_app/icon_180x180=""
progressive_web_app/icon_512x512=""
progressive_web_app/background_color=Color( 0, 0, 0, 1 )

16
update_web_build.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# Make sure to have Godot_v3.6-beta3_x11.64 on the path as godot3 (symlink is fine)
BRANCH=`git branch --show-current`
BUILD_FOLDER="./build/web/"
BUILD_TARGET_DEBUG="${BUILD_FOLDER}${BRANCH}.html"
BUILD_TARGET_RELEASE="${BUILD_FOLDER}${BRANCH}_release.html"
# TARGET="ufeff.net:~/ChocolateBird/$BRANCH/"
TARGET="ufeff.net:~/ChocolateBird/"
mkdir -p "$BUILD_FOLDER"
echo Exporting debug to "$BUILD_TARGET_DEBUG"
godot3 --export-debug HTML5 "$BUILD_TARGET_DEBUG"
echo Exporting release to "$BUILD_TARGET_RELEASE"
godot3 --export HTML5 "$BUILD_TARGET_RELEASE"
echo Uploading to "$TARGET"
rsync --recursive --times --compress --progress "$BUILD_FOLDER" "$TARGET"