View Single Post
Old 04-07-2007, 11:15 PM   #1
Tinny's Avatar
Join Date: Apr 2002
Posts: 1,188
automating pk3 creation

How many of you after compiling delete the .dlls and .pk3s from your mod folder, pack the .pk3 of your new dlls and then run your mod? I figured out a way to just simply compiling and then immediately start debugging with the f5 button. Btw, I only know the rules of how to do this with visual c++ express.

First thing you want to do is download Zip 2.32 from this ftp site.

Reason I chose Zip 2.32 is because its the fastest freeware zip program that allows execution through command lines that I know of.

I extracted the contents to:

D:\zip232\ (for instructions later)

Then inside your mod folder which is inside of GameData I created a .bat file called zipdlls. Using the repository for ojp I store the source in another folder and this is where my builds output the new dlls after each recompile:

D:\Jedi Academy\ojpwahoo\ojpbasic

but my mod folder is here:

D:\Jedi Academy\GameData\ojpwahoo\

Using that information this is what my .bat file looked like:

You can omit the 3rd and 4th line if you don't want your mod folder cleaned of text and log files (change code.pk3 or code anything to whatever the name of your pk3 with the dlls is called).

del "D:\Jedi Academy\GameData\ojpwahoo\code.pk3"
del "D:\Jedi Academy\GameData\ojpwahoo\*.dll"
del "D:\Jedi Academy\GameData\ojpwahoo\*.txt"
del "D:\Jedi Academy\GameData\ojpwahoo\*.log"

D:\zip232\zip.exe -qj3 "D:\Jedi Academy\GameData\ojpwahoo\code" "D:\Jedi Academy\ojpwahoo\ojpbasic\*.dll"

ren "D:\Jedi Academy\GameData\ojpwahoo\*.zip" *.pk3
The options qj3 after the zip.exe say:

-q - to quiet all outputs
-j - to not zip in directories but the specified files themselves
-3 - balance of speed and size of zipped output, 1 is the fastest, 9 is the smallest

Now to configure Visual C++ I right clicked on jk2game folder in the Solution Explorer and I went to properties then expanded configuration properties then
expanded custom build event -> General

In there for command line I used:

"D:\Jedi Academy\GameData\ojpwahoo\zipdlls.bat"

for description I said "making pk3s" and for some reason it requires an output and i just typed "nothing" without the quotes.

Ofcourse you have to configure the whole thing based on your directories. Apply and you should be able to just compile then start debugging .


An old school mod for jedi academy.

Last edited by Tinny; 04-07-2007 at 11:28 PM.
Tinny is offline   you may: quote & reply,