Snoopak96
Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору
Код: [Setup] AppName=USB Reanimator AppVerName=USB Reanimator DefaultDirName={sd}\USB Reanimator DefaultGroupName=USB Reanimator OutputDir=. OutputBaseFilename=Setup SolidCompression=yes [Languages] Name: "default"; MessagesFile: "compiler:Default.isl" [Types] Name: full; Description: Full installation; Flags: iscustom [Components] Name: ERDSystemRecovery; Description: ERD System Recovery 5.0/6.0/6.5; Name: ElcomsoftSystemRecovery; Description: Elcomsoft System Recovery Pro 3.0.466; Name: PasswareResetWindows; Description: Passware Reset Windows Password Standard Edition 1.2.1.195; Name: PasswareWindowsKeyEnerprise; Description: Passware Windows Key Enerprise 10.3.2585; Name: PLoPUSB; Description: PLoP USB 2.0 driver; Name: Acronis; Description: Выбор версии Acronis; Types: full; Name: Acronis\DirectorSuite; Description: Acronis Disk Director Suite 10.0 (2.169); Flags: exclusive; Name: Acronis\DirectorAdvanced; Description: Acronis Disk Director Advanced Server/Workstation 11.0 Rus; Flags: exclusive; Name: Acronis\TrueImage; Description: Acronis TrueImage 14.0 Rus; Flags: exclusive; Name: Acronis\AcronisBackup; Description: Acronis Backup & Recovery 11 Advanced Server with UR; Flags: exclusive; [_Code] var ExtractList, AcronisList: TStringList; procedure MenuSave; begin ///////////////////////////////////////////////////////////////[menu.lst]/////////////////////////////////////////////////////////// ExtractList:=TStringList.Create; ExtractList.Add('gfxmenu /BOOT/gfx/neutron.gz'); ExtractList.Add('timeout 20'); ExtractList.Add('default 0'+#13#10); if IsComponentSelected('ERDSystemRecovery') then begin ExtractList.Add('title ERD System Recovery 5.0/6.0/6.5 ->'); ExtractList.Add('find --set-root'); ExtractList.Add('configfile /boot/grub/erd.lst'+#13#10); end; //В каждой последней строке выбранного компонента дописываем #13#10 - переход на новую строку if IsComponentSelected('ElcomsoftSystemRecovery') then begin ExtractList.Add('title Elcomsoft System Recovery Pro 3.0.466'); ExtractList.Add('map /IMAGE/elcomsoft_esr_pro.iso (0xFF) || map --mem /IMAGE/elcomsoft_esr_pro.iso (0xFF)'); ExtractList.Add('map --hook'); ExtractList.Add('chainloader (0xFF)'+#13#10); end; if IsComponentSelected('PasswareResetWindows') then begin ExtractList.Add('title Passware Reset Windows Password Standard Edition 1.2.1.195'); ExtractList.Add('map /IMAGE/rwps.iso (0xFF) || map --mem /IMAGE/rwps.iso (0xFF)'); ExtractList.Add('map --hook'); ExtractList.Add('chainloader (0xFF)'+#13#10); end; if IsComponentSelected('PasswareWindowsKeyEnerprise') then begin ExtractList.Add('title Passware Windows Key Enerprise 10.3.2585'); ExtractList.Add('find --set-root'); ExtractList.Add('map --mem /WINSETUP/23SP2.ISO (0xff)'); ExtractList.Add('map (hd0) (hd1)'); ExtractList.Add('map (hd1) (hd0)'); ExtractList.Add('map --hook'); ExtractList.Add('root (0xff)'); ExtractList.Add('chainloader /I386/SETUPLDR.BIN'+#13#10); end; if IsComponentSelected('PLoPUSB') then begin ExtractList.Add('title Start PLoP USB 2.0 driver'); ExtractList.Add('find --set-root --ignore-floppies /IMAGE/plpbt.bin'); ExtractList.Add('kernel /IMAGE/plpbt.bin'+#13#10); end; //С остальными компонентами так же по аналогии^ ExtractList.Add('title Reboot'); ExtractList.Add('savedefault --wait=2'); ExtractList.Add('reboot'+#13#10); ExtractList.Add('title Power off computer'); ExtractList.Add('halt'); ExtractList.SaveToFile(ExpandConstant('{app}\menu.lst')); //Сохроняем в menu.lst по пути установки ///////////////////////////////////////////////////////////////[menu.lst]/////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////[acr.lst]/////////////////////////////////////////////////////////// if IsComponentSelected('Acronis') then begin AcronisList:=TStringList.Create; AcronisList.Add('Напишем чего-нибудь'); AcronisList.Add('ещё чего-нибудь'+#13#10); if IsComponentSelected('Acronis\DirectorSuite') then begin AcronisList.Add('Acronis Disk Director Suite 10.0 (2.169)'+#13#10); end; if IsComponentSelected('Acronis\DirectorSuite') then begin AcronisList.Add('Acronis Disk Director Suite 10.0 (2.169)'+#13#10); end; if IsComponentSelected('Acronis\TrueImage') then begin AcronisList.Add('Acronis TrueImage 14.0 Rus'+#13#10); end; if IsComponentSelected('Acronis\AcronisBackup') then begin AcronisList.Add('Acronis Backup & Recovery 11 Advanced Server with UR'+#13#10); end; AcronisList.Add('Конец'); CreateDir(ExpandConstant('{app}\boot')) //Создаём наши папки, если их нету на момент сохронения lst по пути CreateDir(ExpandConstant('{app}\boot\grub')) //то инно вернёт ошибку AcronisList.SaveToFile(ExpandConstant('{app}\boot\grub\acr.lst')); //Сохроняем в acr.lst по пути установки app\boot\grub end; ////////////////////////////////////////////////////////////////[acr.lst]/////////////////////////////////////////////////////////// end; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssPostInstall then MenuSave; //Выполняем процедуру после установки всех выбранных приложений end; |
| Всего записей: 303 | Зарегистр. 30-06-2010 | Отправлено: 14:10 27-08-2012 | Исправлено: Snoopak96, 17:16 27-08-2012 |
|