Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wrapper scripts for adb and jarsigner #38

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions android-export-defaults.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index e489bce3f..ed01ff928 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1970,9 +1970,9 @@ void register_android_exporter() {
exe_ext = "*.exe";
}

- EDITOR_DEF("export/android/adb", "");
+ EDITOR_DEF("export/android/adb", "/app/bin/adb");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/android/adb", PROPERTY_HINT_GLOBAL_FILE, exe_ext));
- EDITOR_DEF("export/android/jarsigner", "");
+ EDITOR_DEF("export/android/jarsigner", "/app/bin/jarsigner");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/android/jarsigner", PROPERTY_HINT_GLOBAL_FILE, exe_ext));
EDITOR_DEF("export/android/debug_keystore", "");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "export/android/debug_keystore", PROPERTY_HINT_GLOBAL_FILE, "*.keystore"));
16 changes: 16 additions & 0 deletions org.godotengine.Godot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ finish-args:
- --socket=pulseaudio
- --filesystem=host
- --device=all
- --talk-name=org.freedesktop.Flatpak

modules:
- shared-modules/glu/glu-9.0.0.json
Expand All @@ -67,19 +68,34 @@ modules:
sha256: a21ba76e504ef3840b0dca4a7dcd1e184ed49aec28356a68d8975700a0d90a25
url: https://downloads.tuxfamily.org/godotengine/3.1.1/godot-3.1.1-stable.tar.xz

- type: patch
path: android-export-defaults.patch

- type: script
dest-filename: godot.sh
commands:
- export APPDATA="$XDG_DATA_HOME"
- /app/bin/godot-bin "$@"

- type: script
dest-filename: adb.sh
commands:
- flatpak-spawn --host adb "$@"

- type: script
dest-filename: jarsigner.sh
commands:
- flatpak-spawn --host jarsigner "$@"

- type: file
path: org.godotengine.Godot.appdata.xml

build-commands:
- scons $SCONS_FLAGS $SCONS_FLAGS_EXTRA tools=yes target=release_debug -j "$FLATPAK_BUILDER_N_JOBS"
- install -D -m755 bin/godot.x11.opt.tools.* /app/bin/godot-bin
- install -D -m755 godot.sh /app/bin/godot
- install -D -m755 adb.sh /app/bin/adb
- install -D -m755 jarsigner.sh /app/bin/jarsigner
- desktop-file-edit --set-icon=org.godotengine.Godot misc/dist/linux/org.godotengine.Godot.desktop
- install -Dm644 misc/dist/linux/org.godotengine.Godot.desktop /app/share/applications/org.godotengine.Godot.desktop
- sed -i 's/<icon name="godot"/<icon name="org.godotengine.Godot"/' misc/dist/linux/x-godot-project.xml
Expand Down