mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-15 01:01:26 +00:00
Compare commits
4 Commits
develop
...
feature/wi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ded8a0f9b | ||
|
|
9136098c59 | ||
|
|
b0abe5d56c | ||
|
|
f7379e3179 |
15
.github/workflows/win-exe.yml
vendored
15
.github/workflows/win-exe.yml
vendored
@@ -60,6 +60,8 @@ env:
|
||||
VERSION_NUM: ${{ inputs.semVerNum || '99.99.99'}}
|
||||
REVISION_NUM: ${{ inputs.revisionNum || '0' }}
|
||||
VERSION_SUFFIX: ${{ inputs.semVerSuffix || ''}}
|
||||
OPENJDK_JMODS_AMD64: 'https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.2%2B10/OpenJDK25U-jmods_x64_windows_hotspot_25.0.2_10.zip'
|
||||
OPENJDK_JMODS_AMD64_HASH: 'a28a3c75911d8f5a02571e46a1859aec2e172a4829bf6e9a89715c882a853d77'
|
||||
OPENJFX_JMODS_AMD64: 'https://download2.gluonhq.com/openjfx/25.0.2/openjfx-25.0.2_windows-x64_bin-jmods.zip'
|
||||
OPENJFX_JMODS_AMD64_HASH: '33d878dfac85590c4d77c518ed413e512d34a8479d90132b230a7ddd173576b3'
|
||||
WINFSP_MSI: 'https://github.com/winfsp/winfsp/releases/download/v2.1/winfsp-2.1.25156.msi'
|
||||
@@ -82,8 +84,8 @@ jobs:
|
||||
include:
|
||||
- arch: x64
|
||||
os: windows-latest
|
||||
java-dist: 'zulu' #cannot use temurin, see https://github.com/cryptomator/cryptomator/issues/3824#issuecomment-2829827427
|
||||
java-version: '25.0.1+8'
|
||||
java-dist: 'temurin'
|
||||
java-version: '25.0.2+10.0.LTS'
|
||||
java-package: 'jdk'
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
@@ -223,8 +225,15 @@ jobs:
|
||||
- name: Extract wixhelper.dll for Codesigning #see https://github.com/cryptomator/cryptomator/issues/3130
|
||||
shell: pwsh
|
||||
run: |
|
||||
curl --silent --fail-with-body --proto "=https" -L "${{ env.OPENJDK_JMODS_AMD64 }}" --output openjdk-jmods.zip
|
||||
if(!(Get-FileHash -Path openjdk-jmods.zip -Algorithm SHA256).Hash.ToLower().equals("${{ env.OPENJDK_JMODS_AMD64_HASH }}")) {
|
||||
throw "Wrong checksum of JMOD archive downloaded from ${{ env.OPENJDK_JMODS_AMD64 }}.";
|
||||
}
|
||||
Expand-Archive -Path openjdk-jmods.zip -DestinationPath openjdk-jmods
|
||||
Get-ChildItem -Path openjdk-jmods -Recurse -Filter "*.jmod" | ForEach-Object { Move-Item -Path $_ -Destination $_.Directory.Parent}
|
||||
|
||||
New-Item -Path appdir/jpackage-jmod -ItemType Directory
|
||||
& $env:JAVA_HOME\bin\jmod.exe extract --dir jpackage-jmod "${env:JAVA_HOME}\jmods\jdk.jpackage.jmod"
|
||||
& $env:JAVA_HOME\bin\jmod.exe extract --dir jpackage-jmod "openjdk-jmods\jdk.jpackage.jmod"
|
||||
Get-ChildItem -Recurse -Path "jpackage-jmod" -File wixhelper.dll | Select-Object -Last 1 | Copy-Item -Destination "appdir"
|
||||
- name: Sign DLLs with Azure Trusted Signing
|
||||
if: inputs.sign || github.event_name == 'schedule'
|
||||
|
||||
5
dist/win/contrib/patchWebDAV.bat
vendored
5
dist/win/contrib/patchWebDAV.bat
vendored
@@ -4,18 +4,15 @@
|
||||
:: This file must be located in the INSTALLDIR
|
||||
|
||||
set "LOOPBACK_ALIAS=%1"
|
||||
set "ACTION=%2"
|
||||
if "%ACTION%"=="" set "ACTION=install"
|
||||
|
||||
:: Log for debugging
|
||||
echo LOOPBACK_ALIAS=%LOOPBACK_ALIAS%
|
||||
echo ACTION=%ACTION%
|
||||
|
||||
:: Change to INSTALLDIR
|
||||
cd %~dp0
|
||||
:: Execute the PowerShell script
|
||||
powershell -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -File .\patchWebDAV.ps1^
|
||||
-LoopbackAlias %LOOPBACK_ALIAS% -Action %ACTION%
|
||||
-LoopbackAlias %LOOPBACK_ALIAS%
|
||||
|
||||
:: Return the exit code from PowerShell
|
||||
exit /b %ERRORLEVEL%
|
||||
47
dist/win/contrib/patchWebDAV.ps1
vendored
47
dist/win/contrib/patchWebDAV.ps1
vendored
@@ -1,17 +1,15 @@
|
||||
#Requires -RunAsAdministrator
|
||||
Param(
|
||||
[Parameter(Mandatory, HelpMessage="Please provide an alias for 127.0.0.1")][string] $LoopbackAlias,
|
||||
[string] $Action = "install"
|
||||
[Parameter(Mandatory, HelpMessage="Please provide an alias for 127.0.0.1")][string] $LoopbackAlias
|
||||
)
|
||||
|
||||
New-Variable -Name "sysdir" -Value ([Environment]::SystemDirectory) -Option Constant -Scope Global
|
||||
New-Variable -Name "hostsFile" -Value "$sysdir\drivers\etc\hosts" -Option Constant -Scope Global
|
||||
|
||||
# Adds an alias for 127.0.0.1 to the hosts file
|
||||
function Add-AliasToHost {
|
||||
param (
|
||||
[string]$LoopbackAlias
|
||||
)
|
||||
$sysdir = [Environment]::SystemDirectory
|
||||
$hostsFile = "$sysdir\drivers\etc\hosts"
|
||||
$aliasLine = "127.0.0.1 $LoopbackAlias"
|
||||
|
||||
foreach ($line in Get-Content $hostsFile) {
|
||||
@@ -20,26 +18,9 @@ function Add-AliasToHost {
|
||||
}
|
||||
}
|
||||
|
||||
$content = Get-Content $hostsFile
|
||||
$content += "`r`n$aliasLine"
|
||||
|
||||
$content | Set-Content "$hostsFile.tmp" -Encoding ascii
|
||||
Move-Item "$hostsFile.tmp" $hostsFile -Force
|
||||
Add-Content -Path $hostsFile -Encoding ascii -Value "`r`n$aliasLine"
|
||||
}
|
||||
|
||||
# Removes an alias for 127.0.0.1 from the hosts file
|
||||
function Remove-AliasFromHost {
|
||||
param (
|
||||
[string]$LoopbackAlias
|
||||
)
|
||||
$aliasLine = "127.0.0.1 $LoopbackAlias"
|
||||
|
||||
$content = Get-Content $hostsFile
|
||||
$newContent = $content | Where-Object { $_ -ne $aliasLine }
|
||||
|
||||
$newContent | Set-Content "$hostsFile.tmp" -Encoding ascii
|
||||
Move-Item "$hostsFile.tmp" $hostsFile -Force
|
||||
}
|
||||
|
||||
# Sets in the registry the webclient file size limit to the maximum value
|
||||
function Set-WebDAVFileSizeLimit {
|
||||
@@ -73,20 +54,14 @@ function Edit-ProviderOrder {
|
||||
New-ItemProperty -Path $RegistryPath -Name $Name -Value $UpdatedOrder -PropertyType String -Force | Out-Null
|
||||
}
|
||||
|
||||
if ($Action -eq "install") {
|
||||
Add-AliasToHost $LoopbackAlias
|
||||
Write-Output 'Ensured alias exists in hosts file'
|
||||
|
||||
Set-WebDAVFileSizeLimit
|
||||
Write-Output 'Set WebDAV file size limit'
|
||||
Add-AliasToHost $LoopbackAlias
|
||||
Write-Output 'Ensured alias exists in hosts file'
|
||||
|
||||
Edit-ProviderOrder
|
||||
Write-Output 'Ensured correct provider order'
|
||||
} elseif ($Action -eq "uninstall") {
|
||||
Remove-AliasFromHost $LoopbackAlias
|
||||
Write-Output 'Ensured alias removed from hosts file'
|
||||
} else {
|
||||
Write-Error "Invalid action: $Action. Only 'install' or 'uninstall' are valid."
|
||||
}
|
||||
Set-WebDAVFileSizeLimit
|
||||
Write-Output 'Set WebDAV file size limit'
|
||||
|
||||
Edit-ProviderOrder
|
||||
Write-Output 'Ensured correct provider order'
|
||||
|
||||
exit 0
|
||||
|
||||
11
dist/win/resources/main.wxs
vendored
11
dist/win/resources/main.wxs
vendored
@@ -158,13 +158,9 @@
|
||||
<ns0:CustomAction Id="DisableUserConfig" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>
|
||||
|
||||
<!-- WebDAV patches -->
|
||||
<ns0:SetProperty Id="PatchWebDAV" Value=""[INSTALLDIR]patchWebDAV.bat" "$(var.LoopbackAlias)" install" Sequence="execute" Before="PatchWebDAV" />
|
||||
<ns0:SetProperty Id="PatchWebDAV" Value=""[INSTALLDIR]patchWebDAV.bat" "$(var.LoopbackAlias)"" Sequence="execute" Before="PatchWebDAV" />
|
||||
<ns0:CustomAction Id="PatchWebDAV" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>
|
||||
|
||||
<!-- WebDAV patches (Uninstall) -->
|
||||
<ns0:SetProperty Id="PatchWebDAVUninstall" Value=""[INSTALLDIR]patchWebDAV.bat" "$(var.LoopbackAlias)" uninstall" Sequence="execute" Before="PatchWebDAVUninstall" />
|
||||
<ns0:CustomAction Id="PatchWebDAVUninstall" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixQuietExec" Execute="deferred" Return="ignore" Impersonate="no"/>
|
||||
|
||||
<!-- Update check configuration -->
|
||||
<ns0:SetProperty Id="PatchUpdateCheck" Value=""[INSTALLDIR]patchUpdateCheck.bat" "[DISABLEUPDATECHECK]"" Sequence="execute" Before="PatchUpdateCheck" />
|
||||
<ns0:CustomAction Id="PatchUpdateCheck" BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)" DllEntry="WixQuietExec64" Execute="deferred" Return="ignore" Impersonate="no"/>
|
||||
@@ -218,8 +214,9 @@
|
||||
|
||||
<ns0:RemoveExistingProducts After="InstallValidate"/> <!-- Moved from CostInitialize, due to Wix4CloseApplications_* -->
|
||||
<ns0:Custom Action="DisableUserConfig" After="InstallFiles" Condition="NOT (Installed AND (NOT REINSTALL) AND (NOT UPGRADINGPRODUCTCODE) AND REMOVE)"/>
|
||||
<!-- Skip action on uninstall -->
|
||||
<!-- TODO: don't skip action, but remove cryptomator alias from hosts file -->
|
||||
<ns0:Custom Action="PatchWebDAV" After="DisableUserConfig" Condition="NOT (Installed AND (NOT REINSTALL) AND (NOT UPGRADINGPRODUCTCODE) AND REMOVE)"/>
|
||||
<ns0:Custom Action="PatchWebDAVUninstall" Before="RemoveFiles" Condition="Installed AND (NOT REINSTALL) AND (NOT UPGRADINGPRODUCTCODE) AND REMOVE" />
|
||||
<!-- Configure update check setting if property is provided -->
|
||||
<ns0:Custom Action="PatchUpdateCheck" After="PatchWebDAV" Condition="DISABLEUPDATECHECK AND NOT (Installed AND (NOT REINSTALL) AND (NOT UPGRADINGPRODUCTCODE) AND REMOVE)"/>
|
||||
</ns0:InstallExecuteSequence>
|
||||
@@ -231,4 +228,4 @@
|
||||
<ns0:WixVariable Id="WixUIBannerBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\banner.bmp" />
|
||||
<ns0:WixVariable Id="WixUIDialogBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\background.bmp" />
|
||||
</ns0:Package>
|
||||
</ns0:Wix>
|
||||
</ns0:Wix>
|
||||
|
||||
Reference in New Issue
Block a user