builds godot
-rw-r--r--.github/2d-build-modules.py85
-rw-r--r--.github/FUNDING.yml1
-rw-r--r--.github/actions/build-godot/action.yml35
-rw-r--r--.github/actions/build-upload-image/action.yml18
-rw-r--r--.github/actions/get-version/action.yml13
-rw-r--r--.github/actions/release/action.yml32
-rw-r--r--.github/actions/setup/action.yml17
-rw-r--r--.github/actions/upload-artifact/action.yml4
-rw-r--r--.github/editor-settings-3.tres (renamed from .github/editor-settings.tres)6
-rw-r--r--.github/editor-settings-4.tres103
-rw-r--r--.github/normal-build-modules.py2
-rw-r--r--.github/workflows/build-3.5-2d.yml18
-rw-r--r--.github/workflows/build-3.5-normal.yml21
-rw-r--r--.github/workflows/build-3.x-2d.yml20
-rw-r--r--.github/workflows/build-3.x-normal.yml23
-rw-r--r--.github/workflows/manual-build-2d.yml26
-rw-r--r--.github/workflows/manual-build-normal.yml29
-rw-r--r--.github/workflows/manual-build.yml17
-rw-r--r--.github/workflows/reusable-build.yml145
-rw-r--r--Dockerfile37
-rw-r--r--PKGBUILD30
-rwxr-xr-xREADME.md16
-rw-r--r--patches/no-arg-handling.patch177
-rw-r--r--patches/no-touchpad-gamepad.patch26
24 files changed, 430 insertions, 471 deletions
diff --git a/.github/2d-build-modules.py b/.github/2d-build-modules.py
index 2502a1c..698b100 100644
--- a/.github/2d-build-modules.py
+++ b/.github/2d-build-modules.py
@@ -1,22 +1,67 @@
-module_bmp_enabled = "no"
-module_bullet_enabled = "no"
-module_csg_enabled = "no"
-module_enet_enabled = "no"
-module_etc_enabled = "no"
-module_fbx_enabled = "no"
-module_etc_enabled = "no"
-module_gdnative_enabled = "no"
-module_gltf_enabled = "no"
-module_gridmap_enabled = "no"
-module_hdr_enabled = "no"
-module_jpg_enabled = "no"
-module_jsonrpc_enabled = "no"
-module_lightmapper_cpu_enabled = "no"
+debug_symbols = "no"
+brotli = "yes" # compression and woff2
+dbus = "no" # screensaver and portal
+execinfo = "no"
+fontconfig = "yes" # system fonts
+graphite = "yes"
+minizip = "no" # zip support
+module_astcenc_enabled = "no" # adaptive scalable data compression format
+module_basis_universal_enabled = "yes"
+module_bmp_enabled = "no" # BMP file format
+module_camera_enabled = "no" # windows and macos camera access
+module_csg_enabled = "no" # 3D csg boxes
+module_cvtt_enabled = "no" # yet another image format
+module_dds_enabled = "no" # ditto (but this is multiple)
+module_denoise_enabled = "no" # 3d lightmap denoising
+module_enet_enabled = "no" # multiplayer backend
+module_etc_enabled = "no" # image compression (again)
+module_etcpak_enabled = "no" # ^
+module_freetype_enabled = "yes" # font rendering
+module_gdscript_enabled = "yes"
+module_glslang_enabled = "yes"
+module_gltf_enabled = "no" # gltf loading
+module_gridmap_enabled = "no" # gridmap
+module_hdr_enabled = "no" # hdr images
+module_jpg_enabled = "no" # jpg images
+module_jsonrpc_enabled = "yes" # godot/modules/jsonrpc/jsonrpc.cpp (needed for editor)
+module_lightmapper_rd_enabled = "no"
+module_mbedtls_enabled = "no" # TLS and crypto
+module_meshoptimizer_enabled = "no"
+module_minimp3_enabled = "no" # mp3 player
module_mobile_vr_enabled = "no"
-module_theora_enabled = "no"
-module_upnp_enabled = "no"
-module_vhacd_enabled = "no"
-module_visual_script_enabled = "no"
-module_webm_enabled = "no"
+module_mono_enabled = "no" # .NET
+module_msdfgen_enabled = "no"
+module_multiplayer_enabled = "no" # godot multiplayer
+module_navigation_enabled = "yes" # navigation!!
+module_noise_enabled = "yes" # noise generation
+openxr = "no" # XR
+module_openxr_enabled = "no"
+module_ogg_enabled = "yes"
+module_raycast_enabled = "no" # lightmap raytracing
+module_regex_enabled = "yes"
+module_squish_enabled = "yes" # S3TC lossy compression format
+module_svg_enabled = "yes" # svg is necessary for editor
+module_text_server_fb_enabled = "no" # the text server
+module_text_server_adv_enabled = "yes" # the cooler text server
+module_tga_enabled = "no" # more image formats
+module_theora_enabled = "no" # ogg theora video format
+module_tinyexr_enabled = "no" # image
+module_ktx_enabled = "no" # why are there so many random image formats
+module_upnp_enabled = "no" # universal plug and play
+module_vhacd_enabled = "no" # 3d surface stuff
+module_vorbis_enabled = "yes" # vorbis audio
+module_webp_enabled = "yes" # lossy compression format
+module_webrtc_enabled = "no"
+module_websocket_enabled = "yes" # websockets are useful, and editor needs for LSP
module_webxr_enabled = "no"
-module_xatlas_unwrap_enabled = "no"
+module_xatlas_unwrap_enabled = "no" # lightmapping stuff
+module_zip_enabled = "no"
+opengl3 = "yes"
+optimize = "size"
+pulseaudio = "yes" # linux audio
+speechd = "no" # tts
+touch = "yes" # touchscreen
+udev = "yes"
+vulkan = "no" # use opengl3, this is the size build
+use_volk = "no"
+x11 = "yes" # x11 rendering
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..1bfbcab
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+ko_fi: bendn
diff --git a/.github/actions/build-godot/action.yml b/.github/actions/build-godot/action.yml
index 8c84607..88ec767 100644
--- a/.github/actions/build-godot/action.yml
+++ b/.github/actions/build-godot/action.yml
@@ -2,10 +2,6 @@ name: Build godot
description: Builds godot with a certain version and certain flags
inputs:
- url:
- description: Godot git url
- default: https://github.com/godotengine/godot
- required: true
platform:
description: Platform to build for
required: true
@@ -13,8 +9,11 @@ inputs:
description: Flags to pass to the build script
required: false
target:
- description: Target (release, release_debug, debug)
+ description: Target (template_release, template_debug, editor)
required: true
+ tools:
+ description: Tools!
+ default: "no"
runs:
using: "composite"
@@ -25,9 +24,9 @@ runs:
ref: ${{ env.ref }}
- name: Install linux dependencies
- if: ${{ inputs.platform }} == "x11"
+ if: inputs.platform == 'linuxbsd'
run: |
- [[ ${{ inputs.platform }} != "x11" ]] && exit 0
+ echo ::group::Dependencies
sudo apt-get update -q
sudo apt-get install -qqq \
build-essential pkg-config libx11-dev libxcursor-dev \
@@ -35,19 +34,31 @@ runs:
libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm \
libspeechd-dev speech-dispatcher \
tree
+ echo ::endgroup::
shell: bash
- name: Setup scons
- run: pip install scons
+ run: pip install --force-reinstall -v "scons==4.4.0"
shell: bash
+ - name: Download more ram
+ if: runner.os == 'Linux'
+ uses: pierotofy/set-swap-space@master
+ with:
+ swap-size-gb: 10
+
- name: Build Godot
run: |
+ echo ::group::Compilation
cd godot
- scons_flags=$flags
+ scons_flags="${{ env.flags }} ${{ inputs.flags }} tools=${{ inputs.tools }}"
cores=$(nproc) || cores=$(sysctl -n hw.ncpu)
- [[ -n "${{ inputs.flags }}" ]] && scons_flags="${{ inputs.flags }}"
- scons -j$((cores+2)) p=${{ inputs.platform }} tools=$tools target=${{ inputs.target }} use_lto=yes udev=yes $scons_flags
- strip bin/* || true
+ [[ ${{ inputs.tools }} == "yes" ]] && scons_flags="${scons_flags//disable_3d=yes/}" # remove disable_3d=yes if editor
+ [[ ${{ inputs.tools }} == "yes" ]] && scons_flags="$scons_flags debug_symbols=no"
+ [[ ${{ inputs.target }} ]] && scons_flags="$scons_flags deprecated=no"
+ scons -j$((cores+2)) p=${{ inputs.platform }} target=${{ inputs.target }} verbose=yes udev=yes dev_build=no lto=auto $scons_flags
+ echo "compile done"
+ [[ ${{ inputs.target}} != "editor" ]] && strip -v bin/* || true
ls bin
+ echo ::endgroup::
shell: bash
diff --git a/.github/actions/build-upload-image/action.yml b/.github/actions/build-upload-image/action.yml
index 6449aa5..aff9222 100644
--- a/.github/actions/build-upload-image/action.yml
+++ b/.github/actions/build-upload-image/action.yml
@@ -19,20 +19,24 @@ runs:
uses: bend-n/godot-builds/.github/actions/get-version@main
- name: Get templates
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: templates
- - name: Get headless
- uses: actions/download-artifact@v3
+ - name: Get headless editor
+ uses: actions/download-artifact@v4
with:
- name: server-tools-release
+ name: server-editor-release
+
+ - name: List all downloaded files
+ run: ls -R
+ shell: bash
- run: mv godot_server.x11.opt.tools.64 godot && chmod -v +x godot
shell: bash
- name: Login to GitHub Container Registry
- uses: docker/[email protected]
+ uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@@ -44,9 +48,7 @@ runs:
context: .
file: Dockerfile
push: true
- tags: ghcr.io/${{ github.repository_owner }}/${{ inputs.name }}:${{ env.version-name }}${{ env.tag }}
+ tags: ghcr.io/${{ github.repository_owner }}/${{ inputs.name }}:${{ env.release-name }}
build-args: |
GODOT_VERSION=${{ env.version-name }}
RELEASE_NAME=${{ env.release }}
- env:
- tag: ${{ env.release-name }}
diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml
index 29cd150..3387547 100644
--- a/.github/actions/get-version/action.yml
+++ b/.github/actions/get-version/action.yml
@@ -12,7 +12,12 @@ runs:
- name: Get version
run: |
cd godot
- echo 'print(f"{major}.{minor}")' >> version.py
+ # i could not get heredocs to work here
+ echo 'if patch:' >> version.py
+ echo ' print(f"{major}.{minor}.{patch}")' >> version.py
+ echo 'else:' >> version.py
+ echo ' print(f"{major}.{minor}")' >> version.py
+
echo "version-name=$(python version.py)" >> $GITHUB_ENV
version=$(python version.py)
@@ -23,8 +28,12 @@ runs:
release=$(python version.py)
release_name="$version"
- [[ ${release} == 'stable' ]] || release_name+=${release}
+ [[ $release == 'stable' ]] || release_name+=".${release}"
echo "release-name=$release_name" >> $GITHUB_ENV
+
+ prerelease="true"
+ [[ $release == 'stable' ]] && prerelease="false"
+ echo "prerelease=${prerelease}" >> $GITHUB_ENV
shell: bash
- name: Post get version
diff --git a/.github/actions/release/action.yml b/.github/actions/release/action.yml
index 5c39478..c5e8fca 100644
--- a/.github/actions/release/action.yml
+++ b/.github/actions/release/action.yml
@@ -13,32 +13,31 @@ inputs:
runs:
using: "composite"
steps:
- - uses: actions/checkout@v3
-
- name: Get version
uses: bend-n/godot-builds/.github/actions/get-version@main
- name: Get templates
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: templates
- - name: Get headless
- uses: actions/download-artifact@v3
- with:
- name: server-tools-release
-
- name: Get editor
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
- name: x11-tools-release
+ name: linuxbsd-editor-release
+
+ - name: List all downloaded files
+ run: ls -R
+ shell: bash
- name: Compress
run: |
- mv godot.x11.opt.tools.64 Godot_v3.5-stable_x11.64 && xz -ze9T0 Godot_v3.5-stable_x11.64 &
- mv godot_server.x11.opt.tools.64 "${{ inputs.name }}_v3.5-stable_linux_headless.64" && xz -ze9T0 "${{ inputs.name }}_v3.5-stable_linux_headless.64" &
- mv templates.tpz Godot_v3.5-stable_export_templates.tpz
+ strip godot.x11.opt.tools.64 -v || true
+ mv godot.x11.opt.tools.64 ${{ env.fstart }}_linux.x86_64
+ mv templates.tpz ${{ env.fstart }}_export_templates.tpz
shell: bash
+ env:
+ fstart: ${{ inputs.name }}_v${{ env.version-name }}
- name: Release
uses: softprops/action-gh-release@v1
@@ -46,6 +45,9 @@ runs:
body: "### ${{ env.release-name}} :rocket:"
tag_name: ${{ env.release-name }}
files: |
- Godot_v3.5-stable_export_templates.tpz
- Godot_v3.5-stable_x11.64
+ ${{ env.fstart }}_export_templates.tpz
+ ${{ env.fstart }}_linux.x86_64
token: ${{ inputs.github-token }}
+ prerelease: ${{ env.prerelease }}
+ env:
+ fstart: ${{ inputs.name }}_v${{ env.version-name }}
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index d26934c..68be9c4 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -2,10 +2,6 @@ name: "Setup"
description: "Setup the environment for building"
inputs:
- repo:
- description: Godot github owner/repo
- default: godotengine/godot
- required: true
ref:
description: Which ref to build
required: true
@@ -16,14 +12,14 @@ runs:
- name: Check if clean
id: clean
run: |
- if [[ -d godot ]]; then echo "::set-output name=clean::false";
- else echo "::set-output name=clean::true"; fi
+ if [[ -d godot ]]; then echo "clean=false" >> $GITHUB_OUTPUT;
+ else echo "clean=true" >> $GITHUB_OUTPUT; fi
shell: bash
- uses: actions/checkout@v3
if: steps.clean.outputs.clean == 'true'
with:
- repository: ${{ inputs.repo }}
+ repository: godotengine/godot
ref: ${{ inputs.ref }}
path: "godot"
@@ -34,7 +30,7 @@ runs:
- name: Setup Python
if: steps.clean.outputs.clean == 'true'
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: 3.9
@@ -42,9 +38,8 @@ runs:
if: steps.clean.outputs.clean == 'true'
run: |
# Patch godot
- echo "::group::Patch godot"
(cd repo && mv "${{ env.modules }}" ../godot/custom.py && mv patches ../godot)
cd godot
- for patch in patches/*; do git apply --ignore-whitespace "$patch" || echo "::error file={${patch}}::Go update your patch"; done
- echo "::endgroup::"
+ echo "applying $(find patches/* | tr '\n' ' ')..."
+ git apply patches/* || echo "::warning::Some patches failed"
shell: bash
diff --git a/.github/actions/upload-artifact/action.yml b/.github/actions/upload-artifact/action.yml
index 3bb9387..40b442b 100644
--- a/.github/actions/upload-artifact/action.yml
+++ b/.github/actions/upload-artifact/action.yml
@@ -5,7 +5,7 @@ description: Uploads the artifact
inputs:
name:
description: The artifact name.
- default: "${{ github.job }}"
+ default: "${{ github.job }}-${{ matrix.target }}"
required: true
path:
description: The path to upload.
@@ -16,7 +16,7 @@ runs:
using: "composite"
steps:
- name: Upload Godot Artifact
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
diff --git a/.github/editor-settings.tres b/.github/editor-settings-3.tres
index ed95707..bb64ddc 100644
--- a/.github/editor-settings.tres
+++ b/.github/editor-settings-3.tres
@@ -42,9 +42,9 @@ export/web/http_port = 8060
export/web/use_ssl = false
export/web/ssl_key = ""
export/web/ssl_certificate = ""
-export/windows/rcedit = ""
+export/windows/rcedit = "/usr/share/rcedit.exe"
export/windows/osslsigncode = ""
-export/windows/wine = ""
+export/windows/wine = "/usr/bin/wine"
interface/scene_tabs/always_show_close_button = false
interface/editor/save_on_focus_loss = false
interface/editor/show_update_spinner = false
@@ -133,4 +133,4 @@ editors/3d_gizmos/gizmo_colors/joint_body_a = Color( 0.6, 0.8, 1, 1 )
editors/3d_gizmos/gizmo_colors/joint_body_b = Color( 0.6, 0.9, 1, 1 )
text_editor/help/sort_functions_alphabetically = true
text_editor/highlighting/gdscript/function_definition_color = Color( 0.4, 0.9, 1, 1 )
-text_editor/highlighting/gdscript/node_path_color = Color( 0.39, 0.76, 0.35, 1 ) \ No newline at end of file
+text_editor/highlighting/gdscript/node_path_color = Color( 0.39, 0.76, 0.35, 1 ) \ No newline at end of file
diff --git a/.github/editor-settings-4.tres b/.github/editor-settings-4.tres
new file mode 100644
index 0000000..69c123a
--- /dev/null
+++ b/.github/editor-settings-4.tres
@@ -0,0 +1,103 @@
+[gd_resource type="EditorSettings" format=3]
+
+[resource]
+interface/editor/main_font_size = 15
+interface/editor/code_font_size = 17.0
+interface/editor/code_font_contextual_ligatures = 0
+interface/editor/low_processor_mode_sleep_usec = 13800.0
+interface/editor/single_window_mode = true
+interface/inspector/show_low_level_opentype_features = true
+interface/scene_tabs/show_thumbnail_on_hover = false
+editors/3d/default_z_near = 0.01
+network/http_proxy/port = -1
+asset_library/available_urls = {
+"godotengine.org (Official)": "https://godotengine.org/asset-library/api"
+}
+asset_library/use_threads = true
+export/android/android_sdk_path = ""
+export/android/debug_keystore = ""
+export/android/debug_keystore_user = "androiddebugkey"
+export/android/debug_keystore_pass = "android"
+export/android/force_system_user = false
+export/android/shutdown_adb_on_exit = true
+export/android/one_click_deploy_clear_previous_install = false
+export/web/http_host = "localhost"
+export/web/http_port = 8060
+export/web/use_ssl = false
+export/web/ssl_key = ""
+export/web/ssl_certificate = ""
+export/macos/force_builtin_codesign = false
+export/windows/rcedit = "/usr/share/rcedit.exe"
+export/windows/osslsigncode = ""
+export/windows/wine = "/bin/wine"
+interface/editor/save_on_focus_loss = false
+interface/editor/show_update_spinner = true
+interface/editor/update_continuously = false
+interface/editor/localize_settings = true
+interface/scene_tabs/restore_scenes_on_load = true
+interface/inspector/default_property_name_style = 1
+interface/inspector/default_float_step = 0.1
+interface/inspector/disable_folding = false
+interface/inspector/auto_unfold_foreign_scenes = true
+interface/inspector/horizontal_vector2_editing = false
+interface/inspector/horizontal_vector_types_editing = true
+interface/inspector/open_resources_in_current_inspector = true
+interface/inspector/resources_to_open_in_new_inspector = "Script,MeshLibrary"
+interface/inspector/default_color_picker_mode = 0
+interface/inspector/default_color_picker_shape = 3
+_default_feature_profile = ""
+interface/editors/show_scene_tree_root_selection = true
+interface/editors/derive_script_globals_by_name = true
+_use_favorites_root_selection = false
+interface/editors/default_signal_callback_name = "_on_{node_name}_{signal_name}"
+filesystem/file_server/port = 6010
+filesystem/file_server/password = ""
+debugger/auto_switch_to_remote_scene_tree = false
+debugger/profiler_frame_max_functions = 64
+debugger/remote_scene_tree_refresh_interval = 1.0
+debugger/remote_inspect_refresh_interval = 0.2
+network/debug_adapter/remote_port = 6006
+network/debug_adapter/request_timeout = 1000
+network/debug_adapter/sync_breakpoints = false
+editors/3d/manipulator_gizmo_size = 80
+editors/3d/manipulator_gizmo_opacity = 0.9
+editors/3d/navigation/show_viewport_rotation_gizmo = true
+text_editor/behavior/files/auto_reload_and_parse_scripts_on_save = true
+text_editor/behavior/files/open_dominant_script_on_scene_change = false
+text_editor/external/use_external_editor = false
+text_editor/external/exec_path = "/bin/code"
+text_editor/script_list/script_temperature_enabled = true
+text_editor/script_list/script_temperature_history_size = 15
+text_editor/script_list/group_help_pages = true
+text_editor/script_list/sort_scripts_by = 0
+text_editor/script_list/list_script_names_as = 0
+text_editor/external/exec_flags = "{project} --goto {file}:{line}:{col}"
+editors/3d_gizmos/gizmo_colors/path = Color(0.5, 0.5, 1, 0.8)
+editors/3d_gizmos/gizmo_colors/skeleton = Color(1, 0.8, 0.4, 1)
+editors/3d_gizmos/gizmo_colors/selected_bone = Color(0.8, 0.3, 0, 1)
+editors/3d_gizmos/gizmo_settings/bone_axis_length = 0.1
+editors/3d_gizmos/gizmo_settings/bone_shape = 1
+editors/3d_gizmos/gizmo_colors/csg = Color(0, 0.4, 1, 0.15)
+editors/grid_map/editor_side = 1
+editors/grid_map/palette_min_width = 230
+editors/grid_map/preview_size = 64
+network/language_server/remote_host = "127.0.0.1"
+network/language_server/remote_port = 6005
+network/language_server/enable_smart_resolve = true
+network/language_server/show_native_symbols_in_editor = false
+network/language_server/use_thread = false
+filesystem/import/blender/blender3_path = "/bin"
+filesystem/import/fbx/fbx2gltf_path = ""
+export/macos/rcodesign = ""
+export/web/use_tls = false
+export/web/tls_key = ""
+export/web/tls_certificate = ""
+version_control/username = ""
+version_control/ssh_public_key_path = ""
+version_control/ssh_private_key_path = ""
+interface/editors/default_signal_callback_to_self_name = "_on_{signal_name}"
+editors/3d/navigation/show_viewport_navigation_gizmo = false
+export/ssh/ssh = ""
+export/ssh/scp = ""
+filesystem/import/blender/rpc_port = 0
+filesystem/import/blender/rpc_server_uptime = 5 \ No newline at end of file
diff --git a/.github/normal-build-modules.py b/.github/normal-build-modules.py
index e69de29..75f14db 100644
--- a/.github/normal-build-modules.py
+++ b/.github/normal-build-modules.py
@@ -0,0 +1,2 @@
+optimize = "speed"
+debug_symbols = "no"
diff --git a/.github/workflows/build-3.5-2d.yml b/.github/workflows/build-3.5-2d.yml
deleted file mode 100644
index d06a76c..0000000
--- a/.github/workflows/build-3.5-2d.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Build godot 3.5 stable (2d)
-
-on:
- workflow_dispatch:
- push:
- branches:
- - main
- paths:
- - .github/2d*.py
- - "**.yml"
-
-jobs:
- build:
- name: Build
- uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
- with:
- ref: 3.5-stable
- secrets: inherit
diff --git a/.github/workflows/build-3.5-normal.yml b/.github/workflows/build-3.5-normal.yml
deleted file mode 100644
index 96d0f93..0000000
--- a/.github/workflows/build-3.5-normal.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-name: Build godot 3.5 stable (normal)
-
-on:
- workflow_dispatch:
- push:
- branches:
- - main
- paths:
- - .github/normal*.py
- - "**.yml"
-
-jobs:
- build:
- name: Build
- uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
- with:
- ref: 3.5-stable
- name: godot
- build-name: normal
- modules-path: ./.github/normal-build-modules.py
- secrets: inherit
diff --git a/.github/workflows/build-3.x-2d.yml b/.github/workflows/build-3.x-2d.yml
deleted file mode 100644
index cf9f012..0000000
--- a/.github/workflows/build-3.x-2d.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Build godot on branch 3.x (2d)
-
-on:
- workflow_dispatch:
- schedule:
- - cron: "0 0 * * *"
- push:
- branches:
- - main
- paths:
- - .github/2d*.py
- - "**.yml"
-
-jobs:
- build:
- name: Build
- uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
- with:
- ref: 3.x
- secrets: inherit
diff --git a/.github/workflows/build-3.x-normal.yml b/.github/workflows/build-3.x-normal.yml
deleted file mode 100644
index 5a722e9..0000000
--- a/.github/workflows/build-3.x-normal.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Build godot on branch 3.x (normal)
-
-on:
- workflow_dispatch:
- schedule:
- - cron: "0 0 * * *"
- push:
- branches:
- - main
- paths:
- - .github/normal*.py
- - "**.yml"
-
-jobs:
- build:
- name: Build
- uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
- with:
- ref: 3.x
- name: godot
- build-name: normal
- modules-path: ./.github/normal-build-modules.py
- secrets: inherit
diff --git a/.github/workflows/manual-build-2d.yml b/.github/workflows/manual-build-2d.yml
new file mode 100644
index 0000000..694a46f
--- /dev/null
+++ b/.github/workflows/manual-build-2d.yml
@@ -0,0 +1,26 @@
+name: Manually build godot 2D
+
+on:
+ workflow_dispatch:
+ inputs:
+ ref:
+ type: string
+ description: which ref to build
+ required: true
+ release:
+ type: string
+ default: "yes"
+ description: to make a release
+
+jobs:
+ two-dimensions:
+ name: Build ${{ inputs.ref }}
+ uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
+ with:
+ ref: ${{ inputs.ref }}
+ name: godot-2d
+ build-name: bendn.2D
+ modules-path: ./.github/2d-build-modules.py
+ flags: ""
+ make-release: ${{ inputs.release }}
+ secrets: inherit
diff --git a/.github/workflows/manual-build-normal.yml b/.github/workflows/manual-build-normal.yml
new file mode 100644
index 0000000..95a6212
--- /dev/null
+++ b/.github/workflows/manual-build-normal.yml
@@ -0,0 +1,29 @@
+name: Manually build godot normal
+
+on:
+ workflow_dispatch:
+ inputs:
+ ref:
+ type: string
+ description: which ref to build
+ required: true
+ release:
+ type: string
+ default: "yes"
+ description: to make a release
+ # turn on when the godot5 is in dev
+ # schedule:
+ # - cron: '30 20 * * *'
+
+jobs:
+ all-dimensions:
+ name: Build ${{ inputs.ref }}
+ uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
+ with:
+ ref: ${{ inputs.ref }}
+ name: godot
+ build-name: bendn
+ modules-path: ./.github/normal-build-modules.py
+ flags: ""
+ make-release: ${{ inputs.release }}
+ secrets: inherit
diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml
deleted file mode 100644
index 99751e1..0000000
--- a/.github/workflows/manual-build.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-name: Manually build godot 2d
-
-on:
- workflow_dispatch:
- inputs:
- ref:
- type: string
- description: which ref to build
- required: true
-
-jobs:
- manual-build:
- name: Build ${{ inputs.ref }}
- uses: bend-n/godot-builds/.github/workflows/reusable-build.yml@main
- with:
- ref: ${{ inputs.ref }}
- secrets: inherit
diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml
index 2c0a0db..b8b09f2 100644
--- a/.github/workflows/reusable-build.yml
+++ b/.github/workflows/reusable-build.yml
@@ -4,31 +4,35 @@ on:
workflow_call:
inputs:
ref:
- required: true
type: string
+ required: true
flags:
type: string
- default: disable_3d=yes
+ default: ""
required: false
modules-path:
type: string
- default: ./.github/2d-build-modules.py
- required: false
+ required: true
name:
type: string
- default: godot-2d
- required: false
+ required: true
build-name:
type: string
- default: 2d
- required: false
+ required: true
+ make-release:
+ type: string
+ default: "yes"
+ required: true
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.ref }}
+ cancel-in-progress: true
env:
BUILD_NAME: ${{ inputs.build-name }}
ref: ${{ inputs.ref }}
flags: ${{ inputs.flags }}
modules: ${{ inputs.modules-path }}
- tools: no
jobs:
linux:
@@ -44,7 +48,7 @@ jobs:
with:
target: ${{ matrix.target }}
flags: bits=${{ matrix.bits }} ${{ env.flags }}
- platform: x11
+ platform: linuxbsd
- name: Upload artifact
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
@@ -78,10 +82,11 @@ jobs:
matrix:
target: [release, release_debug]
steps:
- - name: Set up Java 11
- uses: actions/setup-java@v1
+ - name: Set up Java 17
+ uses: actions/setup-java@v3
with:
- java-version: 11
+ java-version: 17
+ distribution: temurin
- name: Compilation (armv7)
uses: bend-n/godot-builds/.github/actions/build-godot@main
@@ -112,9 +117,12 @@ jobs:
matrix:
target: [release, release_debug]
- name: MacOS temps
+ name: macOS temps
runs-on: macos-latest
steps:
+ - name: Install MoltenVK
+ run: curl https://raw.githubusercontent.com/godotengine/godot/master/misc/scripts/install_vulkan_sdk_macos.sh -s | sh
+
- name: Compilation(x86_64)
uses: bend-n/godot-builds/.github/actions/build-godot@main
with:
@@ -131,7 +139,7 @@ jobs:
- name: Create universal
run: |
- [[ "${{ matrix.target }}" == *"debug"* ]] && target='.debug'
+ [[ "${{ matrix.target }}" == *"release_debug"* ]] && target='.debug'
cd godot
intel=bin/godot.osx.*.x86_64
arm=bin/godot.osx.*.arm64
@@ -143,113 +151,127 @@ jobs:
with:
path: godot/bin/*.universal
- javascript:
+ web:
strategy:
matrix:
- target: [release, release_debug]
+ target: [release]
flags: [gdnative_enabled=yes, threads_enabled=yes, ""]
name: JS temps
runs-on: ubuntu-20.04
steps:
- - name: Set up Emscripten 3.1.10
- uses: mymindstorm/setup-emsdk@v10
+ - name: Set up Emscripten 3.1.18
+ uses: mymindstorm/setup-emsdk@v12
with:
- version: 3.1.10
+ version: 3.1.18
- name: Verify Emscripten setup
- run: |
- emcc -v
+ run: emcc -v
- name: Compilation
uses: bend-n/godot-builds/.github/actions/build-godot@main
with:
target: ${{ matrix.target }}
flags: ${{ env.flags }} ${{ matrix.flags }}
- platform: javascript
+ platform: web
- name: Upload artifact
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
with:
path: godot/bin/*.zip
+ name: ${{ inputs.name }}-${{ matrix.target }}-${{ matrix.flags }}
templates:
- needs: [javascript, macos, windows, linux, android]
+ needs: [web, macos, windows, linux, android]
name: Bundle all templates
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
env:
tmps: "templates"
steps:
- name: Download all artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
+
+ - name: List all downloaded files
+ run: ls -R
+
+ - name: flatten
+ run: find . -mindepth 2 -type f -exec mv -t . -i '{}' +
+
+ - name: Getdot
+ uses: actions/checkout@v3
+ with:
+ repository: godotengine/godot
+ ref: ${{ inputs.ref }}
+ path: godot-repo
- name: Prepare files
run: |
- mkdir -vp ${tmps}
- git clone --depth 1 'https://github.com/godotengine/godot' -b 3.x godot-repo
+ rel="template_release"
+ bug="template_debug"
+ mkdir -vp "$tmps"
echo "Preparing linux"
- mv linux/godot.x11.opt.64 ${tmps}/linux_x11_64_release
- mv linux/godot.x11.opt.debug.64 ${tmps}/linux_x11_64_debug
+ linux="godot.x11.opt"
+ mv "$linux.64" "$tmps/linux_x11_debug.x86_64"
+ mv "$linux.debug.64" "$tmps/linux_x11_release.x86_64"
echo "Preparing windows"
- mv windows/godot.windows.opt.64.exe ${tmps}/windows_64_release.exe
- mv windows/godot.windows.opt.debug.64.exe ${tmps}/windows_64_debug.exe
+ windows="godot.windows.opt"
+ # mv "windows/$windows.debug.64.exe" "$tmps/windows_debug_x86_64.exe"
+ mv "$windows.64.exe" "$tmps/windows_release_x86_64.exe"
echo "Preparing android"
- mv android/android_debug.apk ${tmps}/android_debug.apk
- mv android/android_release.apk ${tmps}/android_release.apk
+ # mv "android/android_debug.apk" "$tmps/android_debug.apk"
+ mv "android_release.apk" "$tmps/android_release.apk"
echo "Preparing macos"
- cp -r godot-repo/misc/dist/osx_template.app .
- mkdir -p osx_template.app/Contents/MacOS
- cp macos/godot.osx.opt.universal osx_template.app/Contents/MacOS/godot_osx_release.64
- cp macos/godot.osx.opt.debug.universal osx_template.app/Contents/MacOS/godot_osx_debug.64
- chmod +x osx_template.app/Contents/MacOS/godot_osx_*.64
- zip -q -9 -r ${tmps}/osx.zip osx_template.app
+ mac="godot.osx.opt"
+ cp -r "godot-repo/misc/dist/osx_template.app" "."
+ mkdir -p "osx_template.app/Contents/MacOS"
+ cp "$mac.universal" "osx_template.app/Contents/MacOS/godot_osx_release.64"
+ # cp "macos/$mac.debug.universal" "osx_template.app/Contents/MacOS/godot_osx_debug.64"
+ chmod +x osx_template.app/Contents/MacOS/*.64
+ zip -q -9 -r "$tmps/osz.zip" "osx_template.app"
echo "Preparing web"
- mv javascript/godot.javascript.opt.zip ${tmps}/webassembly_release.zip
- mv javascript/godot.javascript.opt.debug.zip ${tmps}/webassembly_debug.zip
- mv javascript/godot.javascript.opt.threads.zip ${tmps}/webassembly_threads_release.zip
- mv javascript/godot.javascript.opt.debug.threads.zip ${tmps}/webassembly_threads_debug.zip
- mv javascript/godot.javascript.opt.gdnative.zip ${tmps}/webassembly_gdnative_release.zip
- mv javascript/godot.javascript.opt.debug.gdnative.zip ${tmps}/webassembly_gdnative_debug.zip
+ web="godot.javascript.opt"
+ mv "$web.zip" "$tmps/webassembly_release.zip"
+ mv "$web.gdnative.zip" "$tmps/webassembly_gdnative_release.zip"
- name: Prepare bundle
- run: "cd ${tmps} && zip -q -9 -r templates.tpz ./*"
+ run: cd "${tmps}" && zip -qr9 templates.tpz ./*
- name: Upload artifact
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
with:
path: ${{ env.tmps }}/templates.tpz
+ name: templates
- tools:
+ editor:
strategy:
matrix:
- platform: [server, x11]
-
- name: Build linux tools
- runs-on: ubuntu-18.04
+ platform: [server, linuxbsd]
+ name: Linux editor
+ runs-on: ubuntu-20.04
steps:
- - name: Build editor
+ - name: Compilation
uses: bend-n/godot-builds/.github/actions/build-godot@main
with:
platform: ${{ matrix.platform }}
target: release_debug
- env:
- tools: yes
- flags: "" # override flags
+ tools: "yes"
- name: Upload artifact
uses: bend-n/godot-builds/.github/actions/upload-artifact@main
with:
- name: ${{ matrix.platform }}-tools-release
+ name: ${{ matrix.platform }}-editor-release
path: godot/bin/*.64
- build-image:
- name: Build docker image
+ image:
+ if: inputs.make-release == 'yes'
+ permissions: write-all
+ name: Docker image
runs-on: ubuntu-latest
- needs: [tools, templates]
+ needs: [editor, templates]
steps:
- uses: bend-n/godot-builds/.github/actions/build-upload-image@main
with:
@@ -257,9 +279,10 @@ jobs:
name: ${{ inputs.name }}
release:
+ if: inputs.make-release == 'yes'
name: Create/update a release
runs-on: ubuntu-latest
- needs: [tools, templates]
+ needs: [editor, templates]
steps:
- uses: bend-n/godot-builds/.github/actions/release@main
with:
diff --git a/Dockerfile b/Dockerfile
index 4a1968a..4f6a63b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,37 +1,26 @@
-FROM ubuntu:focal
-LABEL author="bendn"
+FROM ubuntu:jammy
+LABEL author "bendn"
+LABEL org.opencontainers.image.description "godot builds containerized for quick use, contains rcedit, blender and wine"
USER root
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
- ca-certificates \
- git \
- git-lfs \
- python \
- python-openssl \
- unzip \
- wget \
- zip \
- adb \
+ git git-lfs unzip sudo adb \
openjdk-11-jdk-headless \
- rsync \
+ wget zip rsync wine64 blender \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
-ARG GODOT_VERSION="3.5"
-ARG RELEASE_NAME="rc"
+ARG GODOT_VERSION
+ARG RELEASE_NAME
-COPY ./templates.tpz /root/templates.tpz
+COPY ./templates.tpz /root/templates.tpz
COPY ./godot /usr/local/bin/godot
-RUN mkdir ~/.cache \
- && mkdir -p /root/.config/godot \
- && mkdir -p /root/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} \
- && unzip -q /root/templates.tpz -d /root/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} \
- && rm /root/templates.tpz
-# Install editor-settings.tres
-ADD https://raw.githubusercontent.com/bend-n/godot-builds/main/.github/editor-settings.tres /root/.config/godot/editor_settings-3.tres
+# Install editor settings
+ADD https://raw.githubusercontent.com/bend-n/godot-builds/main/.github/editor-settings-4.tres /root/.config/godot/editor_settings-4.tres
+ADD https://raw.githubusercontent.com/bend-n/godot-builds/main/.github/editor-settings-3.tres /root/.config/godot/editor_settings-3.tres
-# Test if godot is working
-RUN godot -e -q
+# Install rcedit
+ADD https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe /usr/share/rcedit.exe
diff --git a/PKGBUILD b/PKGBUILD
deleted file mode 100644
index dd38f8b..0000000
--- a/PKGBUILD
+++ /dev/null
@@ -1,30 +0,0 @@
-# Maintainer: bendn <[email protected]>
-# shellcheck disable=SC2148,SC2034
-
-pkgname="godot2d"
-pkgver='3.5.stable'
-pkgrel=1
-pkgdesc="godot builds without all the 3d stuff."
-arch=('any')
-url="https://github.com/bend-n/godot-builds"
-license=('MIT')
-depends=(libxcursor libxinerama libxi libxrandr libglvnd)
-makedepends=('github-cli' 'git')
-md5sums=()
-source=()
-provides=('godot2d')
-
-_repo="github.com/bend-n/godot-builds"
-
-_get() {
- gh run download "$1" -n "$2" -R "$_repo"
-}
-
-package() {
- id=$(gh workflow view build-3.5-2d.yml | sed '6q;d' | awk -F'\t' '{print $8}')
- _get "$id" "x11-tools-release" &
- _get "$id" "templates"
- install -Dm755 godot.x11.opt.tools.64 "$pkgdir/usr/bin/godot2d"
- install -Dm755 "$pkgdir/usr/share/godot/templates/${pkgver}.stable"
- unzip -of templates.tpz -d "$pkgdir/usr/share/godot/templates/${pkgver}.stable"
-}
diff --git a/README.md b/README.md
index 3b4ade0..1b4f114 100755
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# godot builds
+[![version](https://img.shields.io/badge/4.x-blue?logo=godot-engine&logoColor=white&label=godot&style=for-the-badge)](https://godotengine.org)
+[![aur](https://img.shields.io/aur/version/godot2d?color=informative&logo=archlinux&logoColor=white&style=for-the-badge)](https://aur.archlinux.org/packages/godot2d "Aur package")
+<a href='https://ko-fi.com/bendn' title='Buy me a coffee' target='_blank'><img height='28' src='https://ko-fi.com/img/githubbutton_sm.svg' alt='Buy me a coffee'> </a>
+
Creates two packages.
- `godot`: Docker images with the _normal_ godot build.
@@ -8,7 +12,7 @@ Creates two packages.
## How to use
-For a full example, see this [template](https://github.com/bend-n/godot-template/blob/3d79cf6cc3e25317763ad4100e2a8692b0c2644e/.github/workflows/export.yml).
+For a full example, see this [template](https://github.com/bend-n/godot-template/blob/9c9e2b02ddf9f88bff872dcd2695363d09485bc4/.github/workflows/export.yml).
<details open>
<summary>With helpers (recomended)</summary>
@@ -17,13 +21,12 @@ For a full example, see this [template](https://github.com/bend-n/godot-template
build-windows:
runs-on: ubuntu-latest
container:
- image: ghcr.io/bend-n/godot-2d:3.5
+ image: ghcr.io/bend-n/godot-2d:4.0
name: Build windows
steps:
- name: Build (Windows)
uses: bend-n/godot-actions/.github/actions/export-windows@main
env:
- GODOT_VERSION: 3.5
NAME: ${{ github.event.repository.name }}
```
@@ -33,14 +36,13 @@ build-windows:
<summary>Manually</summary>
> **Warning**
->
> This method has _not_ been tested.
```yaml
build-windows:
runs-on: ubuntu-latest
container:
- image: ghcr.io/bend-n/godot-2d:3.5
+ image: ghcr.io/bend-n/godot-2d:4.0
name: Build windows
steps:
- name: Checkout
@@ -48,7 +50,7 @@ build-windows:
- name: Setup godot
run: |
- RELEASE=stable; GODOT_VERSION=3.5;
+ RELEASE=stable; GODOT_VERSION=4.0.rc;
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE} ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE}
@@ -60,7 +62,7 @@ build-windows:
GAME_NAME: ${{ github.event.repository.name }}
- name: Upload
- uses: actions/upload-artifact@v1
+ uses: actions/upload-artifact@v3
with:
name: windows
path: build/windows
diff --git a/patches/no-arg-handling.patch b/patches/no-arg-handling.patch
deleted file mode 100644
index 1323545..0000000
--- a/patches/no-arg-handling.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-diff --git a/main/main.cpp b/main/main.cpp
-index 37ef4332..ecc30d7e 100644
---- a/main/main.cpp
-+++ b/main/main.cpp
-@@ -128,7 +128,9 @@ static int audio_driver_idx = -1;
- static bool editor = false;
- static bool project_manager = false;
- static String locale;
-+#ifdef TOOLS_ENABLED
- static bool show_help = false;
-+#endif
- static bool auto_quit = false;
- static OS::ProcessID allow_focus_steal_pid = 0;
- static bool delta_sync_after_draw = false;
-@@ -239,6 +241,7 @@ void finalize_navigation_server() {
- #define MAIN_PRINT(m_txt)
- #endif
-
-+#ifdef TOOLS_ENABLED
- void Main::print_help(const char *p_binary) {
- print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
- OS::get_singleton()->print("Free and open source software under the terms of the MIT license.\n");
-@@ -256,11 +259,9 @@ void Main::print_help(const char *p_binary) {
- OS::get_singleton()->print("\n");
-
- OS::get_singleton()->print("Run options:\n");
--#ifdef TOOLS_ENABLED
- OS::get_singleton()->print(" -e, --editor Start the editor instead of running the scene.\n");
- OS::get_singleton()->print(" -p, --project-manager Start the project manager, even if a project is auto-detected.\n");
- OS::get_singleton()->print(" --debug-server <address> Start the editor debug server (<IP>:<port>, e.g. 127.0.0.1:6007)\n");
--#endif
- OS::get_singleton()->print(" -q, --quit Quit after the first iteration.\n");
- OS::get_singleton()->print(" -l, --language <locale> Use a specific locale (<locale> being a two-letter code).\n");
- OS::get_singleton()->print(" --path <directory> Path to a project (<directory> must contain a 'project.godot' file).\n");
-@@ -355,6 +356,7 @@ void Main::print_help(const char *p_binary) {
- OS::get_singleton()->print(").\n");
- #endif
- }
-+#endif
-
- /* Engine initialization
- *
-@@ -493,13 +495,22 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- #endif
-
- List<String>::Element *N = I->next();
--
-+#ifdef TOOLS_ENABLED
- if (I->get() == "-h" || I->get() == "--help" || I->get() == "/?") { // display help
--
- show_help = true;
- exit_code = ERR_HELP; // Hack to force an early exit in `main()` with a success code.
- goto error;
--
-+#else
-+ if (I->get() == "--main-pack") { // needed for JS bindings
-+ if (I->next()) {
-+ main_pack = I->next()->get();
-+ N = I->next()->next();
-+ } else {
-+ OS::get_singleton()->print("Missing path to main pack file, aborting.\n");
-+ goto error;
-+ };
-+#endif
-+#ifdef TOOLS_ENABLED
- } else if (I->get() == "--version") {
- print_line(get_full_version_string());
- exit_code = ERR_HELP; // Hack to force an early exit in `main()` with a success code.
-@@ -737,7 +748,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- OS::get_singleton()->print("Missing render thread mode argument, aborting.\n");
- goto error;
- }
--#ifdef TOOLS_ENABLED
- } else if (I->get() == "-e" || I->get() == "--editor") { // starts editor
-
- editor = true;
-@@ -773,7 +783,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
-
- editor = true;
- main_args.push_back(I->get());
--#endif
- } else if (I->get() == "--path") { // set path of project to start or edit
-
- if (I->next()) {
-@@ -806,9 +815,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- } else {
- project_path = path;
- }
--#ifdef TOOLS_ENABLED
- editor = true;
--#endif
- } else if (I->get() == "-b" || I->get() == "--breakpoints") { // add breakpoints
-
- if (I->next()) {
-@@ -840,15 +847,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- goto error;
- }
-
-- } else if (I->get() == "--main-pack") {
-- if (I->next()) {
-- main_pack = I->next()->get();
-- N = I->next()->next();
-- } else {
-- OS::get_singleton()->print("Missing path to main pack file, aborting.\n");
-- goto error;
-- };
--
- } else if (I->get() == "-d" || I->get() == "--debug") {
- debug_mode = "local";
- OS::get_singleton()->_debug_stdout = true;
-@@ -897,6 +895,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- OS::get_singleton()->disable_crash_handler();
- } else if (I->get() == "--skip-breakpoints") {
- skip_breakpoints = true;
-+#endif
- } else {
- main_args.push_back(I->get());
- }
-@@ -909,7 +908,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- OS::get_singleton()->print("Error: Command line arguments implied opening both editor and project manager, which is not possible. Aborting.\n");
- goto error;
- }
--#endif
-
- // Network file system needs to be configured before globals, since globals are based on the
- // 'project.godot' file which will only be available through the network if this is enabled
-@@ -932,7 +930,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
-
- FileAccess::make_default<FileAccessNetwork>(FileAccess::ACCESS_RESOURCES);
- }
--
-+#endif
- if (globals->setup(project_path, main_pack, upwards, editor) == OK) {
- #ifdef TOOLS_ENABLED
- found_project = true;
-@@ -1001,12 +999,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- if (editor) {
- packed_data->set_disabled(true);
- globals->set_disable_feature_overrides(true);
-- }
--
--#endif
--
--#ifdef TOOLS_ENABLED
-- if (editor) {
- Engine::get_singleton()->set_editor_hint(true);
- main_args.push_back("--editor");
- if (!init_windowed) {
-@@ -1281,7 +1273,6 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
- return OK;
-
- error:
--
- video_driver = "";
- audio_driver = "";
- tablet_driver = "";
-@@ -1290,9 +1281,11 @@ error:
- args.clear();
- main_args.clear();
-
-+#ifdef TOOLS_ENABLED
- if (show_help) {
- print_help(execpath);
- }
-+#endif
-
- if (performance) {
- memdelete(performance);
-@@ -1338,7 +1331,7 @@ error:
-
- Error Main::setup2(Thread::ID p_main_tid_override) {
- // Print engine name and version
-- print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE));
-+ print_line("v" + get_full_version_string());
-
- #if !defined(NO_THREADS)
- if (p_main_tid_override) {
diff --git a/patches/no-touchpad-gamepad.patch b/patches/no-touchpad-gamepad.patch
new file mode 100644
index 0000000..41116af
--- /dev/null
+++ b/patches/no-touchpad-gamepad.patch
@@ -0,0 +1,26 @@
+From bc17abceea50eafee49824b8d93fbc2a94facc26 Mon Sep 17 00:00:00 2001
+From: Marcel Admiraal <[email protected]>
+Date: Tue, 22 Mar 2022 11:20:17 +0000
+Subject: [PATCH] Improve detection of gamepads on Linux
+
+Requires gamepads to have a right x and y axis.
+---
+ platform/linuxbsd/joypad_linux.cpp | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp
+index 65d53b266f7d..475107293f31 100644
+--- a/platform/linuxbsd/joypad_linux.cpp
++++ b/platform/linuxbsd/joypad_linux.cpp
+@@ -333,9 +333,8 @@ void JoypadLinux::open_joypad(const char *p_path) {
+ }
+
+ // Check if the device supports basic gamepad events
+- bool has_abs_left = (test_bit(ABS_X, absbit) && test_bit(ABS_Y, absbit));
+- bool has_abs_right = (test_bit(ABS_RX, absbit) && test_bit(ABS_RY, absbit));
+- if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) && (has_abs_left || has_abs_right))) {
++ if (!(test_bit(EV_KEY, evbit) && test_bit(EV_ABS, evbit) &&
++ test_bit(ABS_RX, absbit) && test_bit(ABS_RY, absbit))) {
+ close(fd);
+ return;
+ }