diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-01-26 00:39:46 +0100 |
---|---|---|
committer | George L. Albany <Megacake1234@gmail.com> | 2023-01-26 00:39:46 +0100 |
commit | 1c13eadaa98b68fa64f222781d9160ec94fb884e (patch) | |
tree | 1fd5e57506ec9d9aca745433963c835c4ab35792 | |
parent | 039b562b8738aa7028ccc78deffb253f70928acb (diff) |
feat(godot): Add Windows and Linux export presets.
feat(docs): Updated README.md to include install requirements, build/run instructions, and project export instructions.
-rw-r--r-- | README.md | 28 | ||||
-rw-r--r-- | game/export/Linux-x86_64/.gitignore | 2 | ||||
-rw-r--r-- | game/export/Windows/.gitignore | 2 | ||||
-rw-r--r-- | game/export_presets.cfg | 108 |
4 files changed, 134 insertions, 6 deletions
@@ -1,9 +1,25 @@ # OpenVic2 Main Repo for the OpenVic2 Project -# Instructions -1. Ensure you have [scons](https://scons.org/) installed. -2. Run `scons` here, when finished a libopenvic2 file will appear in `game/bin/openvic2` -3. Open with Godot 4 beta 14, click import and navigate to the game directory -4. Import and edit -5. Once loaded, click the play button at the top right, if you see `Hello GDExtension Singleton!` in the output at the bottom then it is working.
\ No newline at end of file +## Required +* [Godot 4 Beta 14](https://downloads.tuxfamily.org/godotengine/4.0/beta14/) +* [scons](https://scons.org/) + +## Build/Run Instructions +1. Install [Godot 4 Beta 14](https://downloads.tuxfamily.org/godotengine/4.0/beta14/) and [scons](https://scons.org/) for your system. +3. Run `scons` in the project root, you should see a libopenvic2 file in `game/bin/openvic2`. +4. Open with Godot 4 Beta 14, click import and navigate to the `game` directory. +5. Import and edit. +6. Once loaded, click the play button at the top right, if you see `Hello GDExtension Singleton!` in the output at the bottom then it is working. + +## Project Export +1. Build the extension with `scons` or `scons target=template_debug`. (or `scons target=template_release` for release) +1. Open `game/project.godot` with Godot 4 Beta 14. +2. Click `Project` at the top left, click `Export`. +3. If you do not have the templates, you must download the templates, there is highlighted white text at the bottom of the Export subwindow that opens up the template manager for you to download. +4. Click `Export All`: + * If you built with the default or debug target you must export with `Debug`. + * If you built with the release target you must export `Release`. +5. Files will be found in platform specific directories in `game/export`: + * On Windows run `game/export/Windows/OpenVic2.exe`. + * On Linux x86_64 run `game/export/Linux-x86_64/OpenVic2.sh`. diff --git a/game/export/Linux-x86_64/.gitignore b/game/export/Linux-x86_64/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/game/export/Linux-x86_64/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore
\ No newline at end of file diff --git a/game/export/Windows/.gitignore b/game/export/Windows/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/game/export/Windows/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore
\ No newline at end of file diff --git a/game/export_presets.cfg b/game/export_presets.cfg new file mode 100644 index 0000000..e90cd69 --- /dev/null +++ b/game/export_presets.cfg @@ -0,0 +1,108 @@ +[preset.0] + +name="Linux/X11 x86_64" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="export/Linux-x86_64/OpenVic2.x86_64" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_script=1 +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true +binary_format/architecture="x86_64" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" + +[preset.1] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="export/Windows/OpenVic2.exe" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=1 +script_encryption_key="" + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_script=1 +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true +binary_format/architecture="x86_64" +codesign/enable=false +codesign/identity_type=0 +codesign/identity="" +codesign/password="" +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PackedStringArray() +application/modify_resources=true +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}' +$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}' +$trigger = New-ScheduledTaskTrigger -Once -At 00:00 +$settings = New-ScheduledTaskSettingsSet +$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings +Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true +Start-ScheduledTask -TaskName godot_remote_debug +while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 } +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue" +ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue +Remove-Item -Recurse -Force '{temp_dir}'" |