add donate button in the installer

This commit is contained in:
bancika
2017-05-05 11:32:12 +02:00
parent d62221b796
commit 0a7e5c7dc7
6 changed files with 30 additions and 2 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

+30 -2
View File
@@ -9,6 +9,7 @@ SolidCompression=yes
OutputDir=build OutputDir=build
OutputBaseFilename=diylc OutputBaseFilename=diylc
ChangesAssociations=yes ChangesAssociations=yes
AlwaysShowDirOnReadyPage=yes
[Files] [Files]
Source: "diylc.exe"; DestDir: "{app}" Source: "diylc.exe"; DestDir: "{app}"
@@ -19,9 +20,9 @@ Source: "diylc.ico"; DestDir: "{app}"
Source: "build\jar\diylc.jar"; DestDir: "{app}" Source: "build\jar\diylc.jar"; DestDir: "{app}"
Source: "build\jar\lib\*"; DestDir: "{app}\lib" Source: "build\jar\lib\*"; DestDir: "{app}\lib"
Source: "build\jar\library\*"; DestDir: "{app}\library" Source: "build\jar\library\*"; DestDir: "{app}\library"
Source: "innosetup\donate.bmp"; DestDir: "{tmp}"; Flags: dontcopy nocompression
[Registry] [Registry]
Root: HKCR; Subkey: ".diy"; ValueData: "DIYLC"; Flags: uninsdeletevalue; ValueType: string; ValueName: "" Root: HKCR; Subkey: ".diy"; ValueData: "DIYLC"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""
Root: HKCR; Subkey: "DIYLC"; ValueData: "Program DIYLC"; Flags: uninsdeletekey; ValueType: string; ValueName: "" Root: HKCR; Subkey: "DIYLC"; ValueData: "Program DIYLC"; Flags: uninsdeletekey; ValueType: string; ValueName: ""
Root: HKCR; Subkey: "DIYLC\DefaultIcon"; ValueData: "{app}\diylc.ico"; ValueType: string; ValueName: "" Root: HKCR; Subkey: "DIYLC\DefaultIcon"; ValueData: "{app}\diylc.ico"; ValueType: string; ValueName: ""
@@ -31,4 +32,31 @@ Root: HKCR; Subkey: "DIYLC\shell\open\command"; ValueData: """{app}\diylc.exe""
Name: "{group}\DIY Layout Creator"; Filename: "{app}\diylc.exe" Name: "{group}\DIY Layout Creator"; Filename: "{app}\diylc.exe"
[Run] [Run]
Filename: "{app}\diylc.exe"; Flags: postinstall skipifsilent Filename: "{app}\diylc.exe"; Description: "Launch DIYLC on exit"; Flags: postinstall skipifsilent
[Code]
procedure LicenseLinkClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('', 'http://www.diy-fever.com/donate', '', '', SW_SHOW, ewNoWait,
ErrorCode);
end;
procedure InitializeWizard;
var donateImage: TBitmapImage;
begin
ExtractTemporaryFile('donate.bmp');
donateImage := TBitmapImage.Create(WizardForm);
donateImage.Parent:= WizardForm;
donateImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\donate.bmp'));
donateImage.Stretch := True;
donateImage.Width := 142;
donateImage.Height := 27;
donateImage.Left := 8;
donateImage.Top := WizardForm.InnerPage.Height + 10;
donateImage.Cursor := crHand;
donateImage.OnClick := @LicenseLinkClick;
end;