diff --git a/windows/Toolbox.iss b/windows/Toolbox.iss index 4ec51c7d78..d43c6363ca 100644 --- a/windows/Toolbox.iss +++ b/windows/Toolbox.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Docker Toolbox" -#define MyAppVersion "1.8.0-rc4" +#define MyAppVersion "1.8.0-rc5" #define MyAppPublisher "Docker" #define MyAppURL "https://docker.com" #define MyAppContact "https://docs.docker.com" @@ -19,6 +19,16 @@ #define virtualBoxCommon ".\bundle\VirtualBox\common.cab" #define virtualBoxMsi ".\bundle\VirtualBox\VirtualBox_amd64.msi" +#define EventStartedFile FileOpen(".\bundle\started.txt") +#define EventStartedData = FileRead(EventStartedFile) +#expr FileClose(EventStartedFile) +#undef EventStartedFile + +#define EventFinishedFile FileOpen(".\bundle\finished.txt") +#define EventFinishedData = FileRead(EventFinishedFile) +#expr FileClose(EventFinishedFile) +#undef EventFinishedFile + [Setup] ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. @@ -181,6 +191,21 @@ begin DockerInstallDocs.OnClick := @DocLinkClick; end; +function InitializeSetup(): boolean; +var + ResultCode: integer; + WinHttpReq: Variant; +begin + + WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1'); + WinHttpReq.Open('POST', 'https://api.mixpanel.com/track/?data={#EventStartedData}', false); + WinHttpReq.SetRequestHeader('Content-Type', 'application/json'); + WinHttpReq.Send(''); + // Proceed Setup + Result := True; + +end; + procedure CurPageChanged(CurPageID: Integer); begin DockerInstallDocs.Visible := True; @@ -295,3 +320,20 @@ begin Result[0] := ExpandConstant('{app}'); end; #include "modpath.iss" + +procedure CurStepChanged(CurStep: TSetupStep); +var + taskname: String; + WinHttpReq: Variant; +begin + taskname := ModPathName; + if CurStep = ssPostInstall then + begin + WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1'); + WinHttpReq.Open('POST', 'https://api.mixpanel.com/track/?data={#EventFinishedData}', false); + WinHttpReq.SetRequestHeader('Content-Type', 'application/json'); + WinHttpReq.Send(''); + if IsTaskSelected(taskname) then + ModPath(); + end +end; \ No newline at end of file diff --git a/windows/bundle.sh b/windows/bundle.sh index 0c7bbcb3ce..d6f90503d4 100644 --- a/windows/bundle.sh +++ b/windows/bundle.sh @@ -11,6 +11,8 @@ kitematic=0.8.0-rc4 vbox=5.0.0 vboxRev=101573 msysGit=1.9.5-preview20150319 +installer=1.8.0-rc5 +mixpanel=c306ae65c33d7d09fe3e546f36493a6e boot2dockerIsoSrc=tianon dockerBucket=test.docker.com @@ -20,6 +22,16 @@ rm -rf bundle mkdir bundle cd bundle +echo "{\"event\":\"Installer Started\",\"properties\":{\"token\":\"$mixpanel\",\"version\":\"$installer\",\"os\":\"win32\"}}" > out.txt +certutil -encode out.txt started-cert.txt +cat started-cert.txt | sed '/^-----/ d' | tr -d '\n' > started.txt +rm started-cert.txt + +echo "{\"event\":\"Installer Finished\",\"properties\":{\"token\":\"$mixpanel\",\"version\":\"$installer\",\"os\":\"win32\"}}" > out.txt +certutil -encode out.txt finished-cert.txt +cat finished-cert.txt | sed '/^-----/ d' | tr -d '\n' > finished.txt +rm finished-cert.txt + ( mkdir -p docker cd docker diff --git a/windows/modpath.iss b/windows/modpath.iss index 7110a313c7..04f9e1f4c6 100644 --- a/windows/modpath.iss +++ b/windows/modpath.iss @@ -163,17 +163,6 @@ begin until Length(Text)=0; end; - -procedure CurStepChanged(CurStep: TSetupStep); -var - taskname: String; -begin - taskname := ModPathName; - if CurStep = ssPostInstall then - if IsTaskSelected(taskname) then - ModPath(); -end; - procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var aSelectedTasks: TArrayOfString;