Anonymous status on Windows

This commit is contained in:
Jeffrey Morgan 2015-08-05 15:47:16 -07:00
parent a2ea658e57
commit bba4d91e58
3 changed files with 55 additions and 12 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;