Compare commits
20 Commits
v1.12-r8b
...
v1.12-r9-b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
584feabe44 | ||
|
|
ae2cfde897 | ||
|
|
42c66670b8 | ||
|
|
288539b902 | ||
|
|
61fd32f121 | ||
|
|
43108ec4a6 | ||
|
|
51089c6b98 | ||
|
|
cf18fcf91c | ||
|
|
da0513c768 | ||
|
|
37f520cdbe | ||
|
|
c98572bee0 | ||
|
|
b1774ffc4b | ||
|
|
57aaa0c4cd | ||
|
|
b961ae1b33 | ||
|
|
5e418e2b1b | ||
|
|
6d22a213f3 | ||
|
|
a76addc43f | ||
|
|
1d96217713 | ||
|
|
d2b8fdcfff | ||
|
|
507b671448 |
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -78,7 +78,7 @@ jobs:
|
|||||||
|
|
||||||
# - name: Build keepass2android (net)
|
# - name: Build keepass2android (net)
|
||||||
# run: |
|
# run: |
|
||||||
# make msbuild Flavor=Net
|
# make dotnetbuild Flavor=Net
|
||||||
|
|
||||||
# - name: Build APK (net)
|
# - name: Build APK (net)
|
||||||
# run: |
|
# run: |
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
|
|
||||||
# - name: Build keepass2android (nonet)
|
# - name: Build keepass2android (nonet)
|
||||||
# run: |
|
# run: |
|
||||||
# make msbuild Flavor=NoNet
|
# make dotnetbuild Flavor=NoNet
|
||||||
|
|
||||||
# - name: Build APK (nonet)
|
# - name: Build APK (nonet)
|
||||||
# run: |
|
# run: |
|
||||||
@@ -212,7 +212,7 @@ jobs:
|
|||||||
|
|
||||||
# - name: Build keepass2android (net)
|
# - name: Build keepass2android (net)
|
||||||
# run: |
|
# run: |
|
||||||
# make msbuild Flavor=Net
|
# make dotnetbuild Flavor=Net
|
||||||
|
|
||||||
# - name: Build APK (net)
|
# - name: Build APK (net)
|
||||||
# run: |
|
# run: |
|
||||||
@@ -230,7 +230,7 @@ jobs:
|
|||||||
|
|
||||||
# - name: Build keepass2android (nonet)
|
# - name: Build keepass2android (nonet)
|
||||||
# run: |
|
# run: |
|
||||||
# make msbuild Flavor=NoNet
|
# make dotnetbuild Flavor=NoNet
|
||||||
|
|
||||||
# - name: Build APK (nonet)
|
# - name: Build APK (nonet)
|
||||||
# run: |
|
# run: |
|
||||||
@@ -279,7 +279,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
minimum-size: 8GB
|
minimum-size: 8GB
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add dotnetbuild to PATH
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
# If we want to also have nmake, use this instead
|
# If we want to also have nmake, use this instead
|
||||||
#uses: ilammy/msvc-dev-cmd@v1
|
#uses: ilammy/msvc-dev-cmd@v1
|
||||||
@@ -309,12 +309,20 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make java
|
make java
|
||||||
|
|
||||||
|
- name: Update dotnet workloads
|
||||||
|
run: |
|
||||||
|
dotnet workload update
|
||||||
|
|
||||||
|
- name: Select the manifest
|
||||||
|
run: |
|
||||||
|
make manifestlink Flavor=Net
|
||||||
|
|
||||||
- name: Install NuGet dependencies (net)
|
- name: Install NuGet dependencies (net)
|
||||||
run: make nuget Flavor=Net
|
run: make nuget Flavor=Net
|
||||||
|
|
||||||
- name: Build keepass2android (net)
|
- name: Build keepass2android (net)
|
||||||
run: |
|
run: |
|
||||||
make msbuild Flavor=Net
|
make dotnetbuild Flavor=Net
|
||||||
|
|
||||||
- name: Build APK (net)
|
- name: Build APK (net)
|
||||||
run: |
|
run: |
|
||||||
@@ -327,15 +335,17 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
src/keepass2android/bin/*/*-Signed.apk
|
src/keepass2android/bin/*/*-Signed.apk
|
||||||
|
|
||||||
|
- name: Select the manifest
|
||||||
|
run: |
|
||||||
|
make manifestlink Flavor=NoNet
|
||||||
|
|
||||||
- name: Install NuGet dependencies (nonet)
|
- name: Install NuGet dependencies (nonet)
|
||||||
run: make nuget Flavor=NoNet
|
run: make nuget Flavor=NoNet
|
||||||
|
|
||||||
- name: Build keepass2android (nonet)
|
- name: Build keepass2android (nonet)
|
||||||
run: |
|
run: |
|
||||||
make msbuild Flavor=NoNet
|
make dotnetbuild Flavor=NoNet
|
||||||
- name: Update dotnet workloads
|
|
||||||
run: |
|
|
||||||
dotnet workload update
|
|
||||||
- name: Test Autofill
|
- name: Test Autofill
|
||||||
working-directory: ./src/Kp2aAutofillParser.Tests
|
working-directory: ./src/Kp2aAutofillParser.Tests
|
||||||
run: dotnet test
|
run: dotnet test
|
||||||
@@ -351,5 +361,3 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
src/keepass2android/bin/*/*-Signed.apk
|
src/keepass2android/bin/*/*-Signed.apk
|
||||||
|
|
||||||
- name: Perform "make distclean"
|
|
||||||
run: make distclean
|
|
||||||
|
|||||||
127
.github/workflows/release-net.yml
vendored
127
.github/workflows/release-net.yml
vendored
@@ -1,127 +0,0 @@
|
|||||||
name: Create keepass2android release
|
|
||||||
env:
|
|
||||||
NAME: 'ReleaseNet'
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published] # Trigger when a new GitHub release is published
|
|
||||||
workflow_dispatch: # For manual testing
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build-release:
|
|
||||||
|
|
||||||
runs-on: windows-2022
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Extract key store
|
|
||||||
env:
|
|
||||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
|
||||||
KeyStore: "${{ github.workspace }}/kp2a.keystore"
|
|
||||||
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo $KeyStore
|
|
||||||
echo $KEYSTORE_BASE64 | base64 --decode > $KeyStore
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
|
||||||
uses: gradle/actions/setup-gradle@v3
|
|
||||||
|
|
||||||
- name: Cache NuGet packages
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.nuget/packages
|
|
||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('src/**/*.csproj', 'src/**/packages.config') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-nuget-
|
|
||||||
|
|
||||||
# Workaround an issue when building on windows-2022. Error was
|
|
||||||
# D8 : OpenJDK 64-Bit Server VM warning : INFO: os::commit_memory(0x00000000ae400000, 330301440, 0) failed; error='The paging file is too small for this operation to complete' (DOS error/errno=1455) [D:\a\keepass2android\keepass2android\src\keepass2android\keepass2android-app.csproj]
|
|
||||||
# C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.D8.targets(81,5): error MSB6006: "java.exe" exited with code 1. [D:\a\keepass2android\keepass2android\src\keepass2android\keepass2android-app.csproj]
|
|
||||||
- name: Configure Pagefile
|
|
||||||
uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 # v1.4
|
|
||||||
with:
|
|
||||||
minimum-size: 8GB
|
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
|
||||||
uses: microsoft/setup-msbuild@v2
|
|
||||||
# If we want to also have nmake, use this instead
|
|
||||||
#uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
|
|
||||||
- name: Switch to JDK-17
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'temurin'
|
|
||||||
|
|
||||||
- name: Display java version
|
|
||||||
run: java -version
|
|
||||||
|
|
||||||
- name: Build native dependencies
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
make native
|
|
||||||
|
|
||||||
- name: Build java dependencies
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
make java
|
|
||||||
|
|
||||||
- name: Install NuGet dependencies (net)
|
|
||||||
run: make nuget Flavor=Net
|
|
||||||
|
|
||||||
- name: Use the _net manifest
|
|
||||||
run: |
|
|
||||||
make manifestlink Flavor=Net
|
|
||||||
|
|
||||||
- name: Build APK (net)
|
|
||||||
env:
|
|
||||||
KeyStore: "${{ github.workspace }}/kp2a.keystore"
|
|
||||||
MyAndroidSigningStorePass: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
||||||
MyAndroidSigningKeyPass: ${{ secrets.KEY_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
make Configuration=Release Flavor=Net
|
|
||||||
|
|
||||||
|
|
||||||
- name: Install NuGet dependencies (nonet)
|
|
||||||
run: make nuget Flavor=NoNet
|
|
||||||
|
|
||||||
- name: Use the _nonet manifest
|
|
||||||
run: |
|
|
||||||
make manifestlink Flavor=NoNet
|
|
||||||
|
|
||||||
- name: Build APK (NoNet)
|
|
||||||
env:
|
|
||||||
KeyStore: "${{ github.workspace }}/kp2a.keystore"
|
|
||||||
MyAndroidSigningStorePass: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
||||||
MyAndroidSigningKeyPass: ${{ secrets.KEY_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
make Configuration=Release Flavor=NoNet
|
|
||||||
|
|
||||||
- name: List files
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
ls src/keepass2android-app/bin/**/*.*
|
|
||||||
|
|
||||||
- name: Archive production artifacts (net)
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: signed APKs (built on ${{ github.job }})
|
|
||||||
path: |
|
|
||||||
src/keepass2android-app/bin/Release/net8.0-android/*-Signed.apk
|
|
||||||
|
|
||||||
- name: Upload APKs to GitHub Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
if: github.ref_type == 'tag'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
src/keepass2android-app/bin/Release/net8.0-android/*-Signed.apk
|
|
||||||
111
.github/workflows/release.yml
vendored
111
.github/workflows/release.yml
vendored
@@ -3,17 +3,19 @@ env:
|
|||||||
NAME: 'Release'
|
NAME: 'Release'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [published] # Trigger when a new GitHub release is published
|
tags:
|
||||||
workflow_dispatch: # For manual testing
|
- "v1.*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-release:
|
build-release:
|
||||||
|
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
flavor: [Net, NoNet]
|
||||||
|
target: [apk, apk_split]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@@ -52,7 +54,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
minimum-size: 8GB
|
minimum-size: 8GB
|
||||||
|
|
||||||
- name: Add msbuild to PATH
|
- name: Add msbuild/dotnet to PATH
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
# If we want to also have nmake, use this instead
|
# If we want to also have nmake, use this instead
|
||||||
#uses: ilammy/msvc-dev-cmd@v1
|
#uses: ilammy/msvc-dev-cmd@v1
|
||||||
@@ -76,66 +78,67 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make java
|
make java
|
||||||
|
|
||||||
- name: Install NuGet dependencies (net)
|
- name: List apks
|
||||||
run: make nuget Flavor=Net
|
run: find . -type f -name "*.apk"
|
||||||
|
shell: bash
|
||||||
- name: Use the _net manifest
|
|
||||||
|
- name: Update dotnet workloads
|
||||||
run: |
|
run: |
|
||||||
make manifestlink Flavor=Net
|
dotnet workload update
|
||||||
|
|
||||||
|
- name: List apks
|
||||||
|
run: find . -type f -name "*.apk"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
|
||||||
|
- name: Select the manifest
|
||||||
|
run: |
|
||||||
|
make manifestlink Flavor=${{ matrix.flavor }}
|
||||||
|
|
||||||
|
- name: List apks
|
||||||
|
run: find . -type f -name "*.apk"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
|
||||||
|
- name: Install NuGet dependencies
|
||||||
|
run: make nuget Flavor=${{ matrix.flavor }}
|
||||||
|
|
||||||
|
- name: List apks
|
||||||
|
run: find . -type f -name "*.apk"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Build APK (net)
|
- name: Build APK (net)
|
||||||
env:
|
env:
|
||||||
KeyStore: "${{ github.workspace }}/kp2a.keystore"
|
KeyStore: "${{ github.workspace }}/kp2a.keystore"
|
||||||
MyAndroidSigningStorePass: ${{ secrets.KEY_STORE_PASSWORD }}
|
MyAndroidSigningStorePass: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
MyAndroidSigningKeyPass: ${{ secrets.KEY_PASSWORD }}
|
MyAndroidSigningKeyPass: ${{ secrets.KEY_PASSWORD }}
|
||||||
run: |
|
DropboxAppKey: ${{ secrets.DROPBOX_APP_KEY }}
|
||||||
make Configuration=Release Flavor=Net
|
DropboxAppSecret: ${{ secrets.DROPBOX_APP_SECRET }}
|
||||||
|
DropboxAppFolderAppKey: ${{ secrets.DROPBOX_APP_FOLDER_APP_KEY }}
|
||||||
|
DropboxAppFolderAppSecret: ${{ secrets.DROPBOX_APP_FOLDER_APP_SECRET }}
|
||||||
|
|
||||||
- name: Archive production artifacts
|
run: |
|
||||||
uses: actions/upload-artifact@v4
|
make ${{ matrix.target }} Configuration=Release Flavor=${{ matrix.flavor }}
|
||||||
with:
|
|
||||||
name: signed APK (built on ${{ github.job }})
|
|
||||||
path: |
|
|
||||||
src/keepass2android-app/bin/Release/net8.0-android/*-Signed.apk
|
|
||||||
|
|
||||||
- name: Upload APK to GitHub Release
|
- name: List apks
|
||||||
uses: softprops/action-gh-release@v2
|
run: find . -type f -name "*.apk"
|
||||||
if: github.ref_type == 'tag'
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
src/keepass2android-app/bin/Release/net8.0-android/*-Signed.apk
|
|
||||||
|
|
||||||
|
|
||||||
- name: Install NuGet dependencies (nonet)
|
|
||||||
run: make nuget Flavor=NoNet
|
|
||||||
|
|
||||||
- name: Use the _nonet manifest
|
|
||||||
run: |
|
|
||||||
make manifestlink Flavor=NoNet
|
|
||||||
|
|
||||||
- name: Build APK (NoNet)
|
|
||||||
env:
|
|
||||||
KeyStore: "${{ github.workspace }}/kp2a.keystore"
|
|
||||||
MyAndroidSigningStorePass: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
||||||
MyAndroidSigningKeyPass: ${{ secrets.KEY_PASSWORD }}
|
|
||||||
run: |
|
|
||||||
make Configuration=Release Flavor=NoNet
|
|
||||||
|
|
||||||
- name: List files
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
|
||||||
ls src/keepass2android-app/bin/**/*.*
|
|
||||||
|
|
||||||
- name: Archive production artifacts
|
- name: Archive production artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: signed APK (built on ${{ github.job }})
|
name: keepass2android_${{ matrix.target }}_${{ matrix.flavor }}
|
||||||
path: |
|
path: |
|
||||||
src/keepass2android-app/bin/Release/net8.0-android/*-Signed.apk
|
src/keepass2android-app/bin/Release/net8.0-android/publish/*.apk
|
||||||
|
src/keepass2android-app/bin/Release/net8.0-android/*/publish/*.apk
|
||||||
|
|
||||||
- name: Upload APK to GitHub Release
|
- name: List apks
|
||||||
uses: softprops/action-gh-release@v2
|
run: find . -type f -name "*.apk"
|
||||||
if: github.ref_type == 'tag'
|
shell: bash
|
||||||
with:
|
|
||||||
files: |
|
#- name: Upload APK to GitHub Release
|
||||||
src/keepass2android-app/bin/Release/net8.0-android/*-Signed.apk
|
# uses: softprops/action-gh-release@v2
|
||||||
|
# if: github.ref_type == 'tag'
|
||||||
|
# with:
|
||||||
|
# files: |
|
||||||
|
# src/keepass2android-app/bin/Release/net8.0-android/*/publish/*.apk src/keepass2android-app/bin/Release/net8.0-android/publish/*.apk
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -64,7 +64,7 @@ Thumbs.db
|
|||||||
/src/java/android-filechooser/code/projectzip/project.zip
|
/src/java/android-filechooser/code/projectzip/project.zip
|
||||||
/src/java/android-filechooser/code/unused.txt
|
/src/java/android-filechooser/code/unused.txt
|
||||||
|
|
||||||
/src/Kp2aBusinessLogic/Io/DropboxFileStorageKeys.cs
|
/src/Kp2aBusinessLogic/Io/DropboxFileStorage.g.cs
|
||||||
|
|
||||||
/src/java/workspace/DriveTest
|
/src/java/workspace/DriveTest
|
||||||
|
|
||||||
|
|||||||
89
Makefile
89
Makefile
@@ -4,10 +4,10 @@
|
|||||||
# This Makefile can be used on both unix-like (use make) & windows (with GNU make)
|
# This Makefile can be used on both unix-like (use make) & windows (with GNU make)
|
||||||
#
|
#
|
||||||
# append the Configuration variable to 'make' call with value to use in '/p:Configuration='
|
# append the Configuration variable to 'make' call with value to use in '/p:Configuration='
|
||||||
# of msbuild command.
|
# of dotnetbuild command.
|
||||||
#
|
#
|
||||||
# append the Flavor variable to 'make' call with value to use in '/p:Flavor='
|
# append the Flavor variable to 'make' call with value to use in '/p:Flavor='
|
||||||
# of msbuild command.
|
# of dotnetbuild command.
|
||||||
#
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# make Configuration=Release Flavor=NoNet
|
# make Configuration=Release Flavor=NoNet
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
# - native: build the native libs
|
# - native: build the native libs
|
||||||
# - java: build the java libs
|
# - java: build the java libs
|
||||||
# - nuget: restore NuGet packages
|
# - nuget: restore NuGet packages
|
||||||
# - msbuild: build the project
|
# - dotnetbuild: build the project
|
||||||
# - apk: same as all
|
# - apk: same as all
|
||||||
# - manifestlink: creates a symlink (to be used in building) to the AndroidManifest corresponding to the selected Flavor
|
# - manifestlink: creates a symlink (to be used in building) to the AndroidManifest corresponding to the selected Flavor
|
||||||
#
|
#
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
# - clean_native: clean native lib
|
# - clean_native: clean native lib
|
||||||
# - clean_java: call clean target of java libs
|
# - clean_java: call clean target of java libs
|
||||||
# - clean_nuget: cleanup the 'nuget restore'
|
# - clean_nuget: cleanup the 'nuget restore'
|
||||||
# - clean_msbuild: call clean target of msbuild
|
# - clean_dotnet: call clean target of dotnetbuild
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@@ -60,45 +60,23 @@ $(info MAKESHELL: $(MAKESHELL))
|
|||||||
$(info SHELL: $(SHELL))
|
$(info SHELL: $(SHELL))
|
||||||
$(info )
|
$(info )
|
||||||
|
|
||||||
# On linux use xabuild, on Windows use MSBuild.exe, otherwise (macos?) use msbuild.
|
|
||||||
ifeq ($(detected_OS),Linux)
|
ifeq ($(detected_OS),Linux)
|
||||||
MSBUILD_binary := dotnet
|
DOTNET_binary := dotnet
|
||||||
MSBUILD := $(shell $(WHICH) $(MSBUILD_binary)) build
|
DOTNET := $(shell $(WHICH) $(DOTNET_binary))
|
||||||
else ifeq ($(detected_OS),Windows)
|
else ifeq ($(detected_OS),Windows)
|
||||||
MSBUILD_binary := MSBuild.exe
|
DOTNET_binary := dotnet
|
||||||
MSBUILD := $(shell $(WHICH) $(MSBUILD_binary) 2> nul)
|
DOTNET := $(shell $(WHICH) $(DOTNET_binary) 2> nul)
|
||||||
ifeq ($(MSBUILD),)
|
|
||||||
# Additional heuristic to find MSBUILD_BINARY on Windows
|
|
||||||
VSWHERE := "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
|
||||||
VSWHERE_CHECK := $(shell @echo off & $(VSWHERE) 2> nul || echo VSWHERE_NOT_FOUND)
|
|
||||||
ifneq ($(VSWHERE_CHECK),VSWHERE_NOT_FOUND)
|
|
||||||
MSBUILD := $(shell @echo off & $(VSWHERE) -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe)
|
|
||||||
VS_INSTALL_PATH := $(shell @echo off & $(VSWHERE) -property installationPath)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
MSBUILD_binary := msbuild
|
DOTNET_binary := dotnet
|
||||||
MSBUILD := $(shell $(WHICH) $(MSBUILD_binary))
|
DOTNET := $(shell $(WHICH) $(DOTNET_binary))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(MSBUILD),)
|
ifeq ($(DOTNET),)
|
||||||
$(info )
|
$(info )
|
||||||
$(info '$(MSBUILD_binary)' binary could not be found. Check it is in your PATH.)
|
$(info '$(DOTNET_binary)' binary could not be found. Check it is in your PATH.)
|
||||||
ifeq ($(detected_OS),Windows)
|
|
||||||
ifneq ($(VSWHERE_CHECK),VSWHERE_NOT_FOUND)
|
|
||||||
$(info )
|
|
||||||
$(info You may retry after running in the command prompt:)
|
|
||||||
$(info )
|
|
||||||
$(info "$(VS_INSTALL_PATH)\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64)
|
|
||||||
$(info )
|
|
||||||
$(info If this doesn't work, install/find the location of vcvarsall.bat)
|
|
||||||
$(info or install and add msbuild.exe to your PATH)
|
|
||||||
$(info )
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
$(error )
|
$(error )
|
||||||
endif
|
endif
|
||||||
$(info MSBUILD: $(MSBUILD))
|
$(info DOTNET: $(DOTNET))
|
||||||
$(info )
|
$(info )
|
||||||
|
|
||||||
ifeq ($(ANDROID_SDK_ROOT),)
|
ifeq ($(ANDROID_SDK_ROOT),)
|
||||||
@@ -117,7 +95,7 @@ endif
|
|||||||
$(info ANDROID_NDK_ROOT: $(ANDROID_NDK_ROOT))
|
$(info ANDROID_NDK_ROOT: $(ANDROID_NDK_ROOT))
|
||||||
|
|
||||||
ifneq ($(Configuration),)
|
ifneq ($(Configuration),)
|
||||||
MSBUILD_PARAM = -p:Configuration="$(Configuration)"
|
DOTNET_PARAM = -p:Configuration="$(Configuration)"
|
||||||
else
|
else
|
||||||
$(warning Configuration environment variable not set.)
|
$(warning Configuration environment variable not set.)
|
||||||
endif
|
endif
|
||||||
@@ -127,7 +105,7 @@ CREATE_MANIFEST_LINK :=
|
|||||||
|
|
||||||
MANIFEST_FILE :=
|
MANIFEST_FILE :=
|
||||||
ifneq ($(Flavor),)
|
ifneq ($(Flavor),)
|
||||||
MSBUILD_PARAM += -p:Flavor="$(Flavor)"
|
DOTNET_PARAM += -p:Flavor="$(Flavor)"
|
||||||
ifneq ($(Flavor),)
|
ifneq ($(Flavor),)
|
||||||
ifeq ($(Flavor),Debug)
|
ifeq ($(Flavor),Debug)
|
||||||
MANIFEST_FILE := AndroidManifest_debug.xml
|
MANIFEST_FILE := AndroidManifest_debug.xml
|
||||||
@@ -152,7 +130,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(KeyStore),)
|
ifneq ($(KeyStore),)
|
||||||
MSBUILD_PARAM += -p:AndroidKeyStore=True -p:AndroidSigningKeyStore="$(KeyStore)" -p:AndroidSigningStorePass=env:MyAndroidSigningStorePass -p:AndroidSigningKeyPass=env:MyAndroidSigningKeyPass -p:AndroidSigningKeyAlias="kp2a"
|
DOTNET_PARAM += -p:AndroidKeyStore=True -p:AndroidSigningKeyStore="$(KeyStore)" -p:AndroidSigningStorePass=env:MyAndroidSigningStorePass -p:AndroidSigningKeyPass=env:MyAndroidSigningKeyPass -p:AndroidSigningKeyAlias="kp2a"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(detected_OS),Windows)
|
ifeq ($(detected_OS),Windows)
|
||||||
@@ -176,7 +154,7 @@ endif
|
|||||||
# Recursive wildcard: https://stackoverflow.com/a/18258352
|
# Recursive wildcard: https://stackoverflow.com/a/18258352
|
||||||
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))
|
rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))
|
||||||
|
|
||||||
$(info MSBUILD_PARAM: $(MSBUILD_PARAM))
|
$(info DOTNET_PARAM: $(DOTNET_PARAM))
|
||||||
$(info nuget path: $(shell $(WHICH) nuget))
|
$(info nuget path: $(shell $(WHICH) nuget))
|
||||||
$(info )
|
$(info )
|
||||||
|
|
||||||
@@ -254,7 +232,7 @@ OUTPUT_PluginQR = src/java/Keepass2AndroidPluginSDK2/app/build/outputs/aar/Keepa
|
|||||||
.PHONY: native $(NATIVE_COMPONENTS) clean_native $(NATIVE_CLEAN_TARGETS) \
|
.PHONY: native $(NATIVE_COMPONENTS) clean_native $(NATIVE_CLEAN_TARGETS) \
|
||||||
java $(JAVA_COMPONENTS) clean_java $(JAVA_CLEAN_TARGETS) \
|
java $(JAVA_COMPONENTS) clean_java $(JAVA_CLEAN_TARGETS) \
|
||||||
nuget clean_nuget \
|
nuget clean_nuget \
|
||||||
msbuild clean_msbuild \
|
dotnetbuild clean_dotnet \
|
||||||
apk all clean
|
apk all clean
|
||||||
|
|
||||||
all: apk
|
all: apk
|
||||||
@@ -303,7 +281,7 @@ ifeq ($(shell $(WHICH) nuget),)
|
|||||||
endif
|
endif
|
||||||
$(RMFILE) stamp.nuget_*
|
$(RMFILE) stamp.nuget_*
|
||||||
nuget restore src/KeePass.sln
|
nuget restore src/KeePass.sln
|
||||||
$(MSBUILD) src/KeePass.sln -t:restore $(MSBUILD_PARAM) -p:RestorePackagesConfig=true
|
$(DOTNET) restore src/KeePass.sln $(DOTNET_PARAM) -p:RestorePackagesConfig=true
|
||||||
@echo "" > stamp.nuget_$(Flavor)
|
@echo "" > stamp.nuget_$(Flavor)
|
||||||
|
|
||||||
manifestlink:
|
manifestlink:
|
||||||
@@ -312,20 +290,21 @@ manifestlink:
|
|||||||
$(CREATE_MANIFEST_LINK)
|
$(CREATE_MANIFEST_LINK)
|
||||||
|
|
||||||
#####
|
#####
|
||||||
src/Kp2aBusinessLogic/Io/DropboxFileStorageKeys.cs:
|
|
||||||
ifeq ($(detected_OS),Windows)
|
|
||||||
$(CP) src\Kp2aBusinessLogic\Io\DropboxFileStorageKeysDummy.cs src\Kp2aBusinessLogic\Io\DropboxFileStorageKeys.cs
|
|
||||||
else
|
|
||||||
$(CP) src/Kp2aBusinessLogic/Io/DropboxFileStorageKeysDummy.cs $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
msbuild: manifestlink native java nuget src/Kp2aBusinessLogic/Io/DropboxFileStorageKeys.cs
|
dotnetbuild: manifestlink native java nuget
|
||||||
$(MSBUILD) src/KeePass.sln -target:keepass2android-app -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -p:BuildProjectReferences=true $(MSBUILD_PARAM) -p:Platform="Any CPU" -m
|
$(DOTNET) build src/KeePass.sln -target:keepass2android-app -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -p:BuildProjectReferences=true $(DOTNET_PARAM) -p:Platform="Any CPU" -m
|
||||||
|
|
||||||
apk: msbuild
|
apk: manifestlink native java nuget
|
||||||
$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_PARAM) -p:Platform=AnyCPU -m
|
$(DOTNET) publish src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(DOTNET_PARAM) -p:Platform=AnyCPU -m
|
||||||
|
|
||||||
build_all: msbuild
|
apk_split: manifestlink native java nuget
|
||||||
|
$(DOTNET) publish src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(DOTNET_PARAM) -p:Platform=AnyCPU -m -p:RuntimeIdentifier=android-arm
|
||||||
|
$(DOTNET) publish src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(DOTNET_PARAM) -p:Platform=AnyCPU -m -p:RuntimeIdentifier=android-arm64
|
||||||
|
$(DOTNET) publish src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(DOTNET_PARAM) -p:Platform=AnyCPU -m -p:RuntimeIdentifier=android-x86
|
||||||
|
$(DOTNET) publish src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(DOTNET_PARAM) -p:Platform=AnyCPU -m -p:RuntimeIdentifier=android-x64
|
||||||
|
src/build-scripts/rename-output-apks.sh src/keepass2android-app/bin/Release/net8.0-android/
|
||||||
|
|
||||||
|
build_all: dotnetbuild
|
||||||
|
|
||||||
##### Cleanup targets
|
##### Cleanup targets
|
||||||
|
|
||||||
@@ -369,10 +348,10 @@ else
|
|||||||
endif
|
endif
|
||||||
$(RMFILE) stamp.nuget_*
|
$(RMFILE) stamp.nuget_*
|
||||||
|
|
||||||
clean_msbuild:
|
clean_dotnet:
|
||||||
$(MSBUILD) src/KeePass.sln -target:clean $(MSBUILD_PARAM)
|
$(DOTNET) clean src/KeePass.sln $(DOTNET_PARAM)
|
||||||
|
|
||||||
clean: clean_native clean_java clean_nuget clean_msbuild
|
clean: clean_native clean_java clean_nuget clean_dotnet
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
ifneq ("$(wildcard ./allow_git_clean)","")
|
ifneq ("$(wildcard ./allow_git_clean)","")
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
namespace keepass2android.Io
|
|
||||||
{
|
|
||||||
public partial class DropboxFileStorage
|
|
||||||
{
|
|
||||||
private const string AppKey = "dummy";
|
|
||||||
private const string AppSecret = "dummy";
|
|
||||||
}
|
|
||||||
public partial class DropboxAppFolderFileStorage
|
|
||||||
{
|
|
||||||
private const string AppKey = "dummy";
|
|
||||||
private const string AppSecret = "dummy";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
27
src/Kp2aBusinessLogic/Io/GenerateSecrets.targets
Normal file
27
src/Kp2aBusinessLogic/Io/GenerateSecrets.targets
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<Project>
|
||||||
|
<Target Name="GenerateDropboxSecrets" BeforeTargets="BeforeCompile"
|
||||||
|
Inputs="@(DropboxSecretLines)"
|
||||||
|
Outputs="DropboxFileStorage.g.cs">
|
||||||
|
|
||||||
|
<WriteLinesToFile
|
||||||
|
File="Io/DropboxFileStorage.g.cs"
|
||||||
|
Lines="@(DropboxSecretLines->'%(Text)')"
|
||||||
|
Overwrite="true"
|
||||||
|
/>
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<DropboxSecretLines Include="GeneratedDropboxSecrets">
|
||||||
|
<Text>namespace keepass2android.Io {
|
||||||
|
public partial class DropboxFileStorage {
|
||||||
|
private const string AppKey = "$(DropboxAppKey)";
|
||||||
|
private const string AppSecret = "$(DropboxAppSecret)";
|
||||||
|
}
|
||||||
|
public partial class DropboxAppFolderFileStorage {
|
||||||
|
private const string AppKey = "$(DropboxAppFolderAppKey)";
|
||||||
|
private const string AppSecret = "$(DropboxAppFolderAppSecret)";
|
||||||
|
}
|
||||||
|
}</Text>
|
||||||
|
</DropboxSecretLines>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
<Folder Include="Resources\" />
|
<Folder Include="Resources\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FluentFTP" Version="51.1.0" />
|
<PackageReference Include="FluentFTP" Version="51.1.0" Condition="'$(Flavor)'!='NoNet'"/>
|
||||||
<PackageReference Include="MegaApiClient" Version="1.10.4" />
|
<PackageReference Include="MegaApiClient" Version="1.10.4" Condition="'$(Flavor)'!='NoNet'"/>
|
||||||
<PackageReference Include="Microsoft.Graph" Version="5.68.0" />
|
<PackageReference Include="Microsoft.Graph" Version="5.68.0" Condition="'$(Flavor)'!='NoNet'"/>
|
||||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.67.1" />
|
<PackageReference Include="Microsoft.Identity.Client" Version="4.67.1" Condition="'$(Flavor)'!='NoNet'"/>
|
||||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.8.0" />
|
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.8.0" />
|
||||||
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.13.1.5" />
|
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.13.1.5" />
|
||||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.11.0.3" />
|
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.11.0.3" />
|
||||||
@@ -26,9 +26,21 @@
|
|||||||
<ProjectReference Include="..\TwofishCipher\TwofishCipher.csproj" />
|
<ProjectReference Include="..\TwofishCipher\TwofishCipher.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Io/DropboxFileStorageKeysDummy.cs" />
|
|
||||||
<Compile Remove="Io/DropboxFileStorageKeysDummy.cs" />
|
|
||||||
<Content Remove="Io/DropboxFileStorageKeysDummy.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup Condition="'$(Flavor)'=='NoNet'">
|
||||||
|
<None Remove="Io/OneDrive2FileStorage.cs" />
|
||||||
|
<Compile Remove="Io/OneDrive2FileStorage.cs" />
|
||||||
|
<Content Remove="Io/OneDrive2FileStorage.cs" />
|
||||||
|
<None Remove="Io/MegaFileStorage.cs" />
|
||||||
|
<Compile Remove="Io/MegaFileStorage.cs" />
|
||||||
|
<Content Remove="Io/MegaFileStorage.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Import Project="Io/GenerateSecrets.targets" />
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Io/DropboxFileStorage.g.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -20,7 +20,6 @@ git clone --recurse-submodules https://github.com/PhilippC/keepass2android.git
|
|||||||
cd keepass2android/src/build-scripts
|
cd keepass2android/src/build-scripts
|
||||||
./build-java.sh && ./build-native.sh
|
./build-java.sh && ./build-native.sh
|
||||||
cd ..
|
cd ..
|
||||||
cp Kp2aBusinessLogic/Io/DropboxFileStorageKeysDummy.cs Kp2aBusinessLogic/Io/DropboxFileStorageKeys.cs
|
|
||||||
cd keepass2android-app
|
cd keepass2android-app
|
||||||
ln -s Manifests/AndroidManifest_debug.xml AndroidManifest.xml
|
ln -s Manifests/AndroidManifest_debug.xml AndroidManifest.xml
|
||||||
dotnet workload restore
|
dotnet workload restore
|
||||||
|
|||||||
22
src/build-scripts/rename-output-apks.sh
Normal file
22
src/build-scripts/rename-output-apks.sh
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
BASE_DIR="${1}"
|
||||||
|
|
||||||
|
for arch_dir in "$BASE_DIR"/android-*/; do
|
||||||
|
arch=$(basename "$arch_dir")
|
||||||
|
arch=${arch#android-}
|
||||||
|
APK_DIR="${arch_dir}publish"
|
||||||
|
if [[ -d "$APK_DIR" ]]; then
|
||||||
|
apk_path=$(find "$APK_DIR" -maxdepth 1 -type f -name "*.apk" | head -n1)
|
||||||
|
if [[ -n "$apk_path" ]]; then
|
||||||
|
base=$(basename "$apk_path" .apk)
|
||||||
|
new_path="$APK_DIR/${base}-${arch}.apk"
|
||||||
|
mv "$apk_path" "$new_path"
|
||||||
|
echo "Renamed $apk_path to $new_path"
|
||||||
|
else
|
||||||
|
echo "No APK found in $APK_DIR"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Directory $APK_DIR does not exist"
|
||||||
|
fi
|
||||||
|
done
|
||||||
@@ -37,8 +37,10 @@ using System.Net;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Android.Content.Res;
|
using Android.Content.Res;
|
||||||
using Android.Database;
|
using Android.Database;
|
||||||
|
#if !NO_QR_SCANNER
|
||||||
using Android.Gms.Common;
|
using Android.Gms.Common;
|
||||||
using Android.Gms.Tasks;
|
using Android.Gms.Tasks;
|
||||||
|
#endif
|
||||||
using Android.Graphics;
|
using Android.Graphics;
|
||||||
using Android.Graphics.Drawables;
|
using Android.Graphics.Drawables;
|
||||||
using Android.Runtime;
|
using Android.Runtime;
|
||||||
@@ -60,7 +62,6 @@ using Xamarin.Google.MLKit.Vision.Barcode.Common;
|
|||||||
using Xamarin.Google.MLKit.Vision.CodeScanner;
|
using Xamarin.Google.MLKit.Vision.CodeScanner;
|
||||||
#endif
|
#endif
|
||||||
using Console = System.Console;
|
using Console = System.Console;
|
||||||
using Task = Android.Gms.Tasks.Task;
|
|
||||||
|
|
||||||
namespace keepass2android
|
namespace keepass2android
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:versionCode="213"
|
android:versionCode="217"
|
||||||
android:versionName="1.12-r8b"
|
android:versionName="1.12-r9c"
|
||||||
package="keepass2android.keepass2android"
|
package="keepass2android.keepass2android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:versionCode="213"
|
android:versionCode="217"
|
||||||
android:versionName="1.12-r8b"
|
android:versionName="1.12-r9c"
|
||||||
package="keepass2android.keepass2android_nonet"
|
package="keepass2android.keepass2android_nonet"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|||||||
@@ -751,8 +751,8 @@
|
|||||||
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.1.12" />
|
<PackageReference Include="Xamarin.AndroidX.Preference" Version="1.2.1.12" />
|
||||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.12.0.2" />
|
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.12.0.2" />
|
||||||
<PackageReference Include="Xamarin.Google.Guava" Version="33.4.0.1" />
|
<PackageReference Include="Xamarin.Google.Guava" Version="33.4.0.1" />
|
||||||
<PackageReference Include="Xamarin.GooglePlayServices.Auth" Version="121.3.0.1" />
|
<PackageReference Include="Xamarin.GooglePlayServices.Auth" Version="121.3.0.1" Condition="'$(Flavor)'!='NoNet'" />
|
||||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.5.0.4" />
|
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.5.0.4" Condition="'$(Flavor)'!='NoNet'" />
|
||||||
<PackageReference Include="Xamarin.GooglePlayServices.Code.Scanner" Version="116.1.0.10" Condition="'$(Flavor)'!='NoNet'" />
|
<PackageReference Include="Xamarin.GooglePlayServices.Code.Scanner" Version="116.1.0.10" Condition="'$(Flavor)'!='NoNet'" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user