diff --git a/.forgejo/workflows/build-on-push.yaml b/.forgejo/workflows/build-on-push.yaml new file mode 100644 index 0000000..2ce4b20 --- /dev/null +++ b/.forgejo/workflows/build-on-push.yaml @@ -0,0 +1,30 @@ +on: [push] +jobs: + build: + runs-on: docker + steps: + - uses: actions/checkout@v4 + - run: | + wget https://github.com/godotengine/godot/releases/download/${{vars.GODOT_VERSION}}-${{vars.RELEASE_NAME}}/Godot_v${{vars.GODOT_VERSION}}-${{vars.RELEASE_NAME}}_${{vars.GODOT_PLATFORM}}.zip \ + && wget https://github.com/godotengine/godot/releases/download/${{vars.GODOT_VERSION}}-${{vars.RELEASE_NAME}}/Godot_v${{vars.GODOT_VERSION}}-${{vars.RELEASE_NAME}}_export_templates.tpz \ + && mkdir ~/.cache \ + && mkdir -p ~/.config/godot \ + && mkdir -p ~/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.${{ vars.RELEASE_NAME}} \ + && unzip Godot_v${{ vars.GODOT_VERSION }}-${{ vars.RELEASE_NAME}}_${{ vars.GODOT_PLATFORM}}.zip \ + && mv Godot_v${{ vars.GODOT_VERSION }}-${{ vars.RELEASE_NAME}}_${{ vars.GODOT_PLATFORM}} /usr/local/bin/godot \ + && unzip Godot_v${{ vars.GODOT_VERSION }}-${{ vars.RELEASE_NAME}}_export_templates.tpz \ + && mv templates/* ~/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.${{ vars.RELEASE_NAME}} \ + && rm -f Godot_v${{ vars.GODOT_VERSION }}-${{ vars.RELEASE_NAME}}_export_templates.tpz Godot_v${{ vars.GODOT_VERSION }}-${{ vars.RELEASE_NAME}}_${{ vars.GODOT_PLATFORM}}.zip + + mkdir -v -p build/windows + godot --headless --verbose --export-release "Windows Desktop" build/windows/package.exe + mkdir -v -p build/linux + godot --headless --verbose --export-release "Linux/X11" build/linux/package.exe + - uses: actions/upload-artifact@v3 + with: + name: win32-artifacts + path: build/windows + - uses: actions/upload-artifact@v3 + with: + name: linux-artifacts + path: build/linux diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore index bf83296..c8ef78f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,6 @@ # Godot-specific ignores .import/ -export.cfg -export_presets.cfg # Imported translations (automatically generated from CSV files) *.translation @@ -15,3 +13,5 @@ export_presets.cfg data_*/ mono_crash.*.json +# Godot 4+ specific ignores +.godot/ diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..19bae89 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,102 @@ +[preset.0] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/architecture="x86_64" +codesign/enable=false +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="" +application/export_angle=0 +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}'" + +[preset.1] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +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}\"" diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..3fe4f4a --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..73164bf --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://5q8mhw7g6vh6" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..884b87e --- /dev/null +++ b/project.godot @@ -0,0 +1,20 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Carotrauma" +config/features=PackedStringArray("4.2", "Forward Plus") +config/icon="res://icon.svg" + +[editor] + +version_control/plugin_name="GitPlugin" +version_control/autoload_on_startup=true