add some files for building on Linux

This commit is contained in:
Philipp Crocoll
2025-04-08 14:16:39 +02:00
parent 92b8ff5c8d
commit 8e9c2824cf
3 changed files with 60 additions and 0 deletions

25
src/build-scripts/build-java.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
set -e
#unset ANDROID_NDK_HOME ANDROID_NDK
pushd ../java/
pushd JavaFileStorageTest-AS
./gradlew assemble
popd
pushd KP2ASoftkeyboard_AS
./gradlew assemble
popd
pushd Keepass2AndroidPluginSDK2
./gradlew assemble
popd
pushd KP2AKdbLibrary
./gradlew assemble
popd
popd

View File

@@ -0,0 +1,6 @@
#!/bin/bash
set -e
pushd ../java/argon2
ndk-build
popd

View File

@@ -0,0 +1,29 @@
## Setup build environment
* install Android SDK
* install Android NDK
* install dotnet8
```
#from https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-8.0.407-linux-x64-binaries
wget https://download.visualstudio.microsoft.com/download/pr/9d07577e-f7bc-4d60-838d-f79c50b5c11a/459ef339396783db369e0432d6dc3d7e/dotnet-sdk-8.0.407-linux-x64.tar.gz
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-8.0.407-linux-x64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
```
## Build Keepass2Android
```
git clone --recurse-submodules https://github.com/PhilippC/keepass2android.git
cd keepass2android/src/build-scripts
./build-java.sh && ./build-native.sh
cd ..
cp Kp2aBusinessLogic/Io/DropboxFileStorageKeysDummy.cs Kp2aBusinessLogic/Io/DropboxFileStorageKeys.cs
cd keepass2android-app
ln -s Manifests/AndroidManifest_debug.xml AndroidManifest.xml
dotnet workload restore
dotnet restore
dotnet build
```