Tinny Posted April 8, 2007 Share Posted April 8, 2007 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 . Link to comment Share on other sites More sharing options...
ensiform Posted April 8, 2007 Share Posted April 8, 2007 I personally have: cgamex86.dll cgamex86.pdb jampgamex86.dll jampgamex86.pdb uix86.dll in G:\ensimod\codemp\Final I copy it manually to G:\games drive\jedi\GameData\ensimod Overwrite, Compress the dlls and pack again into pk3 without deleting it first. Most people do their auto creation with a scons script which uses zlib. >.> Link to comment Share on other sites More sharing options...
Tinny Posted April 11, 2007 Author Share Posted April 11, 2007 What's a .pdb file? Oh yeah guys, I updated the bat file so its cleaner and one can change settings easily by changing the variables set at the top: @ECHO OFF set modDir=C:\Program Files (x86)\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData\ojpwahoo set dllOut=C:\Program Files (x86)\LucasArts\Star Wars Jedi Knight Jedi Academy\ojpwahoo\ojpbasic set zipApp=C:\Program Files (x86)\WiZ\command line\zip.exe del "%modDir%\code.pk3" del "%modDir%\*.dll" del "%modDir%\*.txt" del "%modDir%\*.log" "%zipApp%" -qj1 "%modDir%\code" "%dllOut%\*.dll" ren "%modDir%\*.zip" *.pk3 Also if you followed the instructions I had at the top post, be sure to set jk2game depend on jk2cgame and ui in the dependencies option so it doesn't compile jk2game and then zip, but compiles all three libraries then zips them to your mod folder. Link to comment Share on other sites More sharing options...
ensiform Posted April 12, 2007 Share Posted April 12, 2007 Program Database Files for VC 2003 and 2005 and up. They hold the debug symbols, etc for the crash log stuff. Link to comment Share on other sites More sharing options...
razorace Posted April 12, 2007 Share Posted April 12, 2007 I've seen the backtracer work without those files in there. Weird. Link to comment Share on other sites More sharing options...
ensiform Posted April 12, 2007 Share Posted April 12, 2007 Not needed on linux or if compiled with vc6. It shouldn't show you any actual functions, etc if there are no symbols in the dll itself. Link to comment Share on other sites More sharing options...
razorace Posted April 12, 2007 Share Posted April 12, 2007 Oh, ok. I was talking about it on a linux system. Link to comment Share on other sites More sharing options...
Gamall Ida Posted April 14, 2007 Share Posted April 14, 2007 About the original post : personally, rather than zipping everything, I use +set fs_dirbeforepak 1. That way you just have to copy the dlls and that's it. My batch: copy "C:\Documents and Settings\Gamall\Bureau\jka- base fix\codemp\Debug\jampgamex86.dll" "C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData\Base\jampgamex86.dll" del "C:\Program Files\LucasArts\Star Wars Jedi Knight Jedi Academy\GameData\Base\jampserver.cfg" .\jampDed2 +set dedicated 2 +set net_port 21000 +set fs_game base +set fs_dirbeforepak 1 +set com_hunkmegs 64 +set sv_maxclients 14 +set sv_cheats 1 +exec server.cfg That and a shortcut +connect localhost:21000 make my life easy. I think that this is simpler than zipping the jampgame every time. But whatever works is good edit: typos Link to comment Share on other sites More sharing options...
Tinny Posted April 14, 2007 Author Share Posted April 14, 2007 Woah, I didn't know there was a cvar for reading dlls before having them zipped. Well if that's true most of what I said is useless . Thanks man. Link to comment Share on other sites More sharing options...
razorace Posted April 14, 2007 Share Posted April 14, 2007 Err, well, that's great for debugging, but for actual releases, it needs to be in a .pk3 for normal people to use the mod. Link to comment Share on other sites More sharing options...
Tinny Posted April 14, 2007 Author Share Posted April 14, 2007 Yeah, but the main reason I made the script is for making debugging much quicker. Packing a .pk3 once for others wouldn't be a problem. Link to comment Share on other sites More sharing options...
Gamall Ida Posted April 14, 2007 Share Posted April 14, 2007 Woah, I didn't know there was a cvar for reading dlls before having them zipped. Neither did I until I noticed it in the MakeAMod_readme.txt shipped with the JKA SDK Thanks man. I'm a girl actually, but you're welcome nevertheless Err, well, that's great for debugging, but for actual releases, it needs to be in a .pk3 for normal people to use the mod. Yep. Debugging was the core of the thread I think: (edit: oops, Tinny beat me to it) 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. Link to comment Share on other sites More sharing options...
razorace Posted April 14, 2007 Share Posted April 14, 2007 Yeah, but the main reason I made the script is for making debugging much quicker. Packing a .pk3 once for others wouldn't be a problem. Oh, well, that's why you run everything to the debugger in VS. You only need to make .pk3s when you're packing things for release. Link to comment Share on other sites More sharing options...
razorace Posted May 8, 2007 Share Posted May 8, 2007 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: 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: ; 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" Link to comment Share on other sites More sharing options...
Tinny Posted May 10, 2007 Author Share Posted May 10, 2007 That's sweet, and it also looks like the script gets rid of .svn files. I just made a script for packaging the other assets too but its not nearly as elegant . Link to comment Share on other sites More sharing options...
razorace Posted May 10, 2007 Share Posted May 10, 2007 To be fair, I probably spent a lot more time on it too. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.