1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2024-11-21 17:56:56 +02:00

Новые файлы Media

This commit is contained in:
Anton Titovets 2024-05-15 14:13:10 +03:00
parent e641a2f4ff
commit f587d854cd
12 changed files with 51 additions and 12 deletions

View File

@ -6,10 +6,16 @@
#define MyAppPublisher "bayselonarrend"
#define MyAppURL "https://github.com/Bayselonarrend/OpenIntegrations"
#define MyAppExeName "oint.exe"
#define GDrive "D:\GD"
#define Repo "D:\Repos\OpenIntegrations"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
DisableWelcomePage=no
WizardImageFile={#Repo}\Media\WizardImage.bmp
AppId={{E1D44D44-2C84-4112-80AA-2DC406D85A11}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
@ -21,8 +27,8 @@ AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
LicenseFile=C:\Repos\OPI\LICENSE
OutputDir="G:\Мой диск\Проекты\ОПИ\Релизы\{#MyAppVersion}"
LicenseFile={#Repo}\LICENSE
OutputDir="{#GDrive}\Мой диск\Проекты\ОПИ\Релизы\{#MyAppVersion}"
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
Compression=lzma
@ -33,30 +39,36 @@ OutputBaseFilename=oint_{#MyAppVersion}_installer
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "G:\Мой диск\Проекты\ОПИ\Релизы\{#MyAppVersion}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#GDrive}\Мой диск\Проекты\ОПИ\Релизы\{#MyAppVersion}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#Repo}\cli\start.bat"; DestDir: "{app}"
Source: "{#Repo}\Media\logo.bmp"; Flags: dontcopy
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{group}\{#MyAppName}"; Filename: "{app}\start.bat"; IconFilename: "{#Repo}\Media\ex.ico"
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\start.bat"; IconFilename: "{#Repo}\Media\ex.ico"; Tasks: desktopicon
Name: "{group}\Удалить OInt"; Filename: "{uninstallexe}"; IconFilename: "{#Repo}\Media\wizard.ico"
Name: "{group}\Web-документация"; Filename: "https://www.openintegrations.dev/"
[Tasks]
Name: desktopicon; Description: "Создать ярлык на рабочем столе";
[Run]
Filename: "{cmd}"; Parameters: "/k ""cd ""{app}"" && {#MyAppExeName}"""; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "https://openintegrations.dev/docs/Nachalo-raboty/Rabota-s-CLI-versiei"; Flags: shellexec runasoriginaluser postinstall; Description: "Посетить старницу документации на openintegrations.dev"
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \
Check: NeedsAddPath('{app}')
Check: NeedsAddPath(ExpandConstant('{app}'))
[Code]
function NeedsAddPath(Param: string): boolean;
var
OrigPath: string;
Element: string;
begin
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
'SYSTEM\CurrentControlSet\Control\Session Manager\Environment',
@ -65,7 +77,33 @@ begin
Result := True;
exit;
end;
{ look for the path with leading and trailing semicolon }
{ Pos() returns 0 if not found }
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
Element:= ';' + Param + ';';
Result := Pos(Element, ';' + OrigPath + ';') = 0;
end;
procedure MyImageClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://www.google.es', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
procedure CreateMyImage();
begin
ExtractTemporaryFile('Logo.bmp');
with TBitmapImage.Create(WizardForm) do
begin
Parent := WizardForm.InstallingPage;
Bitmap.LoadFromFile(ExpandConstant('{tmp}\Logo.bmp'));
AutoSize := True;
Left := 0;
Top := WizardForm.InstallingPage.Top + WizardForm.InstallingPage.Height - Height - 8;
Cursor := crHand;
OnClick := @MyImageClick;
end;
end;
procedure InitializeWizard;
begin
CreateMyImage();
end;

BIN
Media/WizardImage.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

BIN
Media/WizardImage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 129 KiB

BIN
Media/ex.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
Media/ex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
Media/logo.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

BIN
Media/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
Media/logo_head.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
Media/wizard.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
Media/wizard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

1
cli/start.bat Normal file
View File

@ -0,0 +1 @@
cmd /k oint.exe