as45df
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Здравствуйте все!!! Скажите, а почему зависает isSlideShow v1.02 при использовании любого скина в установщике ( слайд шоу по процентам установки и от времени в окне инно), а потом ничего непроисходит? Вот навсякий случай скрипт: [more] [Setup] AppName=My Program AppVerName=My Program version 1.5 DefaultDirName={pf}\My Program DefaultGroupName=My Program Compression=lzma [Languages] Name: rus; MessagesFile: compiler:Languages\Russian.isl [Files] Source: C:\jpg\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs Source: isSlideShow.dll; DestDir: {tmp}; Flags: dontcopy Source: InnoCallback.dll; DestDir: {tmp}; Flags: dontcopy Source: Slides\Back.jpg; DestDir: {tmp}; Flags: dontcopy Source: Slides\1.bmp; DestDir: {tmp}; Flags: dontcopy Source: Slides\2.bmp; DestDir: {tmp}; Flags: dontcopy Source: Slides\3.jpg; DestDir: {tmp}; Flags: dontcopy Source: Slides\4.jpg; DestDir: {tmp}; Flags: dontcopy Source: Slides\5.png; DestDir: {tmp}; Flags: dontcopy Source: Slides\6.png; DestDir: {tmp}; Flags: dontcopy Source: steam.cjstyles; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression Source: ISSkin.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression [Icons] Name: {group}\Удалить; IconFilename: {app}\unins000.exe; Filename: {app}\unins000.exe [Code] type TProc=procedure(HandleW, msg, idEvent, TimeSys: LongWord); var TimerID: LongWord; CurrentPicture:integer; PicList: TStringlist; function WrapTimerProc(callback:TProc; paramcount:integer):longword; external 'wrapcallback@files:innocallback.dll stdcall'; function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall'; function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32.dll stdcall'; function GetSystemMetrics(nIndex:Integer):Integer; external 'GetSystemMetrics@user32.dll stdcall'; procedure InitializeSlideShow(Hwnd:Thandle; l,t,w,h:integer;Animate:boolean; Stretch:integer); external 'InitializeSlideShow@files:isslideshow.dll stdcall'; procedure DeinitializeSlideShow; external 'DeinitializeSlideShow@files:isslideshow.dll stdcall'; procedure ShowImage(ipath:PChar; Effect:integer); external 'ShowImage@files:isslideshow.dll stdcall'; procedure InitializeWizard1(); begin PicList:=tstringlist.Create; ExtractTemporaryFile('Back.jpg'); ExtractTemporaryFile('1.bmp'); ExtractTemporaryFile('2.bmp'); ExtractTemporaryFile('3.jpg'); ExtractTemporaryFile('4.jpg'); ExtractTemporaryFile('5.png'); ExtractTemporaryFile('6.png'); piclist.add(ExpandConstant('{tmp}') + '\1.bmp'); piclist.add(ExpandConstant('{tmp}') + '\2.bmp'); piclist.add(ExpandConstant('{tmp}') + '\3.jpg'); piclist.add(ExpandConstant('{tmp}') + '\4.jpg'); piclist.add(ExpandConstant('{tmp}') + '\5.png'); piclist.add(ExpandConstant('{tmp}') + '\6.png'); end; procedure OnTimer(HandleW, msg, idEvent, TimeSys: LongWord); var thePicture: integer; delta: double; begin delta := WizardForm.ProgressGauge.Max / ( piclist.Count ); thePicture := round( WizardForm.ProgressGauge.Position / delta ); if( thePicture <> CurrentPicture ) then begin CurrentPicture := thePicture; try ShowImage(piclist.strings[CurrentPicture - 1], 1); except end; end; end; procedure CurPageChanged(CurPageID: Integer); begin If CurPageID=wpInstalling then begin InitializeSlideShow(WizardForm.Handle, 0, 0, ScaleX(501), ScaleY(314), true, 2); ShowImage(ExpandConstant('{tmp}') + '\Back.jpg', 1); TimerID:=SetTimer(0, 0, 200, WrapTimerProc(@OnTimer, 4)); WizardForm.ProgressGauge.parent:=WizardForm; WizardForm.ProgressGauge.setbounds(ScaleX(10), ScaleY(325), ScaleX(385), WizardForm.ProgressGauge.height); WizardForm.CancelButton.Left:=ScaleX(405); WizardForm.CancelButton.Top:=ScaleY(325); end; if CurPageID=wpFinished then begin DeinitializeSlideShow; WizardForm.ProgressGauge.visible:=false; end; end; procedure DeinitializeSetup1(); begin DeinitializeSlideShow; KillTimer(0, TimerID); end; //////////////////-------------------------------------Загрузка скина--------------------------------------------------/////////////////////// procedure LoadSkin(lpszPath: String; lpszIniFileName: String); external 'LoadSkin@files:isskin.dll stdcall'; procedure UnloadSkin(); external 'UnloadSkin@files:isskin.dll stdcall'; function ShowWindow(hWnd: Integer; uType: Integer): Integer; external 'ShowWindow@user32.dll stdcall'; function InitializeSetup:boolean; begin ExtractTemporaryFile('steam.cjstyles'); LoadSkin(ExpandConstant('{tmp}')+'\steam.cjstyles', ''); Result:=True; end; procedure InitializeWizard2; begin WizardForm.BeveledLabel.Enabled:=True; end; procedure DeinitializeSetup2; begin ShowWindow(WizardForm.Handle,0); UnloadSkin(); end; procedure InitializeWizard; begin InitializeWizard1(); InitializeWizard2(); end; procedure DeinitializeSetup; begin DeinitializeSetup1(); DeinitializeSetup2(); end; |