Skip to content

Commit

Permalink
Add support for compiling to .plgx
Browse files Browse the repository at this point in the history
  • Loading branch information
diimdeep committed Sep 19, 2014
1 parent e6fa997 commit 005c3ff
Show file tree
Hide file tree
Showing 46 changed files with 63 additions and 58,011 deletions.
Binary file added 1P2KeePass.plgx
Binary file not shown.
14 changes: 6 additions & 8 deletions 1P2KeePass.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,27 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Loader", "Loader\Loader.csproj", "{71DF5115-6A74-4C18-B2E0-2A776AB7ED0E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9080E7AB-9284-4B68-B152-0078EA9FEEE4}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginSrc", "PluginSrc\PluginSrc.csproj", "{EFDFFE96-70CC-4991-8109-D14CCC68DAEA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PackagePLGX", "PackagePLGX\PackagePLGX.csproj", "{8C3701C9-69B4-45E4-AAB1-3C6370FCFCB9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "1P2KeePass", "1P2KeePass\1P2KeePass.csproj", "{EFDFFE96-70CC-4991-8109-D14CCC68DAEA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{71DF5115-6A74-4C18-B2E0-2A776AB7ED0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71DF5115-6A74-4C18-B2E0-2A776AB7ED0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71DF5115-6A74-4C18-B2E0-2A776AB7ED0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71DF5115-6A74-4C18-B2E0-2A776AB7ED0E}.Release|Any CPU.Build.0 = Release|Any CPU
{8C3701C9-69B4-45E4-AAB1-3C6370FCFCB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C3701C9-69B4-45E4-AAB1-3C6370FCFCB9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C3701C9-69B4-45E4-AAB1-3C6370FCFCB9}.Release|Any CPU.Build.0 = Release|Any CPU
{EFDFFE96-70CC-4991-8109-D14CCC68DAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFDFFE96-70CC-4991-8109-D14CCC68DAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFDFFE96-70CC-4991-8109-D14CCC68DAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFDFFE96-70CC-4991-8109-D14CCC68DAEA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
16 changes: 8 additions & 8 deletions PluginSrc/PluginSrc.csproj → 1P2KeePass/1P2KeePass.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\KeePassDistribution\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
Expand All @@ -26,19 +26,20 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<Optimize>false</Optimize>
<OutputPath>..\KeePassDistribution\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeePass">
<HintPath>..\..\..\..\..\OProjects\KeePass-2.25-Source\Build\KeePass\Debug\KeePass.exe</HintPath>
<Reference Include="KeePass, Version=2.27.0.15507, Culture=neutral, PublicKeyToken=fed2ed7716aecf5c, processorArchitecture=MSIL">
<HintPath>..\KeePassDistribution\KeePass.exe</HintPath>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net20\Newtonsoft.Json.dll</HintPath>
<HintPath>.\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
Expand Down Expand Up @@ -74,7 +75,6 @@
</ItemGroup>
<ItemGroup>
<None Include="1P4 Mac icon.png" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
8 changes: 8 additions & 0 deletions 1P2KeePass/1P2KeePass.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>Y:\Projects\Plugin.1P2KeePass\KeePassDistribution\KeePass.exe</StartProgram>
<StartWorkingDirectory>Y:\Projects\Plugin.1P2KeePass\KeePassDistribution\</StartWorkingDirectory>
</PropertyGroup>
</Project>
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
[assembly: AssemblyDescription("Plugin for KeePass to import from 1Passoword Interchange Format (1pif).")]
[assembly: AssemblyCompany("Dmitry Wolf (dmitrywolf.com)")]
[assembly: AssemblyProduct("KeePass Plugin")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.1.1.0")]
[assembly: AssemblyFileVersion("0.1.1.0")]
[assembly: Guid("5cd2a2f1-1e80-4bb6-85f0-03ee84fbdfe1")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 18 additions & 14 deletions Loader/Loader.csproj → PackagePLGX/PackagePLGX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,46 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{71DF5115-6A74-4C18-B2E0-2A776AB7ED0E}</ProjectGuid>
<ProjectGuid>{8C3701C9-69B4-45E4-AAB1-3C6370FCFCB9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Loader</RootNamespace>
<AssemblyName>Loader</AssemblyName>
<RootNamespace>PackagePLGX</RootNamespace>
<AssemblyName>PackagePLGX</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\KeePassDistribution\</OutputPath>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>.bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PluginSrc\PluginSrc.csproj">
<Project>{efdffe96-70cc-4991-8109-d14ccc68daea}</Project>
<Name>PluginSrc</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>DEL /S /Q $(SolutionDir)1P2KeePass\obj
$(SolutionDir)KeePassDistribution\KeePass.exe --plgx-create $(SolutionDir)1P2KeePass</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
Binary file removed PluginSrc/bin/Release/_1Password2KeePass.dll
Binary file not shown.
4 changes: 0 additions & 4 deletions PluginSrc/packages.config

This file was deleted.

35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
Plugin for KeePass 2.x to import from 1Password Interchange Format (1pif).

Tested with 1Password 4.1.2 and KeePass 2.25
Tested with 1Password 4.1.2 and KeePass 2.27.

Download binary [here](https://github.com/diimdeep/1P2KeePass/releases)

#### Structure

**PluginSrc** project is core of plugin, produces plugin .dll.
**Loader** project is for debugging. It is coping plugin .dll to KeePassDistribution\ where KeePass.exe should be located.
This project should be StartUp project to start KeePass and attach debugger.
In this project Properties on tab Debug you will need to change program path and working directory path to absolute paths on you machine to 1P2KeePass\KeePassDistribution\ and 1P2KeePass\KeePassDistribution\KeePass.exe
### Structure

**1P2KeePass\** project is plugin source code and dependenices.
**PackagePLGX\** project is for compiling plugin to .plgx for distribution.

To debug plugin use Debug configuration. Only PluginSrc project will build, and copy necessary artifacts to \KeePassDistribution folder.
Hit Start Debugging(F5) to start \KeePassDistribution\KeePass.exe with attached debugger.
In project Properties -> Debug you will need to change 'Start external program' path and 'Working directory' path to absolute paths on you machine to \KeePassDistribution\KeePass.exe and \KeePassDistribution

To package plugin for distribution switch to Release configuration and rebuild solution or manually rebuild PackagePLGX project. (look in Post-build event)
You will find 1P2KeePass.plgx in root directory.

**TestData** folder contains .1pif and .kdbx (password: test) for testing.
**KeePassDistribution** is where KeePass portable lives.

Read [KeePass Plugin Development](http://keepass.info/help/v2_dev/plg_index.html) for more info.

#### Dependencies
### Dependencies

- Newtonsoft.Json
- VS 2013

#### TODO
### TODO

- [ ] Support more types of records
- [ ] Plugin Icon
- [ ] Update Checking

#### Status
### Status


| Record type | What is it ? | Parsing | Importing |
Expand All @@ -39,8 +50,4 @@ In this project Properties on tab Debug you will need to change program path and
| Records | What is it ? | Parsing | Importing |
| --------- | ----------------- | ------- | --------- |
| Trashed | Records in trash | Done | Done |
| Favorited | Favorited records | | |



[KeePass Plugin Development](http://keepass.info/help/v2_dev/plg_index.html)
| Favorited | Favorited records | | |
Binary file not shown.
18 changes: 0 additions & 18 deletions packages/Newtonsoft.Json.6.0.1/Newtonsoft.Json.6.0.1.nuspec

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 005c3ff

Please sign in to comment.