View Single Post
Old 05-08-2007, 05:41 PM   #14
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Not to be out done, I've come up with an automated .bat that handles pk3 creation AND packages everything up with a Windows installer.

- This is still a beta.
- You still have to compile the .dlls yourself.
- Live Link to Latest version of this stuff on the OJP repository.

Needed Tools:
7-Zip
Inno Setup

Batch File:
Code:
ECHO OFF

rem ****************
rem VARIABLE DEFINES
rem ****************

set PK3DLL=ojp_enhanceddlls
set PK3ASSETS=ojp_enhancedstuff
set ASSETSFOLDER=ojpenhanced

rem Installer Script Variables
set INSTALLSCRIPT=ojp_enhanced_installscript.iss
set OUTPUTFILENAME=InstallOJPEnhanced



rem ***************
rem START OF SCRIPT 
rem ***************

ECHO =================
ECHO Creating New Pk3s
ECHO =================
ECHO

..\Utilities\zip\7za.exe a -tzip %PK3ASSETS%.pk3 .\%ASSETSFOLDER%\* -xr!.svn\ -x!*.dll -x!*.so -mx9
..\Utilities\zip\7za.exe a -tzip %PK3DLL%.pk3 .\%ASSETSFOLDER%\*.dll -mx9

ECHO ===========================
ECHO Building Windows Setup File
ECHO ===========================
ECHO

..\Utilities\InnoSetup\iscc.exe %INSTALLSCRIPT% /O"." /F"%OUTPUTFILENAME%"

ECHO =====================
ECHO Cleaning Up Temp Pk3s
ECHO =====================
ECHO

del %PK3ASSETS%.pk3
del %PK3DLL%.pk3

ECHO =========
ECHO FINISHED!
ECHO =========
ECHO
Windows Installer Script:
Code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=OJP Enhanced
AppVerName=OJP Enhanced v0.0.9v
AppPublisher=OJP Team
AppPublisherURL=http://ojp.jediknight.net/
AppSupportURL=http://ojp.jediknight.net/
AppUpdatesURL=http://ojp.jediknight.net/
DefaultDirName=C:\Program Files\Lucasarts\Starwars Jedi Knight Jedi Academy\
DefaultGroupName=OJP Enhanced
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
UninstallFilesDir={app}\GameData\ojpenhanced

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "ojp_enhanceddlls.pk3"; DestDir: "{app}\GameData\ojpenhanced"; Flags: ignoreversion
Source: "ojp_enhancedstuff.pk3"; DestDir: "{app}\GameData\ojpenhanced"; Flags: ignoreversion
Source: "docs\*"; DestDir: "{app}\GameData\ojpenhanced\docs"; Flags: ignoreversion
Source: "..\Basic\docs\*"; DestDir: "{app}\GameData\ojpenhanced\docs"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\OJP Enhanced"; Filename: "{app}\GameData\jamp.exe"; Parameters: "+set fs_game ojpenhanced"
Name: "{group}\{cm:ProgramOnTheWeb,OJP Enhanced}"; Filename: "http://ojp.jediknight.net/"
Name: "{group}\{cm:UninstallProgram,OJP Enhanced}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\OJP Enhanced"; Filename: "{app}\GameData\jamp.exe"; Tasks: desktopicon; Parameters: "+set fs_game ojpenhanced"

[Run]
Filename: "{app}\GameData\jamp.exe"; Description: "{cm:LaunchProgram,OJP Enhanced}"; Flags: nowait postinstall skipifsilent; Parameters: "+set fs_game ojpenhanced"


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,