mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 07:11:38 +00:00
Added the steam installer script to the 3.1 repository.
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@196 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
99aebad018
commit
33b04e9f51
3 changed files with 83 additions and 0 deletions
BIN
main/install/images/LrgImage.bmp
Normal file
BIN
main/install/images/LrgImage.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
BIN
main/install/images/SmlImage.bmp
Normal file
BIN
main/install/images/SmlImage.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
83
main/install/steam installer.iss
Normal file
83
main/install/steam installer.iss
Normal file
|
@ -0,0 +1,83 @@
|
|||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
[Setup]
|
||||
AppName=Natural Selection
|
||||
AppVerName=Natural Selection 3.1
|
||||
AppPublisher=Unknown Worlds Entertainment
|
||||
AppPublisherURL=http://www.unknownworlds.com
|
||||
AppSupportURL=http://www.unknownworlds.com/ns/view?action=manual
|
||||
AppUpdatesURL=http://www.unknownworlds.com/ns/view?action=files
|
||||
DefaultDirName={code:MyDir}
|
||||
DisableDirPage=no
|
||||
DefaultGroupName=Natural Selection
|
||||
DisableProgramGroupPage=yes
|
||||
WizardImageFile=v:\install\images\LrgImage.bmp
|
||||
WizardSmallImageFile=v:\install\images\SmlImage.bmp
|
||||
|
||||
[Files]
|
||||
;Source: "v:\install\config\config.cfg"; DestDir: {app}\nsp\; Flags: confirmoverwrite
|
||||
;Source: "v:\install\ns\*.*"; DestDir: "{app}\nsp"; Flags: ignoreversion recursesubdirs
|
||||
Source: "v:\install\ns-diff\*.*"; DestDir: "{app}\nsp"; Flags: ignoreversion recursesubdirs
|
||||
;Source: "E:\ns21install\fmod.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
|
||||
[Run]
|
||||
;Filename: "{app}\nsp\xfire_installer.exe"; Description: "Xfire is the Instant Messenger for gamers. See when, where, and what games (Natural Selection and over 75 others) your friends are playing and join them with one click. It's free. Install now?"; Flags: postinstall
|
||||
|
||||
[Code]
|
||||
function GetSteamDir(): String;
|
||||
var
|
||||
sPrevPath: String;
|
||||
begin
|
||||
sPrevPath := '';
|
||||
RegQueryStringValue( HKCU, 'Software\Valve\Steam','ModInstallPath', sPrevpath);
|
||||
Result := sPrevPath;
|
||||
end;
|
||||
|
||||
function GetWonDir(): String;
|
||||
var
|
||||
sPrevPath: String;
|
||||
begin
|
||||
sPrevPath := '';
|
||||
RegQueryStringValue( HKCU, 'Software\Valve\Half-Life','InstallPath', sPrevpath);
|
||||
Result := sPrevPath;
|
||||
end;
|
||||
|
||||
function MyDir(Default: String): String;
|
||||
var
|
||||
sPath : String;
|
||||
begin
|
||||
sPath := GetSteamDir();
|
||||
if (Length(sPath) < 1) then
|
||||
begin
|
||||
sPath := GetWonDir();
|
||||
end;
|
||||
Result := sPath;
|
||||
end;
|
||||
|
||||
function InitializeSetup(): Boolean;
|
||||
var
|
||||
sSteamPath: String;
|
||||
sWonPath: String;
|
||||
bResult: Boolean;
|
||||
mbResult: Integer;
|
||||
begin
|
||||
bResult:=true;
|
||||
// if ( CheckForMutexes('__SteamBootstrapperApp__')) then
|
||||
//begin
|
||||
// MsgBox( 'STEAM is currently running, please stop STEAM before running this setup.' , mbInformation, MB_OK );
|
||||
// bResult := false;
|
||||
//end;
|
||||
sSteamPath := GetSteamDir();
|
||||
sWonPath := GetWonDir();
|
||||
if ((Length(sSteamPath) < 1) and (Length(sWonPath) < 1) and bResult) then
|
||||
begin
|
||||
mbResult := MsgBox( 'Setup has not detected a valid Steam or Half-Life (WON) install. Do you wish to continue?.' , mbConfirmation, MB_YESNO);
|
||||
if (mbResult = idNo) then
|
||||
begin
|
||||
bResult := false;
|
||||
end;
|
||||
end;
|
||||
Result := bResult;
|
||||
end;
|
||||
|
Loading…
Reference in a new issue