mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-08-17 04:36:02 +00:00
set loopback device alias during build
instead of hardcode
This commit is contained in:
@@ -22,6 +22,8 @@ jobs:
|
||||
build-msi:
|
||||
name: Build .msi Installer
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LOOPBACK_ALIAS: 'cryptomator-vault'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
@@ -105,6 +107,16 @@ jobs:
|
||||
- name: Patch Application Directory
|
||||
run: |
|
||||
cp dist/win/contrib/* appdir/Cryptomator
|
||||
- name: Set LOOPBACK_ALIAS in patchWebDAV.bat
|
||||
shell: pwsh
|
||||
run: |
|
||||
$patchScript = "appdir\Cryptomator\patchWebDAV.bat"
|
||||
try {
|
||||
(Get-Content $patchScript ) -replace '::REPLACE ME', "SET LOOPBACK_ALIAS=`"${{ evn.LOOPBACK_ALIAS}}`"" | Set-Content $patchScript
|
||||
} catch {
|
||||
Write-Host "Failed to set LOOPBACK_ALIAS for patchWebDAV.bat"
|
||||
exit 1
|
||||
}
|
||||
- name: Fix permissions
|
||||
run: attrib -r appdir/Cryptomator/Cryptomator.exe
|
||||
shell: pwsh
|
||||
|
||||
Vendored
+9
@@ -105,6 +105,15 @@ if ($clean -and (Test-Path -Path $appPath)) {
|
||||
# patch app dir
|
||||
Copy-Item "contrib\*" -Destination "$AppName"
|
||||
attrib -r "$AppName\$AppName.exe"
|
||||
# patch batch script to set hostfile
|
||||
$webDAVPatcher = "$AppName\patchWebDAV.bat"
|
||||
$alias = 'cryptomator-vault'
|
||||
try {
|
||||
(Get-Content $webDAVPatcher ) -replace '::REPLACE ME', "SET LOOPBACK_ALIAS=`"$alias`"" | Set-Content $webDAVPatcher
|
||||
} catch {
|
||||
Write-Host "Failed to set LOOPBACK_ALIAS for patchWebDAV.bat"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# create .msi
|
||||
$Env:JP_WIXWIZARD_RESOURCES = "$buildDir\resources"
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
:: Default values for Cryptomator builds
|
||||
SET LOOPBACK_ALIAS="cryptomator-vault"
|
||||
::REPLACE ME
|
||||
|
||||
cd %~dp0
|
||||
powershell -NoLogo -NonInteractive -ExecutionPolicy Unrestricted -Command .\patchWebDAV.ps1^
|
||||
|
||||
Reference in New Issue
Block a user