Skip to content

Instantly share code, notes, and snippets.

@darkconsole
Created December 20, 2018 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkconsole/addad34f688d36369ffd6894f6131d19 to your computer and use it in GitHub Desktop.
Save darkconsole/addad34f688d36369ffd6894f6131d19 to your computer and use it in GitHub Desktop.
{
"shell": true,
"env": {
"GameDir": "D:\\Games\\Steam\\steamapps\\common\\Skyrim Special Edition",
"TempDir": "D:\\Temp\\SkyrimSE",
"BuildUser": "darkconsole",
"BuildHost": "NA-NA-NA-NA-WISCONSIN-DEATH-TRIP"
},
"cmd": [
// kick off the compiler.
"echo", "Compiling ${file_base_name}...", "&&",
"chdir", "%GameDir%", "&&",
"Papyrus Compiler\\PapyrusCompiler.exe",
"Data\\Scripts\\Source\\\\${file_base_name}.psc",
"-i=Data\\Scripts\\Source",
"-f=Data\\Scripts\\Source\\TESV_Papyrus_Flags.flg",
"-o=%TempDir%",
"-q",
"-asmonly",
"&&",
// modify the assembly.
"echo", "Editing ${file_base_name} Assembly Metadata...", "&&",
"chdir", "%TempDir%", "&&",
"sed",
"-i",
"s/\\.user \".*\"\\$/.user \"%BuildUser%\"/","${file_base_name}.pas",
"&&",
"sed",
"-i",
"s/\\.computer \".*\"\\$/.computer \"%BuildHost%\"/","${file_base_name}.pas",
"&&",
// assemble the final binary.
"echo", "Assembling ${file_base_name}...", "&&",
"%GameDir%\\Papyrus Compiler\\PapyrusAssembler.exe",
"${file_base_name}",
"-q",
"&&",
"rm", "${file_base_name}.pas", "&&",
"move","${file_base_name}.pex","${file_path/Source//i}",">nul", "&&",
"echo", "Done"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment