mirror of https://github.com/docker/docs.git
Default Git and VirtualBox to off if they are already installed.
Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
parent
9921e762bf
commit
e6797d8b7e
|
|
@ -58,8 +58,8 @@ Name: modifypath; Description: "Add docker.exe & docker-machine.exe to &PATH"
|
||||||
Name: "Docker"; Description: "Docker Client for Windows" ; Types: full upgrade
|
Name: "Docker"; Description: "Docker Client for Windows" ; Types: full upgrade
|
||||||
Name: "DockerMachine"; Description: "Docker Machine for Windows" ; Types: full upgrade
|
Name: "DockerMachine"; Description: "Docker Machine for Windows" ; Types: full upgrade
|
||||||
Name: "Kitematic"; Description: "Kitematic for Windows (Alpha)" ; Types: full upgrade
|
Name: "Kitematic"; Description: "Kitematic for Windows (Alpha)" ; Types: full upgrade
|
||||||
Name: "VirtualBox"; Description: "VirtualBox"; Types: full
|
Name: "VirtualBox"; Description: "VirtualBox"; Types: full; Flags: disablenouninstallwarning
|
||||||
Name: "Git"; Description: "Git for Windows"; Types: full
|
Name: "Git"; Description: "Git for Windows"; Types: full; Flags: disablenouninstallwarning
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: ".\docker-quickstart-terminal.ico"; DestDir: "{app}"; Flags: ignoreversion
|
Source: ".\docker-quickstart-terminal.ico"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
|
@ -91,9 +91,6 @@ Type: filesandordirs; Name: "{localappdata}\..\Roaming\Kitematic"
|
||||||
#include "base64.iss"
|
#include "base64.iss"
|
||||||
#include "guid.iss"
|
#include "guid.iss"
|
||||||
|
|
||||||
const
|
|
||||||
UninstallKey = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#SetupSetting("AppId")}_is1';
|
|
||||||
|
|
||||||
var
|
var
|
||||||
restart: boolean;
|
restart: boolean;
|
||||||
TrackingDisabled: Boolean;
|
TrackingDisabled: Boolean;
|
||||||
|
|
@ -156,17 +153,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function IsUpgrade: Boolean;
|
|
||||||
var
|
|
||||||
Value: string;
|
|
||||||
begin
|
|
||||||
Result := (
|
|
||||||
RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Value)
|
|
||||||
or
|
|
||||||
RegQueryStringValue(HKCU, UninstallKey, 'UninstallString', Value)
|
|
||||||
) and (Value <> '');
|
|
||||||
end;
|
|
||||||
|
|
||||||
function NeedRestart(): Boolean;
|
function NeedRestart(): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := restart;
|
Result := restart;
|
||||||
|
|
@ -174,6 +160,7 @@ end;
|
||||||
|
|
||||||
function NeedToInstallVirtualBox(): Boolean;
|
function NeedToInstallVirtualBox(): Boolean;
|
||||||
begin
|
begin
|
||||||
|
// TODO: Also compare versions
|
||||||
Result := (
|
Result := (
|
||||||
(GetEnv('VBOX_INSTALL_PATH') = '')
|
(GetEnv('VBOX_INSTALL_PATH') = '')
|
||||||
and
|
and
|
||||||
|
|
@ -183,7 +170,8 @@ end;
|
||||||
|
|
||||||
function NeedToInstallGit(): Boolean;
|
function NeedToInstallGit(): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Git_is1');
|
// TODO: Find a better way to see if Git is installed
|
||||||
|
Result := not DirExists('C:\Program Files\Git') or not FileExists('C:\Program Files\Git\git-bash.exe')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure DocLinkClick(Sender: TObject);
|
procedure DocLinkClick(Sender: TObject);
|
||||||
|
|
@ -250,7 +238,9 @@ begin
|
||||||
#13#10 + \
|
#13#10 + \
|
||||||
#13#10 + \
|
#13#10 + \
|
||||||
'For further information, please see the {#MyAppName} installation documentation link.'
|
'For further information, please see the {#MyAppName} installation documentation link.'
|
||||||
;
|
|
||||||
|
Wizardform.ComponentsList.Checked[3] := NeedToInstallVirtualBox();
|
||||||
|
Wizardform.ComponentsList.Checked[4] := NeedToInstallGit();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function InitializeSetup(): boolean;
|
function InitializeSetup(): boolean;
|
||||||
|
|
@ -293,8 +283,6 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure CopyBoot2DockerISO();
|
procedure CopyBoot2DockerISO();
|
||||||
var
|
|
||||||
ResultCode: Integer;
|
|
||||||
begin
|
begin
|
||||||
WizardForm.FilenameLabel.Caption := 'copying boot2docker iso'
|
WizardForm.FilenameLabel.Caption := 'copying boot2docker iso'
|
||||||
if not ForceDirectories(ExpandConstant('{userdocs}\..\.docker\machine\cache')) then
|
if not ForceDirectories(ExpandConstant('{userdocs}\..\.docker\machine\cache')) then
|
||||||
|
|
@ -307,7 +295,7 @@ function MigrateVM() : Boolean;
|
||||||
var
|
var
|
||||||
ResultCode: Integer;
|
ResultCode: Integer;
|
||||||
begin
|
begin
|
||||||
if not FileExists('C:\Program Files\Git\bin\sh.exe') or not FileExists('C:\Program Files\Oracle\VirtualBox\VBoxManage.exe') or not FileExists(ExpandConstant('{app}\docker-machine.exe')) then begin
|
if NeedToInstallGit() or NeedToInstallVirtualBox() or not FileExists(ExpandConstant('{app}\docker-machine.exe')) then begin
|
||||||
Result := true
|
Result := true
|
||||||
exit
|
exit
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ if [ $VM_EXISTS_CODE -eq 1 ]; then
|
||||||
echo "Creating Machine $VM..."
|
echo "Creating Machine $VM..."
|
||||||
$DOCKER_MACHINE rm -f $VM &> /dev/null || :
|
$DOCKER_MACHINE rm -f $VM &> /dev/null || :
|
||||||
rm -rf ~/.docker/machine/machines/$VM
|
rm -rf ~/.docker/machine/machines/$VM
|
||||||
$DOCKER_MACHINE -D create -d virtualbox --virtualbox-memory 2048 $VM
|
$DOCKER_MACHINE create -d virtualbox --virtualbox-memory 2048 $VM
|
||||||
else
|
else
|
||||||
echo "Machine $VM already exists in VirtualBox."
|
echo "Machine $VM already exists in VirtualBox."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue