First of all, download SublimeText 3 and your sourceport of choice. In this tutorial I'll be using GZDoom.
Spoiler: Folder structure
Everything on this section of the tutorial will affect the command line and Build Systems scripts later on, so if you wish to do something differently here you'll have to alter the scripts.
- Create a folder with the project name of your choice.
Extract your sourceport inside it.
Move your iwads to the sourceport folder.
Create a folder to store your mod files, in my case I named it "src".
Spoiler: Windows scripts
Here's the dirty part, if you use Linux, this'll be a lot cleaner with a bash script.
Inside your project main folder, create a file with the following name and extension: "make.cmd".
Edit it and paste the following code:This script does the following:Code: Select all
SETLOCAL SET projectName=Test SET projectFolderName=src SET extension=.pk3 SET iwad=hexen.wad SET winrar=C:\Program Files\WinRAR\WinRar.exe IF EXIST "%cd%\%projectName%%extension%" ( DEL "%cd%\%projectName%%extension%" "%winrar%" a -r -ep1 -afzip "%projectName%%extension%" "%cd%\%projectFolderName%\" gzdoom\gzdoom.exe -iwad "%iwad%" -file "%projectName%%extension%" -skill 4 -warp 1 ) else ( "%winrar%" a -r -ep1 -afzip "%projectName%%extension%" "%cd%\%projectFolderName%\" gzdoom\gzdoom.exe -iwad "%iwad%" -file "%wad%" "%projectName%%extension%" -skill 4 -warp 1 )
In this case I'm using the hexen.wad as my iwad, my WinRar is located at "C:\Program Files\WinRAR\WinRar.exe" and my project file will be named "Test.pk3". If you wish to alter any of these options, just edit them out in the script variables (everything with "SET" at the start of the code).
- If there's no file named "Test.pk3" on nthe main project folder, it compresses the "scr" folder into a a .zip with a .pk3 extension and then runs gzdoom with the chosen iwad on ultraviolence on the first map.
Otherwise it first removes the existing "Test.pk3" file and does the same.
If you're using Linux, the commands should be mostly the same, except you won't have to deal with Window's bullshit scripting language.
Spoiler: SublimeText project and Build Systems
- Open Sublimetext 3, go to Project -> Add Folder to Project, add your main project folder.
Save your project somewhere. In my case I saved it inside the main project folder.
Go to Project -> Edit project
Paste the following codeNow go to Tools -> Build SystemCode: Select all
{ "folders": [ { "path": "." } ], "build_systems": [ { "name": "build gzdoom", "shell":true, "working_dir": "${project_path}", "windows": { "cmd":["make.cmd"] }, } ] }
Select "build gzdoom"
Press crtl+b
If you've done everything right, the .cmd file should run and gzdoom should open.