Skip to content

Commit 65093b3

Browse files
committed
Merge branch 'release/1.4.0'
2 parents 8f94097 + 282ed70 commit 65093b3

File tree

62 files changed

+1675
-402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1675
-402
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
build:
1313
name: Build and Test
1414
runs-on: windows-latest
15-
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
1615
steps:
1716
- uses: actions/checkout@v4
1817
- uses: actions/setup-java@v4
@@ -26,7 +25,7 @@ jobs:
2625
run: mvn -B versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/}
2726
- name: Build and Test
2827
id: buildAndTest
29-
run: mvn -B clean test
28+
run: mvn -B clean test -DdevCommandFileDir="${{ vars.MSVC_DEV_FILES_DIR }}"
3029
- name: Codesign DLL on release
3130
if: startsWith(github.ref, 'refs/tags/')
3231
uses: skymatic/code-sign-action@v3

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ defaults:
1313
run:
1414
shell: bash
1515

16+
env:
17+
MSVC_DEV_FILES_DIR: ${{ vars.MSVC_DEV_FILES_DIR ||'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\' }}
18+
1619
jobs:
1720
analyse:
1821
name: Analyse
@@ -32,6 +35,6 @@ jobs:
3235
with:
3336
languages: java
3437
- name: Build
35-
run: mvn -B compile
38+
run: mvn -B compile -DdevCommandFileDir="${{ env.MSVC_DEV_FILES_DIR }}"
3639
- name: Perform CodeQL Analysis
3740
uses: github/codeql-action/analyze@v3

.github/workflows/publish-central.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Enforce project version ${{ github.event.inputs.tag }}
3030
run: mvn versions:set -B -DnewVersion="${{ github.event.inputs.tag }}"
3131
- name: Deploy
32-
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress
32+
run: mvn deploy -B -DskipTests -Psign,deploy-central --no-transfer-progress -DdevCommandFileDir="${{ vars.MSVC_DEV_FILES_DIR }}"
3333
env:
3434
MAVEN_OPTS: >
3535
--add-opens=java.base/java.util=ALL-UNNAMED

.github/workflows/publish-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Enforce project version ${{ github.event.release.tag_name }}
2222
run: mvn versions:set -B -DnewVersion="${{ github.event.release.tag_name }}"
2323
- name: Deploy
24-
run: mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress
24+
run: mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress -DdevCommandFileDir="${{ vars.MSVC_DEV_FILES_DIR }}"
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}

.gitignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
*.class
22
*.jar
33
*.dll
4+
*.obj
5+
*.lib
6+
*.exp
47

58
# Maven #
69
target/
@@ -16,3 +19,73 @@ pom.xml.versionsBackup
1619
.idea/compiler.xml
1720
.idea/jarRepositories.xml
1821
*.iml
22+
23+
## Ignore Visual Studio temporary files, build results, and
24+
## files generated by popular Visual Studio add-ons.
25+
##
26+
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
27+
28+
# User-specific files
29+
*.rsuser
30+
*.suo
31+
*.user
32+
*.userosscache
33+
*.sln.docstates
34+
35+
# User-specific files (MonoDevelop/Xamarin Studio)
36+
*.userprefs
37+
38+
# Build results
39+
[Dd]ebug/
40+
[Dd]ebugPublic/
41+
[Rr]elease/
42+
[Rr]eleases/
43+
x64/
44+
x86/
45+
[Ww][Ii][Nn]32/
46+
[Aa][Rr][Mm]/
47+
[Aa][Rr][Mm]64/
48+
bld/
49+
[Bb]in/
50+
[Oo]bj/
51+
[Ll]og/
52+
[Ll]ogs/
53+
54+
# Visual Studio 2015/2017 cache/options directory
55+
.vs/
56+
57+
# Files built by Visual Studio
58+
*_i.c
59+
*_p.c
60+
*_h.h
61+
*.ilk
62+
*.meta
63+
*.obj
64+
*.iobj
65+
*.pch
66+
*.pdb
67+
*.ipdb
68+
*.pgc
69+
*.pgd
70+
*.rsp
71+
# but not Directory.Build.rsp, as it configures directory-level build defaults
72+
!Directory.Build.rsp
73+
*.sbr
74+
*.tlb
75+
*.tli
76+
*.tlh
77+
*.tmp
78+
*.tmp_proj
79+
*_wpftmp.csproj
80+
*.log
81+
*.tlog
82+
*.vspscc
83+
*.vssscc
84+
.builds
85+
*.pidb
86+
*.svclog
87+
*.scc
88+
89+
# exclude compile outputs not used by projects
90+
*.exp
91+
*.lib

.idea/codeStyles/Project.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
HEADERS := -I"src/main/headers" -I"${JAVA_HOME}\include" -I"${JAVA_HOME}\include\win32"
1+
# Note: make apparently thinks, that options specified with "/" are absolute paths and resolves them. see also https://stackoverflow.com/questions/17012419/d9024-make-unrecognized-source-file-type
2+
WIN_SDK_VERSION ?= 10.0.22621.0
3+
MSVC_VERSION ?= 14.41.34120
4+
HEADERS := -I"src\main\headers" \
5+
-I"${JAVA_HOME}\include" \
6+
-I"${JAVA_HOME}\include\win32" \
7+
-I"C:\Program Files (x86)\Windows Kits\10\Include\$(WIN_SDK_VERSION)\cppwinrt"
28
SOURCES := $(wildcard src/main/native/*.cpp)
39

410
########
511

612
all: install
713

814
install:
9-
g++ -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at $(HEADERS) -shared -osrc/main/resources/integrations.dll $(SOURCES) -lcrypt32 -lshell32 -lole32 -luuid
15+
cl -EHsc -std:c++17 -LD -W4 -guard:cf \
16+
-Fe"src/main/resources/integrations.dll" \
17+
-Fo"target/" \
18+
$(HEADERS) $(SOURCES) \
19+
-link -NXCOMPAT -DYNAMICBASE \
20+
-implib:target/integrations.lib \
21+
crypt32.lib shell32.lib ole32.lib uuid.lib user32.lib Advapi32.lib windowsapp.lib

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ Windows-specific implementations of [integrations-api](https://github.com/crypto
66

77
This project uses the following JVM properties:
88
* `cryptomator.integrationsWin.autoStartShellLinkName` - Name of the shell link, which is placed in the Windows startup folder to start application on user login
9+
* `cryptomator.integrationsWin.windowsHelloKeyId` - Identifier for the Windows Hello keypair
10+
* `cryptomator.integrationsWin.windowsHelloKeychainPaths` - Locations of the file-based windowsHello keychain
911
* `cryptomator.integrationsWin.keychainPaths` - List of file paths, which are checked for data encrypted with the Windows data protection api
1012

1113
## Building
1214

13-
This project uses JNI, hence you'll nedd Java as well as GCC build tools:
15+
### Requirements
1416

1517
* JDK 22
1618
* Maven
17-
* MinGW GCC compiler (`choco install mingw --version=10.2.0`)
18-
* Make (`choco install make`)
19+
* MSVC 2022 toolset (e.g. by installing Visual Studio 2022, Workset "Desktop development with C++")
20+
* Make (`choco install make`)
21+
22+
### Build
23+
Open a terminal and run
24+
```
25+
mvn clean verify
26+
```
27+
28+
If building the dll fails with "cl.exe cannot be found", you have to specify the developer command file directory as a property, e.g. `-DdevCommandFileDir=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\"`.

integrations-win.sln

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35327.3
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "integrations-win", "integrations-win.vcxproj", "{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Debug|x64.ActiveCfg = Debug|x64
17+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Debug|x64.Build.0 = Debug|x64
18+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Debug|x86.ActiveCfg = Debug|Win32
19+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Debug|x86.Build.0 = Debug|Win32
20+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Release|x64.ActiveCfg = Release|x64
21+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Release|x64.Build.0 = Release|x64
22+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Release|x86.ActiveCfg = Release|Win32
23+
{CF96ACE0-9471-4BD6-AD0E-BE32AF14C358}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
GlobalSection(ExtensibilityGlobals) = postSolution
29+
SolutionGuid = {DCEB853F-9857-4F7D-A508-A7390F37BC50}
30+
EndGlobalSection
31+
EndGlobal

integrations-win.vcxproj

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>17.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{cf96ace0-9471-4bd6-ad0e-be32af14c358}</ProjectGuid>
25+
<RootNamespace>integrationswin</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>DynamicLibrary</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v143</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>DynamicLibrary</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>DynamicLibrary</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
74+
<IncludePath>$(ProjectDir)src\main\headers;$(JAVA_HOME)include;$(JAVA_HOME)include\win32;$(IncludePath)</IncludePath>
75+
<IntDir>$(SolutionDir)target\native\$(Platform)\$(Configuration)\</IntDir>
76+
<TargetName>integrations</TargetName>
77+
</PropertyGroup>
78+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
79+
<ClCompile>
80+
<WarningLevel>Level3</WarningLevel>
81+
<SDLCheck>true</SDLCheck>
82+
<PreprocessorDefinitions>_DEBUG;INTEGRATIONSWIN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
83+
<ConformanceMode>true</ConformanceMode>
84+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
85+
<PrecompiledHeaderFile>
86+
</PrecompiledHeaderFile>
87+
<LanguageStandard>stdcpp17</LanguageStandard>
88+
</ClCompile>
89+
<Link>
90+
<SubSystem>Windows</SubSystem>
91+
<GenerateDebugInformation>true</GenerateDebugInformation>
92+
<EnableUAC>false</EnableUAC>
93+
<ForceSymbolReferences>%(ForceSymbolReferences)</ForceSymbolReferences>
94+
<AdditionalDependencies>crypt32.lib;shell32.lib;ole32.lib;uuid.lib;user32.lib;windowsapp.lib</AdditionalDependencies>
95+
</Link>
96+
</ItemDefinitionGroup>
97+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
98+
<ClCompile>
99+
<WarningLevel>Level3</WarningLevel>
100+
<FunctionLevelLinking>true</FunctionLevelLinking>
101+
<IntrinsicFunctions>true</IntrinsicFunctions>
102+
<SDLCheck>true</SDLCheck>
103+
<PreprocessorDefinitions>NDEBUG;INTEGRATIONSWIN_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
104+
<ConformanceMode>true</ConformanceMode>
105+
<PrecompiledHeader>Use</PrecompiledHeader>
106+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
107+
</ClCompile>
108+
<Link>
109+
<SubSystem>Windows</SubSystem>
110+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
111+
<OptimizeReferences>true</OptimizeReferences>
112+
<GenerateDebugInformation>true</GenerateDebugInformation>
113+
<EnableUAC>false</EnableUAC>
114+
</Link>
115+
</ItemDefinitionGroup>
116+
<ItemGroup>
117+
<ClInclude Include="src\main\headers\org_cryptomator_windows_autostart_WinShellLinks_Native.h" />
118+
<ClInclude Include="src\main\headers\org_cryptomator_windows_keychain_WinDataProtection_Native.h" />
119+
<ClInclude Include="src\main\headers\org_cryptomator_windows_keychain_WindowsHello_Native.h" />
120+
<ClInclude Include="src\main\headers\org_cryptomator_windows_uiappearance_WinAppearance_Native.h" />
121+
<ClInclude Include="src\main\resources\ktmw32_helper.h" />
122+
</ItemGroup>
123+
<ItemGroup>
124+
<ClCompile Include="src\main\native\org_cryptomator_windows_autostart_WinShellLinks_Native.cpp" />
125+
<ClCompile Include="src\main\native\org_cryptomator_windows_keychain_WinDataProtection_Native.cpp" />
126+
<ClCompile Include="src\main\native\org_cryptomator_windows_keychain_WindowsHello_Native.cpp" />
127+
<ClCompile Include="src\main\native\org_cryptomator_windows_uiappearnce_WinAppearance_Native.cpp" />
128+
</ItemGroup>
129+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
130+
<ImportGroup Label="ExtensionTargets">
131+
</ImportGroup>
132+
</Project>

0 commit comments

Comments
 (0)