LuxPak version 1.0
=====================
https://www.ps2-pro.com/projects/luxpak/

Apologies to Dave Etherton, from whom I stole and amended this readme.

INSTRUCTIONS
============

Create a directly burnable and bootable .iso image using wildcards.

Run with no parameters to see help.

Command line switches begin with either a '/' or '-' character.  Any
other parameters on the command line are assumed to be filename
specifications.  Most switches can appear anywhere on the command line; but
some are specific to adjacent files.  Any parameters associated with a
switch must follow directly from the switch with no spaces.

Response files are specified as @<filename> on the command line.  The
contents of the response file are interpreted as if they were on the
command line directly.  Any number of response files can be interspersed
with direct switches and specifications on the command line.

When creating an iso or pak file, the last filename specifies the output.
If the extension is .iso or .tao and ISO image is created.  All other
extensions cause a 'PAK' file to be made.  The format of these files is
given later in this readme. All other filenames on the command line are
used to create the ISO or PAK image.


Switches:
---------
/root=<directory>
		specifies a root directory.  Destination filenames are generated
		from the location of the source files relative to this root.
		If not given, the root is taken from the directory part of the
		source file specifications.
		
/license=<filename>
		specifies a file containing the license area of a CD or DVD image.
		This file would typically be generated by CDVDGEN (see below).
		
/A	-	aligns files in a PAK file to multiples of the following value.
		eg. /A4096 aligns files on 4K boundaries.
		
/V	-	enables verbose mode.  Causes filenames to be output as they are
		added.
		
/C	-	enables capitalisation.  Forces the filenames to be capitalised.

/D	-	checks that filenames are no longer than 8, and extensions are
		no longer than 3 characters.  If the D is followed by an 'S'
		non-compliant files are skipped; if followed by a 'T' they are
		truncated.  Otherwise LuxPak aborts.
		
/CD	-	creates a CD ISO.  This causes LuxPak to output 2352 byte sectors
		with parity, EDC codes, etc.  Otherwise a DVD image is created
		with raw 2048 byte sectors.
		
/S	-	sorts the files.  Followed by any combination of E,F,D and T for
		extension, filename, directory and time.  The files are placed
		in the image in the order specified, sorting first on the first
		field specified after the 'S', then the second, and so on.
		This only affects the placement of the files, and not their
		location in the directory structure.
		
/as	-	renames files found with the previous filename specification using
		the next filename specification.  This switch is sensitive to
		placement on the command line.
		The renaming can modify any of the directory, filename, or extension
		of the source file to create the name of the file in the image.
		
/@	-	allows direct placement of files within the image.  It is followed
		by a sector number, which is relative to the first legal file
		location.  Subsequent files follow on from this location.
		
/pak	places subsequent files into a PAK file within the image being
		created.  The following file specification is the name of the
		PAK file.  This switch is sensitive to placement on the command line.
		
/X	-	extract files.  In this mode, the first file specification on the
		command line is assumed to be an iso or PAK file, and subsequent
		file specifications are the names of files to be extracted.  These
		files do not support wildcards.  If no additional filenames are
		given, all files will be extracted.
		PAK files with the image will be expanded into individual files
		unless a '-' follows the 'X' on the command line.
		
/L	-	list files. This can be used whether creating an image or not.
		Files within the image are printed to the screen.
		PAK files with the image will be expanded into individual files
		unless a '-' follows the 'L' on the command line.
		
Filename specifications:
-----------------------
LuxPak uses an extended wildcard filename specification.  One specification
can be a comma seperated list of wildcards.  Each wildcard can recurse
through directories by using a '*' as the last subdirectory.  Each wildcard
can be followed by a list of exception (~) and inclusion (+) specifications.

eg.

C:\Data\*\*.*,~*.bmp,+title.bmp

specifies all files in C:\Data and subdirectories, except .bmp files, but
including title.bmp.  The exceptions and inclusions are processed in the
order specified.

C:\Data\file1.txt,C:\Data\file2.txt,C:\TEMP\*.bmp,~P*.*

explicitly specifies C:\Data\file1.txt and C:\Data\file2.txt, and then
matches all .bmp files in C:\TEMP except those beginning with a 'P'.
		
License file
------------
To create a license file, fire up CDVDGEN, start the appropriate kind of
project (CD or DVD), drag a bunch of dummy files in, and go to the Volume
pane and fill in the license info to match what you're expecting to burn.
Then fire up the recorder, and use File / Export Image to save out the .000 file.
Only the first 16 sectors (32K for a DVD, 16*2348 bytes for CD) are used, so
the file can be truncated to this length.

If a license file is specified, LuxPak will checked that a SYSTEM.CNF file
is being added; that it corresponds to the license file; and that there
exists an ELF file with the name specified in the SYSTEM.CNF file.

Example usage:
-------------
LuxPak *.bmp bitmaps.iso

Builds bitmaps.iso file out of all .bmp files in the current directory.

More typical usage would use a response file, something like this:

Contents of US.RSP:
/v
/license=C:\Dev\MyGame\US.LIC
C:\Dev\Loader\loader.elf					/as SLUS_999.99
C:\Dev\MyGame\PS2\Mygame.elf				/as GAME.ELF
C:\Dev\MyGame\US.CNF						/as SYSTEM.CNF
C:\Dev\MyGame\Movies\*.pss
C:\usr\local\sce\iop\modules\ioprp250.img,
C:\usr\local\sce\iop\modules\sio2man.irx,
C:\usr\local\sce\iop\modules\padman.irx,
C:\usr\local\sce\iop\modules\mcman.irx,
C:\usr\local\sce\iop\modules\mcserv.irx,
C:\usr\local\sce\iop\modules\libsd.irx		/as modules\*.*
/pak DATA.PAK
C:\MyGame\DATA\*\*.*,~STUFF\*.*				/as *.*
C:\MyGame\DATA\STUFF\*.*					/as STUFF\*.*
MYGAME.ISO

Then run LuxPak with:
LuxPak @US.RSP

DISCLAIMER
==========
This software comes with no warranties, express or implied, of suitability
for any purpose.  Don't try to submit a final build to Sony with this tool.
We give DVDs created with this tool to our publisher, and if they want to
submit it to Sony, they use that as their source for CDVDGEN.


VERSION HISTORY
===============
1.00 - First external release.

