Compare commits
	
		
			2 Commits
		
	
	
		
			v1.12-r9-b
			...
			v1.12-r9-b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 584feabe44 | ||
|   | ae2cfde897 | 
							
								
								
									
										14
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.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 | ||||||
| @@ -322,7 +322,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: | | ||||||
| @@ -344,7 +344,7 @@ jobs: | |||||||
|  |  | ||||||
|     - name: Build keepass2android (nonet) |     - name: Build keepass2android (nonet) | ||||||
|       run: | |       run: | | ||||||
|         make msbuild Flavor=NoNet |         make dotnetbuild Flavor=NoNet | ||||||
|  |  | ||||||
|     - name: Test Autofill |     - name: Test Autofill | ||||||
|       working-directory: ./src/Kp2aAutofillParser.Tests |       working-directory: ./src/Kp2aAutofillParser.Tests | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -54,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 | ||||||
| @@ -78,13 +78,27 @@ jobs: | |||||||
|       run: | |       run: | | ||||||
|         make java |         make java | ||||||
|  |  | ||||||
|  |     - name: List apks | ||||||
|  |       run:  find . -type f -name "*.apk" | ||||||
|  |       shell: bash | ||||||
|  |        | ||||||
|     - name: Update dotnet workloads |     - name: Update dotnet workloads | ||||||
|       run: | |       run: | | ||||||
|         dotnet workload update         |         dotnet workload update         | ||||||
|  |  | ||||||
|  |     - name: List apks | ||||||
|  |       run:  find . -type f -name "*.apk" | ||||||
|  |       shell: bash | ||||||
|  |  | ||||||
|  |  | ||||||
|     - name: Select the manifest |     - name: Select the manifest | ||||||
|       run: | |       run: | | ||||||
|         make manifestlink Flavor=${{ matrix.flavor }} |         make manifestlink Flavor=${{ matrix.flavor }} | ||||||
|  |      | ||||||
|  |     - name: List apks | ||||||
|  |       run:  find . -type f -name "*.apk" | ||||||
|  |       shell: bash | ||||||
|  |  | ||||||
|  |  | ||||||
|     - name: Install NuGet dependencies |     - name: Install NuGet dependencies | ||||||
|       run: make nuget Flavor=${{ matrix.flavor }} |       run: make nuget Flavor=${{ matrix.flavor }} | ||||||
|   | |||||||
							
								
								
									
										82
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										82
									
								
								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)) publish |   DOTNET := $(shell $(WHICH) $(DOTNET_binary)) | ||||||
| else ifeq ($(detected_OS),Windows) | else ifeq ($(detected_OS),Windows) | ||||||
|   MSBUILD_binary := dotnet |   DOTNET_binary := dotnet | ||||||
|   MSBUILD := $(shell $(WHICH) $(MSBUILD_binary) 2> nul) publish |   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: | ||||||
| @@ -313,20 +291,20 @@ manifestlink: | |||||||
|  |  | ||||||
| ##### | ##### | ||||||
|  |  | ||||||
| msbuild: manifestlink native java nuget  | 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: manifestlink native java nuget   | 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  | ||||||
|  |  | ||||||
| apk_split: manifestlink native java nuget  | apk_split: manifestlink native java nuget  | ||||||
| 	$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_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-arm | ||||||
| 	$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_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-arm64 | ||||||
| 	$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_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-x86 | ||||||
| 	$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_PARAM) -p:Platform=AnyCPU -m -p:RuntimeIdentifier=android-x64 | 	$(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/ | 	src/build-scripts/rename-output-apks.sh src/keepass2android-app/bin/Release/net8.0-android/ | ||||||
|  |  | ||||||
| build_all: msbuild | build_all: dotnetbuild | ||||||
|  |  | ||||||
| ##### Cleanup targets | ##### Cleanup targets | ||||||
|  |  | ||||||
| @@ -370,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)","") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user