Compare commits

..

No commits in common. "e0677263d667eef9f84b0d834e93fca2f4a9e336" and "8b1fe0a9be77a529c991792d7e4a98cc6ba59403" have entirely different histories.

8 changed files with 30 additions and 49 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
android/*.keystore

View file

@ -22,31 +22,17 @@
# NOTE: zig overlay triggers issues with X11/GL libraries
# This might be misconfiguration on my end
overlays = [ ];
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
config = { };
};
formatter = pkgs.nixfmt;
devShells.default = with pkgs;
mkShell {
LD_LIBRARY_PATH =
lib.makeLibraryPath [ stdenv.cc.cc ]; # For libstdc++.so.6
ANDROID_HOME = "${androidenv.androidPkgs_9_0.androidsdk}/libexec/android-sdk";
LD_LIBRARY_PATH = lib.makeLibraryPath [ stdenv.cc.cc ]; # For libstdc++.so.6
ANDROID_HOME = "foo/bar";
nativeBuildInputs = [
clang
just
godot_4
android-tools
androidenv.androidPkgs_9_0.androidsdk
androidenv.androidPkgs_9_0.platform-tools
jre_headless
];
nativeBuildInputs = [ clang just android-tools godot_4 ];
buildInputs = [ sqlite ];
};
};

View file

@ -31,7 +31,7 @@ version/name=""
package/unique_name="com.example.$genname"
package/name=""
package/signed=true
package/app_category=6
package/app_category=2
package/retain_data_on_uninstall=false
package/exclude_from_recents=false
package/show_in_android_tv=false

View file

@ -2,6 +2,12 @@ extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
$FileDialog.mode = FileDialog.FILE_MODE_OPEN_FILE
$FileDialog.access = FileDialog.ACCESS_FILESYSTEM
$FileDialog.use_native_dialog = true
$MarginContainer/Unloaded/Button.pressed.connect(_on_button_pressed)
Global.state_changed.connect(_update_state)
if Global.current_state == Global.State.UNLOADED:
pass
@ -11,6 +17,17 @@ func _ready():
var current_scene = s.instantiate()
$MarginContainer.add_child(current_scene)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_button_pressed():
$FileDialog.show()
print("button pressed")
func _on_file_dialog_file_selected(path):
Global.load_db(path)
func _update_state(old: Global.State, new: Global.State):
print("updated state")
pass

View file

@ -27,3 +27,7 @@ metadata/_edit_use_anchors_ = true
[node name="Unloaded" parent="MarginContainer" instance=ExtResource("2_diny5")]
layout_mode = 2
[node name="FileDialog" type="FileDialog" parent="."]
[connection signal="file_selected" from="FileDialog" to="." method="_on_file_dialog_file_selected"]

View file

@ -1,12 +0,0 @@
extends CenterContainer
func _ready():
$FileDialog.mode = FileDialog.FILE_MODE_OPEN_FILE
$FileDialog.access = FileDialog.ACCESS_FILESYSTEM
$FileDialog.use_native_dialog = true
func _on_button_pressed():
$FileDialog.show()
func _on_file_dialog_file_selected(path):
Global.load_db(path)

View file

@ -1,16 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://b71wpb1vts86r"]
[ext_resource type="Script" path="res://unloaded.gd" id="1_ibvef"]
[gd_scene format=3 uid="uid://b71wpb1vts86r"]
[node name="CenterContainer" type="CenterContainer"]
script = ExtResource("1_ibvef")
[node name="Button" type="Button" parent="."]
custom_minimum_size = Vector2(200, 200)
layout_mode = 2
text = "Load database"
[node name="FileDialog" type="FileDialog" parent="."]
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
[connection signal="file_selected" from="FileDialog" to="." method="_on_file_dialog_file_selected"]

View file

@ -4,12 +4,7 @@ alias t := test
alias fmt := format
edit:
godot4 --editor --quiet godot/project.godot
android-keystore:
mkdir -p android
keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore android/debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12
keytool -v -genkey -keystore logue.keystore -alias logue -keyalg RSA -validity 10000
godot4 --editor godot/project.godot
pre-build:
git submodule update --init --recursive