EagleSH
Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Jeff_Trust одним разделом icons тут не обойдёшься... вот код на примере Mass Effect (уже писали об этом, нужно было поискать здесь) Код: #define MainExe "{app}\MassEffectLauncher.exe" #define GDFBinary "{app}\Binaries\MassEffectGDF.dll" [Files] Source: "GameuxInstallHelper.dll"; DestDir: "{app}"; Flags: overwritereadonly [ code ] type TGUID = record Data1: Cardinal; Data2, Data3: Word; Data4: array [0..8] of char; end; function GenerateGUID(var GUID: TGUID): Cardinal; external 'GenerateGUID@files:GameuxInstallHelper.dll stdcall setuponly'; function AddToGameExplorer(Binary: String; Path: String; InstallType: Integer; var GUID: TGUID): Cardinal; external 'AddToGameExplorerA@files:GameuxInstallHelper.dll stdcall setuponly'; function CreateTask(InstallType: Integer; var GUID: TGUID; TaskType: Integer; TaskNumber: Integer; TaskName: String; Binary: String; Parameters: String): Cardinal; external 'CreateTaskA@files:GameuxInstallHelper.dll stdcall setuponly'; function RetrieveGUIDForApplication(Binary: String; var GUID: TGUID): Cardinal; external 'RetrieveGUIDForApplicationA@{app}\GameuxInstallHelper.dll stdcall uninstallonly'; function RemoveFromGameExplorer(var GUID: TGUID): Cardinal; external 'RemoveFromGameExplorer@{app}\GameuxInstallHelper.dll stdcall uninstallonly'; function RemoveTasks(var GUID: TGUID): Cardinal; external 'RemoveTasks@{app}\GameuxInstallHelper.dll stdcall uninstallonly'; const PlayTask = 0; SupportTask = 1; var GUID: TGUID; procedure CurStepChanged(CurStep: TSetupStep); var Binary, MainExe: String; begin if CurStep = ssInstall then GenerateGUID(GUID); if CurStep = ssPostInstall then begin Binary:=ExpandConstant('{#GDFBinary}'); MainExe:=ExpandConstant('{#MainExe}'); AddToGameExplorer(Binary, ExpandConstant('{app}'), 3, GUID); CreateTask(3, GUID, PlayTask, 0, 'Play', MainExe, ''); CreateTask(3, GUID, SupportTask, 0, 'BioWare Website', 'http://www.bioware.com/', ''); CreateTask(3, GUID, SupportTask, 1, 'Support WebSite', 'http://masseffect.bioware.com/route/me/pc/vt/cs/en/', ''); end; end; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var Binary: String; GUID: TGUID; begin if CurUninstallStep=usUninstall then begin Binary:=ExpandConstant('{#GDFBinary}'); RetrieveGUIDForApplication(Binary, GUID); RemoveFromGameExplorer(GUID); RemoveTasks(GUID); UnloadDll(ExpandConstant('{app}\GameuxInstallHelper.dll')); end; end; |
|