Compare commits
	
		
			3 Commits
		
	
	
		
			v1.12-r9-b
			...
			v1.12-r9-b
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 584feabe44 | ||
|   | ae2cfde897 | ||
|   | 42c66670b8 | 
							
								
								
									
										14
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -78,7 +78,7 @@ jobs: | ||||
|  | ||||
|   #   - name: Build keepass2android (net) | ||||
|   #     run: | | ||||
|   #       make msbuild Flavor=Net | ||||
|   #       make dotnetbuild Flavor=Net | ||||
|  | ||||
|   #   - name: Build APK (net) | ||||
|   #     run: | | ||||
| @@ -96,7 +96,7 @@ jobs: | ||||
|  | ||||
|   #   - name: Build keepass2android (nonet) | ||||
|   #     run: | | ||||
|   #       make msbuild Flavor=NoNet | ||||
|   #       make dotnetbuild Flavor=NoNet | ||||
|  | ||||
|   #   - name: Build APK (nonet) | ||||
|   #     run: | | ||||
| @@ -212,7 +212,7 @@ jobs: | ||||
|  | ||||
|   #   - name: Build keepass2android (net) | ||||
|   #     run: | | ||||
|   #       make msbuild Flavor=Net | ||||
|   #       make dotnetbuild Flavor=Net | ||||
|  | ||||
|   #   - name: Build APK (net) | ||||
|   #     run: | | ||||
| @@ -230,7 +230,7 @@ jobs: | ||||
|  | ||||
|   #   - name: Build keepass2android (nonet) | ||||
|   #     run: | | ||||
|   #       make msbuild Flavor=NoNet | ||||
|   #       make dotnetbuild Flavor=NoNet | ||||
|  | ||||
|   #   - name: Build APK (nonet) | ||||
|   #     run: | | ||||
| @@ -279,7 +279,7 @@ jobs: | ||||
|       with: | ||||
|         minimum-size: 8GB | ||||
|  | ||||
|     - name: Add msbuild to PATH | ||||
|     - name: Add dotnetbuild to PATH | ||||
|       uses: microsoft/setup-msbuild@v2 | ||||
|       # If we want to also have nmake, use this instead | ||||
|       #uses: ilammy/msvc-dev-cmd@v1 | ||||
| @@ -322,7 +322,7 @@ jobs: | ||||
|  | ||||
|     - name: Build keepass2android (net) | ||||
|       run: | | ||||
|         make msbuild Flavor=Net | ||||
|         make dotnetbuild Flavor=Net | ||||
|  | ||||
|     - name: Build APK (net) | ||||
|       run: | | ||||
| @@ -344,7 +344,7 @@ jobs: | ||||
|  | ||||
|     - name: Build keepass2android (nonet) | ||||
|       run: | | ||||
|         make msbuild Flavor=NoNet | ||||
|         make dotnetbuild Flavor=NoNet | ||||
|  | ||||
|     - name: Test Autofill | ||||
|       working-directory: ./src/Kp2aAutofillParser.Tests | ||||
|   | ||||
							
								
								
									
										19
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -54,7 +54,7 @@ jobs: | ||||
|       with: | ||||
|         minimum-size: 8GB | ||||
|  | ||||
|     - name: Add msbuild to PATH | ||||
|     - name: Add msbuild/dotnet to PATH | ||||
|       uses: microsoft/setup-msbuild@v2 | ||||
|       # If we want to also have nmake, use this instead | ||||
|       #uses: ilammy/msvc-dev-cmd@v1 | ||||
| @@ -78,19 +78,34 @@ jobs: | ||||
|       run: | | ||||
|         make java | ||||
|  | ||||
|     - name: List apks | ||||
|       run:  find . -type f -name "*.apk" | ||||
|       shell: bash | ||||
|        | ||||
|     - name: Update dotnet workloads | ||||
|       run: | | ||||
|         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) | ||||
|       env: | ||||
| @@ -107,6 +122,7 @@ jobs: | ||||
|      | ||||
|     - name: List apks | ||||
|       run:  find . -type f -name "*.apk" | ||||
|       shell: bash | ||||
|      | ||||
|     - name: Archive production artifacts | ||||
|       uses: actions/upload-artifact@v4 | ||||
| @@ -118,6 +134,7 @@ jobs: | ||||
|      | ||||
|     - name: List apks | ||||
|       run:  find . -type f -name "*.apk" | ||||
|       shell: bash | ||||
|        | ||||
|     #- name: Upload APK to GitHub Release | ||||
|     #  uses: softprops/action-gh-release@v2 | ||||
|   | ||||
							
								
								
									
										82
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										82
									
								
								Makefile
									
									
									
									
									
								
							| @@ -4,10 +4,10 @@ | ||||
