Файлы не распаковываются из архива arc
Что не так сделал?
читать дальше »
[Setup]
SourceDir=.
OutputDir=Setup
AppName=StarCraft
AppVerName=StarCraft
AppVersion=StarCraft
AppPublisher=Skynet
AppCopyright=Skynet
DefaultDirName={pf}\StarCraft
DefaultGroupName=StarCraft
AllowNoIcons=yes
OutputBaseFilename=starik
WindowVisible=no
WindowShowCaption=no
WindowResizable=no
Compression=lzma/fast
WizardImageFile=C:\Program Files\Smart Install Maker\Bitmaps\Import\Bmp014.bmp
WizardSmallImageFile=C:\Program Files\Smart Install Maker\Bitmaps\Import\Bmp015.bmp
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
[Files]
Source: "isxbb.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\Skynet\Desktop\starcraft.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\Skynet\Desktop\img_2862_starcraft-0002.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "C:\Users\Skynet\Desktop\1221340359_starcraft.front_cover.jpg"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "isgsg.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "bass.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "innocallback.dll"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "D:\Music\blur_-_song2.mp3"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: "E:\StarCraft\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension
Source: E:\starcraft\arc.exe; DestDir: {app};
Source: E:\starcraft\starcraft.arc; DestDir: {app};
[Icons]
Name: "{group}\StarCraft"; Filename: "{app}\StarCraft.exe"; WorkingDir: "{app}";
Name: "{userdesktop}\StarCraft"; Filename: "{app}\StarCraft.exe"; WorkingDir: "{app}"; Tasks: desktopicon;
Name: "{group}\{cm:UninstallProgram,StarCraft}"; Filename: "{uninstallexe}"
[Run]
Filename: {app}\arc.exe; WorkingDir: {app}; Parameters: x {app}\starcraft.arc -y -dp{app}; StatusMsg: Èäåò ðàñïàêîâêà äàííûõ...;
Description: "{cm:LaunchProgram, StarCraft}"; Filename: "{app}\StarCraft.exe"; WorkingDir: "{app}"; Flags: nowait postinstall skipifsilent unchecked
[UninstallDelete]
Type: filesandordirs; Name: "{app}"
[_ISTool]
EnableISX=True
[code]
type
HSTREAM=DWORD;
TTimerProc=procedure(uTimerID,uMessage:UINT;dwUser,dw1,dw2:DWORD);
const
BackGround=6;
Timer=16;
Indent=25;
var
MP3List:TStringList;
CurrentMP3:integer;
hMP3:HWND;
TimerID:LongWord;
function isxbb_AddImage(Image: PChar; Flags: Cardinal): integer; external 'isxbb_AddImage@files:isxbb.dll stdcall delayload';
function isxbb_Init(hWnd: Integer): integer; external 'isxbb_Init@files:isxbb.dll stdcall delayload';
function isxbb_StartTimer(Seconds: Integer; Flags: Cardinal): integer; external 'isxbb_StartTimer@files:isxbb.dll stdcall';
function isxbb_KillTimer(Flags: Cardinal): integer; external 'isxbb_KillTimer@files:isxbb.dll stdcall';
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';
function GetSystemMetrics(nIndex:Integer):integer; external 'GetSystemMetrics@user32.dll stdcall delayload';
function SetTimer(hWnd:HWND;nIDEvent,uElapse:UINT;lpTimerFunc:LongWord{TFNTimerProc}):UINT; external 'SetTimer@user32.dll stdcall delayload';
function KillTimer(hWnd:HWND;uIDEvent:UINT):BOOL; external 'KillTimer@user32.dll stdcall delayload';
function BASS_ChannelIsActive(Handle:HWND):DWORD; external 'BASS_ChannelIsActive@files:bass.dll stdcall';
function BASS_SetConfig(Option,Value:DWORD):DWORD; external 'BASS_SetConfig@files:bass.dll stdcall';
function BASS_Init(Device:integer;Freq,Flags:DWORD;Win:HWND;CLSID:integer):boolean; external 'BASS_Init@files:bass.dll stdcall delayload';
function BASS_StreamCreateFile(Mem:BOOL;f:PChar;Offset:DWORD;Length:DWORD;Flags:DWORD):HSTREAM; external 'BASS_StreamCreateFile@files:bass.dll stdcall';
function BASS_StreamFree(Handle:HWND):boolean; external 'BASS_StreamFree@files:bass.dll stdcall';
function BASS_ChannelPlay(Handle:HWND;Restart:boolean):boolean; external 'BASS_ChannelPlay@files:bass.dll stdcall';
function BASS_Start: Boolean; external 'BASS_Start@files:bass.dll stdcall';
function BASS_Stop: Boolean; external 'BASS_Stop@files:bass.dll stdcall';
function BASS_Free: Boolean; external 'BASS_Free@files:bass.dll stdcall delayload';
function WrapTimerProc(CallBack:TTimerProc;ParamCount:integer):LongWord; external 'wrapcallback@files:innocallback.dll stdcall';
procedure TimerTick(uTimerID,uMessage:UINT;dwUser,dw1,dw2:DWORD);
begin
if BASS_ChannelIsActive(hMP3)=0 then begin
BASS_Stop;
BASS_StreamFree(hMP3);
hMP3:=BASS_StreamCreateFile(False,PChar(MP3List.Strings[CurrentMP3]),0,0,0);
BASS_Start;
if hMP3<>0 then
if BASS_ChannelPlay(hMP3,True) then begin
CurrentMP3:=CurrentMP3+1;
if CurrentMP3>MP3List.Count-1 then CurrentMP3:=0;
end;
end;
end;
function InitializeSetup:boolean;
begin
ExtractTemporaryFile('blur_-_song2.mp3');
MP3List:=TStringList.Create;
MP3List.Add(ExpandConstant('{tmp}')+'\blur_-_song2.mp3');
CurrentMP3:=0;
Result:=True;
end;
procedure InitializeWizard;
begin
WizardForm.Position:=poScreenCenter;
MainForm.BorderStyle:=bsNone;
MainForm.Width:=GetSystemMetrics(0);
MainForm.Height:=GetSystemMetrics(1)+1;
MainForm.Top:=-1;
MainForm.Left:=0;
ExtractTemporaryFile('1221340359_starcraft.front_cover.jpg');
ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}')+'\1221340359_starcraft.front_cover.jpg',1 000,3000,1000,0,255,False,$FFFFFF,10);
TimerID:=SetTimer(0,0,500,WrapTimerProc(@TimerTick,5));
BASS_Init(-1,44100,0,0,0);
BASS_SetConfig(5,100);
BASS_SetConfig(6,100);
ExtractTemporaryFile('starcraft.jpg');
isxbb_AddImage(ExpandConstant('{tmp}')+'\starcraft.jpg',BackGround);
isxbb_Init(StrToInt(ExpandConstant('{hwnd}')));
MainForm.Visible:=True;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssInstall then begin
ExtractTemporaryFile('img_2862_starcraft-0002.jpg');
isxbb_AddImage(ExpandConstant('{tmp}')+'\img_2862_starcraft-0002.jpg',BackGround or Timer);
isxbb_Init(StrToInt(ExpandConstant('{hwnd}')));
isxbb_StartTimer(4,BackGround)
end;
if CurStep=ssPostInstall then begin
isxbb_KillTimer(BackGround);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpInstalling then begin
WizardForm.MainPanel.Visible:=False;
WizardForm.Bevel1.Visible:=False;
WizardForm.Width:=ScaleX(395);
WizardForm.Height:=ScaleY(142);
WizardForm.Left:=ScaleX(MainForm.Width-WizardForm.Width-Indent);
WizardForm.Top:=ScaleY(MainForm.Height-WizardForm.Height-Indent);
WizardForm.InnerNotebook.Left:=ScaleX(10);
WizardForm.InnerNotebook.Top:=ScaleY(10);
WizardForm.InnerNotebook.Width:=ScaleX(370);
WizardForm.StatusLabel.Left:=ScaleX(0);
WizardForm.StatusLabel.Top:=ScaleY(0);
WizardForm.StatusLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.FileNameLabel.Left:=ScaleX(0);
WizardForm.FileNameLabel.Top:=ScaleY(20);
WizardForm.FileNameLabel.Width:=WizardForm.InnerNotebook.Width;
WizardForm.ProgressGauge.Top:=ScaleY(40);
WizardForm.ProgressGauge.Width:=WizardForm.InnerNotebook.Width;
WizardForm.CancelButton.Left:=ScaleX(154);
WizardForm.CancelButton.Top:=ScaleY(80);
end;
if CurPageID=wpFinished then begin
WizardForm.Visible:=False;
WizardForm.Width:=502;
WizardForm.Height:=392;
WizardForm.Left:=(MainForm.Width-WizardForm.Width) div 2;
WizardForm.Top:=(MainForm.Height-WizardForm.Height) div 2;
WizardForm.Visible:=True;
end;
end;
procedure DeinitializeSetup;
begin
KillTimer(0,TimerID);
BASS_Stop;
BASS_Free;
MP3List.Free;
end;
А чисто такой скрипт работает, его и вставляю в верхний, и все перестает работать
читать дальше »
[Setup]
AppName=Map
Uninstallable=false
AppVerName=1.0
DefaultDirName=Map
OutputDir=C:\Users\Skynet\Desktop
[Files]
Source: E:\starcraft\arc.exe; DestDir: {app};
Source: E:\starcraft\starcraft.arc; DestDir: {app};
[Run]
Filename: {app}\arc.exe; WorkingDir: {app}; Parameters: x {app}\starcraft.arc -y -dp{app}; StatusMsg: Идет распаковка...;