Advertisement
TLama

Untitled

Mar 2nd, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [Files]
  2. Source: "Bass.dll"; Flags: dontcopy
  3. Source: "coon.mp3"; Flags: dontcopy
  4.  
  5. [Icons]
  6. Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  7. Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
  8. Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  9. Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
  10. Name: {group}\Uninstall =ISSkin; Filename: {app}\unins000.exe
  11.  
  12. [Run]
  13. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
  14.  
  15. [Messages]
  16. WelcomeLabel2 = Ceci va installer Prison Architect en Français ou en Anglais  et des sauvegardes de prison(si vous le souhaité) sur votre ordinateur. Si vous aimez le jeu, achetez-le !
  17.  
  18. [Code]
  19. const  
  20.   BASS_SAMPLE_LOOP = 4;
  21.   BASS_UNICODE = $80000000;
  22.   BASS_CONFIG_GVOL_STREAM = 5;
  23.   #ifndef UNICODE
  24.     EncodingFlag = 0;
  25.   #else
  26.     EncodingFlag = BASS_UNICODE;
  27.   #endif
  28. type
  29.   HSTREAM = DWORD;
  30.  
  31. function BASS_Init(device: LongInt; freq, flags: DWORD;
  32.   win: HWND; clsid: Cardinal): BOOL;
  33.   external 'BASS_Init@files:bass.dll stdcall';
  34. function BASS_StreamCreateFile(mem: BOOL; f: string; offset1: DWORD;
  35.   offset2: DWORD; length1: DWORD; length2: DWORD; flags: DWORD): HSTREAM;
  36.   external 'BASS_StreamCreateFile@files:bass.dll stdcall';
  37. function BASS_ChannelPlay(handle: DWORD; restart: BOOL): BOOL;
  38.   external 'BASS_ChannelPlay@files:bass.dll stdcall';
  39. function BASS_SetConfig(option: DWORD; value: DWORD ): BOOL;
  40.   external 'BASS_SetConfig@files:bass.dll stdcall';
  41. function BASS_Free: BOOL;
  42.   external 'BASS_Free@files:bass.dll stdcall';
  43. procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
  44.   external 'LoadSkin@files:isskin.dll stdcall';
  45. procedure UnloadSkin();
  46.   external 'UnloadSkin@files:isskin.dll stdcall';
  47. function ShowWindow(hWnd: Integer; uType: Integer): Integer;
  48.   external 'ShowWindow@user32.dll stdcall';
  49.  
  50. function InitializeSetup: Boolean;
  51. begin
  52.   Result := True;
  53.   ExtractTemporaryFile('Office2007.cjstyles');
  54.   LoadSkin(ExpandConstant('{tmp}\Office2007.cjstyles'), 'NormalBlack.ini');
  55. end;
  56.  
  57. procedure InitializeWizard;
  58. var
  59.   StreamHandle: HSTREAM;
  60. begin
  61.   ExtractTemporaryFile('AudioFile.mp3');
  62.   if BASS_Init(-1, 44100, 0, 0, 0) then
  63.   begin
  64.     StreamHandle := BASS_StreamCreateFile(False,
  65.       ExpandConstant('{tmp}\coon.mp3'), 0, 0, 0, 0,
  66.       EncodingFlag or BASS_SAMPLE_LOOP);
  67.     BASS_SetConfig(BASS_CONFIG_GVOL_STREAM, 2500);
  68.     BASS_ChannelPlay(StreamHandle, False);
  69.   end;
  70. end;
  71.  
  72. procedure DeinitializeSetup;
  73. begin
  74.   BASS_Free;
  75.   ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
  76.   UnloadSkin;
  77. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement