mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-26 01:44:15 +00:00
improved windows WebDAV mounting
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.6 KiB |
@@ -12,12 +12,12 @@ AppPublisherURL=https://cryptomator.org/
|
|||||||
;AppSupportURL=http://java.com/
|
;AppSupportURL=http://java.com/
|
||||||
;AppUpdatesURL=http://java.com/
|
;AppUpdatesURL=http://java.com/
|
||||||
DefaultDirName=APPLICATION_INSTALL_ROOT\APPLICATION_NAME
|
DefaultDirName=APPLICATION_INSTALL_ROOT\APPLICATION_NAME
|
||||||
DisableStartupPrompt=No
|
DisableStartupPrompt=Yes
|
||||||
DisableDirPage=No
|
DisableDirPage=No
|
||||||
DisableProgramGroupPage=Yes
|
DisableProgramGroupPage=Yes
|
||||||
DisableReadyPage=Yes
|
DisableReadyPage=Yes
|
||||||
DisableFinishedPage=No
|
DisableFinishedPage=No
|
||||||
DisableWelcomePage=No
|
DisableWelcomePage=Yes
|
||||||
DefaultGroupName=APPLICATION_GROUP
|
DefaultGroupName=APPLICATION_GROUP
|
||||||
;Optional License
|
;Optional License
|
||||||
LicenseFile=APPLICATION_LICENSE_FILE
|
LicenseFile=APPLICATION_LICENSE_FILE
|
||||||
@@ -31,8 +31,8 @@ SetupIconFile=APPLICATION_NAME\APPLICATION_NAME.ico
|
|||||||
UninstallDisplayIcon={app}\APPLICATION_NAME.ico
|
UninstallDisplayIcon={app}\APPLICATION_NAME.ico
|
||||||
UninstallDisplayName=APPLICATION_NAME
|
UninstallDisplayName=APPLICATION_NAME
|
||||||
WizardImageStretch=No
|
WizardImageStretch=No
|
||||||
WizardSmallImageFile=APPLICATION_NAME-setup-icon.bmp
|
WizardSmallImageFile=Cryptomator-setup-icon.bmp
|
||||||
WizardImageBackColor=ffffff
|
WizardImageBackColor=$ffffff
|
||||||
ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
|
ArchitecturesInstallIn64BitMode=ARCHITECTURE_BIT_MODE
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
@@ -40,7 +40,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
;Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Internet Settings"; ValueType: dword; ValueName: "AutoDetect"; ValueData: "0"
|
;Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Internet Settings"; ValueType: dword; ValueName: "AutoDetect"; ValueData: "0"
|
||||||
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\WebClient\Parameters"; ValueType: dword; ValueName: "FileSizeLimitInBytes"; ValueData: "4294967295"
|
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Services\WebClient\Parameters"; ValueType: dword; ValueName: "FileSizeLimitInBytes"; ValueData: "$ffffffff"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "APPLICATION_NAME\APPLICATION_NAME.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "APPLICATION_NAME\APPLICATION_NAME.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
@@ -53,8 +53,8 @@ Name: "{commondesktop}\APPLICATION_NAME"; Filename: "{app}\APPLICATION_NAME.exe"
|
|||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,APPLICATION_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
|
Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,APPLICATION_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
|
||||||
Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-install -svcName ""APPLICATION_NAME"" -svcDesc ""APPLICATION_DESCRIPTION"" -mainExe ""APPLICATION_LAUNCHER_FILENAME"" START_ON_INSTALL RUN_AT_STARTUP"; Check: APPLICATION_SERVICE()
|
Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-install -svcName ""APPLICATION_NAME"" -svcDesc ""APPLICATION_DESCRIPTION"" -mainExe ""APPLICATION_LAUNCHER_FILENAME"" START_ON_INSTALL RUN_AT_STARTUP"; Check: APPLICATION_SERVICE()
|
||||||
Filename: "net"; Parameters: "stop webclient"; Description "Stopping WebClient.."; Flags: waituntilterminated postinstall runascurrentuser
|
Filename: "net"; Parameters: "stop webclient"; Description: "Stopping WebClient..."; Flags: waituntilterminated runhidden
|
||||||
Filename: "net"; Parameters: "start webclient"; Description "Restarting WebClient.."; Flags: postinstall runascurrentuser
|
Filename: "net"; Parameters: "start webclient"; Description: "Restarting WebClient..."; Flags: waituntilterminated runhidden
|
||||||
|
|
||||||
[UninstallRun]
|
[UninstallRun]
|
||||||
Filename: "{app}\RUN_FILENAME.exe "; Parameters: "-uninstall -svcName APPLICATION_NAME STOP_ON_UNINSTALL"; Check: APPLICATION_SERVICE()
|
Filename: "{app}\RUN_FILENAME.exe "; Parameters: "-uninstall -svcName APPLICATION_NAME STOP_ON_UNINSTALL"; Check: APPLICATION_SERVICE()
|
||||||
|
|||||||
@@ -38,9 +38,11 @@ final class WindowsWebDavMounter implements WebDavMounterStrategy {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void warmUp(int serverPort) {
|
public void warmUp(int serverPort) {
|
||||||
final URI warmUpUri = URI.create("http://0--1.ipv6-literal.net:" + serverPort + "/bill-gates-mom-uses-goto");
|
|
||||||
try {
|
try {
|
||||||
this.mount(warmUpUri, "WarmUpMount");
|
final Script proxyBypassCmd = fromLines("reg add \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\" /v \"ProxyOverride\" /d \"<local>;0--1.ipv6-literal.net\" /f");
|
||||||
|
proxyBypassCmd.execute();
|
||||||
|
final Script mountCmd = fromLines("net use * http://0--1.ipv6-literal.net:" + serverPort + "/bill-gates-mom-uses-goto /persistent:no");
|
||||||
|
mountCmd.execute();
|
||||||
} catch (CommandFailedException e) {
|
} catch (CommandFailedException e) {
|
||||||
// will most certainly throw an exception, because this is a fake WebDav path. But now windows has some DNS things cached :)
|
// will most certainly throw an exception, because this is a fake WebDav path. But now windows has some DNS things cached :)
|
||||||
}
|
}
|
||||||
@@ -53,6 +55,8 @@ final class WindowsWebDavMounter implements WebDavMounterStrategy {
|
|||||||
.addEnv("DAV_PATH", uri.getRawPath());
|
.addEnv("DAV_PATH", uri.getRawPath());
|
||||||
final CommandResult mountResult = mountScript.execute(30, TimeUnit.SECONDS);
|
final CommandResult mountResult = mountScript.execute(30, TimeUnit.SECONDS);
|
||||||
final String driveLetter = getDriveLetter(mountResult.getStdOut());
|
final String driveLetter = getDriveLetter(mountResult.getStdOut());
|
||||||
|
final Script openExplorerScript = fromLines("start explorer.exe " + driveLetter);
|
||||||
|
openExplorerScript.execute();
|
||||||
final Script unmountScript = fromLines("net use " + driveLetter + " /delete").addEnv("DRIVE_LETTER", driveLetter);
|
final Script unmountScript = fromLines("net use " + driveLetter + " /delete").addEnv("DRIVE_LETTER", driveLetter);
|
||||||
return new WebDavMount() {
|
return new WebDavMount() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user