|
@@ -15,7 +15,8 @@
|
|
|
#define AppDataFolder "SyncTrayzor"
|
|
#define AppDataFolder "SyncTrayzor"
|
|
|
#define RunRegKey "Software\Microsoft\Windows\CurrentVersion\Run"
|
|
#define RunRegKey "Software\Microsoft\Windows\CurrentVersion\Run"
|
|
|
#define DotNetInstallerExe "dotNet451Setup.exe"
|
|
#define DotNetInstallerExe "dotNet451Setup.exe"
|
|
|
-#define DonateUrl = "https://synctrayzor.antonymale.co.uk/donate"
|
|
|
|
|
|
|
+#define DonateUrl "https://synctrayzor.antonymale.co.uk/donate"
|
|
|
|
|
+#define SurveyUrl "https://requestb.in/yueovtyu"
|
|
|
|
|
|
|
|
[Setup]
|
|
[Setup]
|
|
|
AppId={{#AppId}
|
|
AppId={{#AppId}
|
|
@@ -289,6 +290,47 @@ begin
|
|
|
UninstallNextButton.Caption := 'Uninstall';
|
|
UninstallNextButton.Caption := 'Uninstall';
|
|
|
// Make the "Uninstall" button break the ShowModal loop
|
|
// Make the "Uninstall" button break the ShowModal loop
|
|
|
UninstallNextButton.ModalResult := mrOK;
|
|
UninstallNextButton.ModalResult := mrOK;
|
|
|
|
|
+end;
|
|
|
|
|
+
|
|
|
|
|
+function SerializeBool(value: Boolean): String;
|
|
|
|
|
+begin
|
|
|
|
|
+ if value then
|
|
|
|
|
+ begin
|
|
|
|
|
+ Result := 'true';
|
|
|
|
|
+ end
|
|
|
|
|
+ else
|
|
|
|
|
+ begin
|
|
|
|
|
+ Result := 'false';
|
|
|
|
|
+ end
|
|
|
|
|
+end;
|
|
|
|
|
+
|
|
|
|
|
+function EscapeJsonString(value: String): String;
|
|
|
|
|
+var
|
|
|
|
|
+ c: Char;
|
|
|
|
|
+ i: Integer;
|
|
|
|
|
+begin
|
|
|
|
|
+ // http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_charlength
|
|
|
|
|
+ i := 1;
|
|
|
|
|
+ while i <= Length(value) do
|
|
|
|
|
+ begin
|
|
|
|
|
+ c := value[i];
|
|
|
|
|
+ if c = #10 then begin
|
|
|
|
|
+ Result := Result + '\n';
|
|
|
|
|
+ end else if c = #13 then begin
|
|
|
|
|
+ Result := Result + '\r';
|
|
|
|
|
+ end else if c = #9 then begin
|
|
|
|
|
+ Result := Result + '\t';
|
|
|
|
|
+ end else if Ord(c) < 32 then begin
|
|
|
|
|
+ Result := Result + Format('\x%.4x', [Ord(c)]);
|
|
|
|
|
+ end else if c = '"' then begin
|
|
|
|
|
+ Result := Result + '\"';
|
|
|
|
|
+ end else if c = '\' then begin
|
|
|
|
|
+ Result := Result + '\\'
|
|
|
|
|
+ end else begin
|
|
|
|
|
+ Result := Result + c;
|
|
|
|
|
+ end;
|
|
|
|
|
+ i := i + CharLength(value, i);
|
|
|
|
|
+ end;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
procedure InitializeUninstallProgressForm();
|
|
procedure InitializeUninstallProgressForm();
|
|
@@ -300,7 +342,8 @@ var
|
|
|
CancelButtonModalResult: Integer;
|
|
CancelButtonModalResult: Integer;
|
|
|
Checklist: TNewCheckListBox;
|
|
Checklist: TNewCheckListBox;
|
|
|
CommentsText: TNewStaticText;
|
|
CommentsText: TNewStaticText;
|
|
|
- CommentsBox: TNewMemo;
|
|
|
|
|
|
|
+ CommentsBox: TNewMemo;
|
|
|
|
|
+ WinHttpReq: Variant;
|
|
|
begin
|
|
begin
|
|
|
if not UninstallSilent then
|
|
if not UninstallSilent then
|
|
|
begin
|
|
begin
|
|
@@ -368,7 +411,20 @@ begin
|
|
|
CancelButtonModalResult := UninstallProgressForm.CancelButton.ModalResult;
|
|
CancelButtonModalResult := UninstallProgressForm.CancelButton.ModalResult;
|
|
|
UninstallProgressForm.CancelButton.ModalResult := mrCancel;
|
|
UninstallProgressForm.CancelButton.ModalResult := mrCancel;
|
|
|
|
|
|
|
|
- if UninstallProgressForm.ShowModal = mrCancel then Abort;
|
|
|
|
|
|
|
+ if UninstallProgressForm.ShowModal = mrCancel then Abort;
|
|
|
|
|
+
|
|
|
|
|
+ WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
|
|
|
|
|
+ WinHttpReq.Open('POST', '{#SurveyUrl}', false);
|
|
|
|
|
+ WinHttpReq.Send('{' +
|
|
|
|
|
+ ' "wontWork": '+ SerializeBool(Checklist.Checked[0]) +
|
|
|
|
|
+ ', "notWhatINeed": '+ SerializeBool(Checklist.Checked[1]) +
|
|
|
|
|
+ ', "preferResilio": '+ SerializeBool(Checklist.Checked[2]) +
|
|
|
|
|
+ ', "dontLikeSyncTrayzor": '+ SerializeBool(Checklist.Checked[3]) +
|
|
|
|
|
+ ', "other": '+ SerializeBool(Checklist.Checked[4]) +
|
|
|
|
|
+ ', "comments": "' + EscapeJsonString(CommentsBox.Text) + '"' +
|
|
|
|
|
+ ' }');
|
|
|
|
|
+
|
|
|
|
|
+ Abort;
|
|
|
|
|
|
|
|
// Restore the standard page payout
|
|
// Restore the standard page payout
|
|
|
UninstallProgressForm.CancelButton.Enabled := CancelButtonEnabled;
|
|
UninstallProgressForm.CancelButton.Enabled := CancelButtonEnabled;
|