updated linux build

This commit is contained in:
leetthewire 2021-08-04 10:08:00 -07:00
parent 26524dd93a
commit 9997fa8f3e
24 changed files with 3257 additions and 7 deletions

View file

@ -25,6 +25,8 @@ function appInstalled()
appInstalledUninstallerPath_x86 = installer.value("RootDir") + "Program Files (x86)/AmneziaVPN/maintenancetool.exe";
} else if (runningOnMacOS()){
appInstalledUninstallerPath = "/Applications/" + appName() + ".app/maintenancetool.app/Contents/MacOS/maintenancetool";
} else if (runningOnLinux()){
allInstalledUninstallerPath = "/opt/" + appName();
}
return installer.fileExists(appInstalledUninstallerPath) || installer.fileExists(appInstalledUninstallerPath_x86);
@ -45,6 +47,11 @@ function runningOnMacOS()
return (installer.value("os") === "mac");
}
function runningOnLinux()
{
return (installer.value("os") === "linux");
}
function sleep(miliseconds) {
var currentTime = new Date().getTime();
while (currentTime + miliseconds >= new Date().getTime()) {}

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>AmneziaVPN</Name>
<Version>1.6.0.0</Version>
<Title>AmneziaVPN</Title>
<Publisher>AmneziaVPN</Publisher>
<StartMenuDir>AmneziaVPN</StartMenuDir>
<TargetDir>@ApplicationsDir@/AmneziaVPN</TargetDir>
<WizardDefaultWidth>600</WizardDefaultWidth>
<WizardDefaultHeight>380</WizardDefaultHeight>
<WizardStyle>Modern</WizardStyle>
<RemoveTargetDir>true</RemoveTargetDir>
<AllowSpaceInPath>true</AllowSpaceInPath>
<AllowNonAsciiCharacters>false</AllowNonAsciiCharacters>
<ControlScript>controlscript.js</ControlScript>
<RepositorySettingsPageVisible>false</RepositorySettingsPageVisible>
<DependsOnLocalInstallerBinary>true</DependsOnLocalInstallerBinary>
<SupportsModify>false</SupportsModify>
<DisableAuthorizationFallback>true</DisableAuthorizationFallback>
<RemoteRepositories>
<Repository>
<Url>https://amneziavpn.org/updates/linux</Url>
<Enabled>true</Enabled>
<DisplayName>AmneziaVPN - repository for Linux</DisplayName>
</Repository>
</RemoteRepositories>
</Installer>

View file

@ -28,6 +28,11 @@ function runningOnMacOS()
return (systemInfo.kernelType === "darwin");
}
function runningOnLinux()
{
return (systemInfo.kernelType === "linux");
}
function vcRuntimeIsInstalled()
{
return (installer.findPath("msvcp140.dll", [installer.value("RootDir")+ "\\Windows\\System32\\"]).length !== 0)
@ -86,6 +91,8 @@ Component.prototype.createOperations = function()
} else if (runningOnMacOS()) {
component.addElevatedOperation("Execute", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "@TargetDir@/post_uninstall.sh");
} else if (runningOnLinux()) {
component.addElevatedOperation("Execute", "bash", "@TargetDir@/post_install.sh", "UNDOEXECUTE", "bash", "@TargetDir@/post_uninstall.sh");
}
}
@ -112,7 +119,9 @@ Component.prototype.installationFinished = function()
} else if (runningOnMacOS()) {
command = "/Applications/" + appName() + ".app/Contents/MacOS/" + appName();
}
} else if (runningOnLinux()) {
command = "@TargetDir@/client/" + appName();
}
installer.dropAdminRights()