| # 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=' | ||||
| # of msbuild command. | ||||
| # of dotnetbuild command. | ||||
| # | ||||
| # append the Flavor variable to 'make' call with value to use in '/p:Flavor=' | ||||
| # of msbuild command. | ||||
| # of dotnetbuild command. | ||||
| # | ||||
| # Example: | ||||
| #    make Configuration=Release Flavor=NoNet | ||||
| @@ -18,7 +18,7 @@ | ||||
| #  - native: build the native libs | ||||
| #  - java: build the java libs | ||||
| #  - nuget: restore NuGet packages | ||||
| #  - msbuild: build the project | ||||
| #  - dotnetbuild: build the project | ||||
| #  - apk: same as all | ||||
| #  - 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_java: call clean target of java libs | ||||
| #  - 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 ) | ||||
|  | ||||
| # On linux use xabuild, on Windows use MSBuild.exe, otherwise (macos?) use msbuild. | ||||
| ifeq ($(detected_OS),Linux) | ||||
|   MSBUILD_binary := dotnet | ||||
|   MSBUILD := $(shell $(WHICH) $(MSBUILD_binary)) publish | ||||
|   DOTNET_binary := dotnet | ||||
|   DOTNET := $(shell $(WHICH) $(DOTNET_binary)) | ||||
| else ifeq ($(detected_OS),Windows) | ||||
|   MSBUILD_binary := dotnet | ||||
|   MSBUILD := $(shell $(WHICH) $(MSBUILD_binary) 2> nul) publish | ||||
|   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 | ||||
|   DOTNET_binary := dotnet | ||||
|   DOTNET := $(shell $(WHICH) $(DOTNET_binary) 2> nul) | ||||
| else | ||||
|   MSBUILD_binary := msbuild | ||||
|   MSBUILD := $(shell $(WHICH) $(MSBUILD_binary)) | ||||
|   DOTNET_binary := dotnet | ||||
|   DOTNET := $(shell $(WHICH) $(DOTNET_binary)) | ||||
| endif | ||||
|  | ||||
| ifeq ($(MSBUILD),) | ||||
| ifeq ($(DOTNET),) | ||||
|   $(info ) | ||||
|   $(info '$(MSBUILD_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 | ||||
|   $(info '$(DOTNET_binary)' binary could not be found. Check it is in your PATH.) | ||||
|   $(error ) | ||||
| endif | ||||
| $(info MSBUILD: $(MSBUILD)) | ||||
| $(info DOTNET: $(DOTNET)) | ||||
| $(info ) | ||||
|  | ||||
| ifeq ($(ANDROID_SDK_ROOT),) | ||||
| @@ -117,7 +95,7 @@ endif | ||||
| $(info ANDROID_NDK_ROOT: $(ANDROID_NDK_ROOT)) | ||||
|  | ||||
| ifneq ($(Configuration),) | ||||
|   MSBUILD_PARAM = -p:Configuration="$(Configuration)" | ||||
|   DOTNET_PARAM = -p:Configuration="$(Configuration)" | ||||
| else | ||||
|   $(warning Configuration environment variable not set.) | ||||
| endif | ||||
| @@ -127,7 +105,7 @@ CREATE_MANIFEST_LINK := | ||||
|  | ||||
| MANIFEST_FILE :=  | ||||
| ifneq ($(Flavor),) | ||||
|   MSBUILD_PARAM += -p:Flavor="$(Flavor)" | ||||
|   DOTNET_PARAM += -p:Flavor="$(Flavor)" | ||||
|   ifneq ($(Flavor),) | ||||
| 		ifeq ($(Flavor),Debug) | ||||
| 			MANIFEST_FILE := AndroidManifest_debug.xml | ||||
| @@ -152,7 +130,7 @@ else | ||||
| endif | ||||
|  | ||||
| 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 | ||||
|  | ||||
| ifeq ($(detected_OS),Windows) | ||||
| @@ -176,7 +154,7 @@ endif | ||||
| # Recursive wildcard: https://stackoverflow.com/a/18258352 | ||||
| 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 ) | ||||
|  | ||||
| @@ -254,7 +232,7 @@ OUTPUT_PluginQR = src/java/Keepass2AndroidPluginSDK2/app/build/outputs/aar/Keepa | ||||
| .PHONY: native $(NATIVE_COMPONENTS) clean_native $(NATIVE_CLEAN_TARGETS) \ | ||||
| 	java $(JAVA_COMPONENTS) clean_java $(JAVA_CLEAN_TARGETS) \ | ||||
| 	nuget clean_nuget \ | ||||
| 	msbuild clean_msbuild \ | ||||
| 	dotnetbuild clean_dotnet \ | ||||
| 	apk all clean | ||||
|  | ||||
| all: apk | ||||
| @@ -303,7 +281,7 @@ ifeq ($(shell $(WHICH) nuget),) | ||||
| endif | ||||
| 	$(RMFILE) stamp.nuget_* | ||||
| 	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) | ||||
|  | ||||
| manifestlink: | ||||
| @@ -313,20 +291,20 @@ manifestlink: | ||||
|  | ||||
| ##### | ||||
|  | ||||
| msbuild: 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 | ||||
| dotnetbuild: manifestlink native java nuget  | ||||
| 	$(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   | ||||
| 	$(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  | ||||
| 	$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_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 | ||||
| 	$(MSBUILD) src/keepass2android-app/keepass2android-app.csproj -p:AndroidSdkDirectory="$(ANDROID_SDK_ROOT)" -t:SignAndroidPackage $(MSBUILD_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-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: msbuild | ||||
| build_all: dotnetbuild | ||||
|  | ||||
| ##### Cleanup targets | ||||
|  | ||||
| @@ -370,10 +348,10 @@ else | ||||
| endif | ||||
| 	$(RMFILE) stamp.nuget_* | ||||
|  | ||||
| clean_msbuild: | ||||
| 	$(MSBUILD) src/KeePass.sln -target:clean $(MSBUILD_PARAM) | ||||
| clean_dotnet: | ||||
| 	$(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 | ||||
| ifneq ("$(wildcard ./allow_git_clean)","") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user