diff --git a/.gitignore b/.gitignore index 7964536..45e4fbf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.suo *.user *.sln.docstates +*.userprefs # Build results [Dd]ebug/ @@ -186,4 +187,4 @@ FakesAssemblies/ # LightSwitch generated files GeneratedArtifacts/ _Pvt_Extensions/ -ModelManifest.xml \ No newline at end of file +ModelManifest.xml diff --git a/BUILD_UNIX.md b/BUILD_UNIX.md new file mode 100644 index 0000000..021aa50 --- /dev/null +++ b/BUILD_UNIX.md @@ -0,0 +1,52 @@ +# Preparation +## Add mono repository [Mono Install Linux](http://www.mono-project.com/docs/getting-started/install/linux/). +* sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +* echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list +* sudo apt-get update + +## Install Minimal Mono +* sudo apt-get install mono-devel ca-certificates-mono + +## Install Complete Mono +* sudo apt-get install mono-complete + +## Install MonoDevelop (Optional) +* sudo apt-get install monodevelop + +# Build (without MonoDevelop) +Run *./build.sh command [execute]*. +Avaialbe Commands: +* debug + * builds debug version +* release + * builds release version +* releaseplgx + * builds release with PLGX plugin + * asks for version number before build + +In folder *build* you now see two subfolders: + +* bin: compiled output files +* dist: packages for distribution + +# Prepare new release +This projects follows [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/). +The *master* branch contains the latest released version. Each released version is tagged with a version tag: this tag follows [Semantic Versioning](http://semver.org/). Ongoing development takes place in *develop* branch. +When preparing for a new release the last steps before merging *develop* to *master* is to change the version informations (e.g. 0.1.0-alpha): + +* KeeAnywhere\Properties\AssemblyInfo.cs +* version_manifest.txt (change only for production releases) + +After merging *develop* to *master* change version in *develop* to **next** unstable version (e. g. 0.2.0-unstable) - just to make clear ths is a development snapshot and generally not released to public. + +# Version examples +Versions are always counted upwards. Each version is unique. +Additional informations like *alpha*, *beta* only describe the characteristics of the version. +Until version 1.0.0 the minor version will be increased. + +* 0.1.0-alpha: Alpha release for previewing or testing new features. Not for production use. +* 0.2.0-unstable: Current development snapshot. These versions will never be released to public. +* 0.2.0-beta: Beta releases are feature complete. Only bugfixing should take place before a new main release +* 1.0.0: production version + + diff --git a/KeeAnywhere.sln b/KeeAnywhere.sln index a2a88a6..bb7f3ff 100644 --- a/KeeAnywhere.sln +++ b/KeeAnywhere.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 +# Visual Studio 2012 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeeAnywhere", "KeeAnywhere\KeeAnywhere.csproj", "{8E40EDF5-06B8-4059-8B19-CB90D937FEBB}" @@ -15,12 +15,20 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU + ReleasePlgx|Any CPU = ReleasePlgx|Any CPU + ReleasePlgx - Linux|Any CPU = ReleasePlgx - Linux|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.Release|Any CPU.ActiveCfg = Release|Any CPU {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.Release|Any CPU.Build.0 = Release|Any CPU + {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.ReleasePlgx - Linux|Any CPU.ActiveCfg = ReleasePlgx - Linux|Any CPU + {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.ReleasePlgx - Linux|Any CPU.Build.0 = ReleasePlgx - Linux|Any CPU + {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.ReleasePlgx|Any CPU.ActiveCfg = ReleasePlgx|Any CPU + {8E40EDF5-06B8-4059-8B19-CB90D937FEBB}.ReleasePlgx|Any CPU.Build.0 = ReleasePlgx|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/KeeAnywhere/Databases/Sample.kdbx b/KeeAnywhere/Databases/Sample.kdbx new file mode 100644 index 0000000..af0361f Binary files /dev/null and b/KeeAnywhere/Databases/Sample.kdbx differ diff --git a/KeeAnywhere/KeeAnywhere.csproj b/KeeAnywhere/KeeAnywhere.csproj index 1d54015..8b56d0a 100644 --- a/KeeAnywhere/KeeAnywhere.csproj +++ b/KeeAnywhere/KeeAnywhere.csproj @@ -1,5 +1,5 @@  - + Debug @@ -24,6 +24,16 @@ prompt 4 false + + + + + + + + + + pdbonly @@ -33,93 +43,125 @@ prompt 4 false + + + + + + + + bin\ReleasePlgx\ + TRACE + True + none + AnyCPU + prompt + true + true + 4 + + + + + + + + none + true + bin\ReleasePlgx\ + TRACE + prompt + 4 + AnyCPU + true + + + + + + + true + + + OnBuildSuccess + + + + + + 2.25 + + + + - + + + + + + + + + + + + ..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll + + ..\packages\BouncyCastle.1.7.0\lib\Net40-Client\BouncyCastle.Crypto.dll - True - + ..\packages\CredentialManagement.1.0.2\lib\net35\CredentialManagement.dll - True - + ..\packages\Dropbox.Api.2.1.0\lib\portable-net45+sl50+win+wpa81+wp80\Dropbox.Api.dll - True - + ..\packages\Google.Apis.1.10.0\lib\net40\Google.Apis.dll - True - + ..\packages\Google.Apis.Auth.1.10.0\lib\net40\Google.Apis.Auth.dll - True - + ..\packages\Google.Apis.Auth.1.10.0\lib\net40\Google.Apis.Auth.PlatformServices.dll - True - + ..\packages\Google.Apis.Core.1.10.0\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Core.dll - True - + ..\packages\Google.Apis.Drive.v3.1.10.0.10\lib\portable-net40+sl50+win+wpa81+wp80\Google.Apis.Drive.v3.dll - True - + ..\packages\Google.Apis.1.10.0\lib\net40\Google.Apis.PlatformServices.dll - True - - False + ..\lib\KeePass.exe - + ..\packages\KoenZomers.OneDrive.Api.1.4.0.0\lib\KoenZomers.OneDrive.Api.dll - True - + ..\packages\log4net.2.0.5\lib\net45-full\log4net.dll - True - + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll - True - + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - True - + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - True - + ..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll - True - - - - - - - + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll - True - + ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll - True - - - - - - - ..\packages\Zlib.Portable.Signed.1.11.0\lib\portable-net4+sl5+wp8+win8+wpa81+MonoTouch+MonoAndroid\Zlib.Portable.dll - True @@ -243,11 +285,18 @@ Always + + + Always + + + Designer + Always + - Designer @@ -261,21 +310,19 @@ - - - - - - 2.31 - - - - - + + + + + + + + + @@ -284,14 +331,5 @@ - - - - - diff --git a/KeeAnywhere/KeePass.config.xml b/KeeAnywhere/KeePass.config.xml new file mode 100644 index 0000000..eb44827 --- /dev/null +++ b/KeeAnywhere/KeePass.config.xml @@ -0,0 +1,148 @@ + + + + false + true + + + + Databases/Sample.kdbx + Obf + NoSave + + + 12 + + + Databases/Sample.kdbx + Obf + NoSave + + + + + false + true + + + + + + + + + + 565 + 117 + 771 + 550 + 0.83333329999999994 + 0.250327647 + Default + + + + + + Title + 106 + + + UserName + 106 + + + Password + 106 + true + + + Url + 106 + + + Notes + 106 + + + 0 1 2 3 4 + + 0 + Descending + + + + + + + Microsoft Sans Serif + 8.25 + Point + + false + + + Courier New + 8.25 + Point + + false + + WinVistaBlack + + Microsoft Sans Serif + 8.25 + Point + + false + + 619, 331, 683, 419 + 0 + 0 + 0 + + + + 0 + 0 + + + + 0 + 0 + + + + + + CharSet + 20 + ULD_______ + + + CharSet + 20 + ULD_______ + + + + + 0 + + InvariantCultureIgnoreCase + + + + + 0 + 0 + 0 + 0 + + 1 + + + System + Auto + + diff --git a/KeeAnywhere/app.config b/KeeAnywhere/app.config index 0a757d7..78f39d8 100644 --- a/KeeAnywhere/app.config +++ b/KeeAnywhere/app.config @@ -14,6 +14,14 @@ + + + + + + + + diff --git a/NuGet.config b/NuGet.config index 3c6e9b7..c5c2a48 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,5 +2,6 @@ + - \ No newline at end of file + diff --git a/README.md b/README.md index 3cf509f..d6657ac 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Supported providers (in alphabetical order): # Building Run *build.cmd* and see output in folder *build*. For further details see [BUILD.md](BUILD.md). +Linux - Run *build.sh* and see output in folder *build*. For futher details see [BUILD_UNIX.md](BUILD_UNIX.md) # Contributing diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..60430e6 --- /dev/null +++ b/build.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# usage: build.sh command [execute] +# available commands: +# 1. debug builds debug version +# 2. release builds release version +# 3. releaseplgx builds packaged plgx plugin + +# determine build configuration +case $1 in + debug ) echo "Building Debug Version" + config="Debug" + ;; + release ) echo "Building Release Version" + config="Release" + ;; + releaseplgx ) echo "Building PLGX Plugin" + config="ReleasePlgx" + echo "Enter Version Number > " + read version + ;; + * ) exit 1 + ;; +esac + +# restore NuGet packages +mono nuget.exe restore -PackagesDirectory packages + +# clean and build plugin +xbuild /p:configuration=$config /t:Clean +xbuild /p:configuration=$config /t:Build + +# run KeePass for testing +if [ "$2" = "execute" ]; then + mono KeeAnywhere/bin/$config/KeePass.exe --debug -pw:sample KeeAnywhere/bin/$config/Databases/Sample.kdbx +fi + +# package plugin into zip file +if [ $config = "ReleasePlgx" ]; then + mkdir -p build/dist + cp -v KeeAnywhere/bin/$config/KeeAnywhere.plgx build/dist/KeeAnywhere-$version.plgx + cp -v KeeAnywhere/bin/$config/*.dll* build/dist/ + zip -j build/dist/KeeAnywhere-$version.zip build/dist/* +fi + +exit 0 diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..4974684 --- /dev/null +++ b/package.sh @@ -0,0 +1,7 @@ +#!/bin/bash +printf "Enter Version Number > " +read version +mkdir -p build/dist +cp -v KeeAnywhere/bin/ReleasePlgx/KeeAnywhere.plgx build/dist/KeeAnywhere-$version.plgx +cp -v KeeAnywhere/bin/ReleasePlgx/*.dll* build/dist/ +zip -j build/dist/KeeAnywhere-$version.zip build/dist/*