Skip to content

Instantly share code, notes, and snippets.

@dedmen
Last active November 26, 2018 07:57
Show Gist options
  • Save dedmen/5e32fa3412ee9ebd4aee4ac04c245c47 to your computer and use it in GitHub Desktop.
Save dedmen/5e32fa3412ee9ebd4aee4ac04c245c47 to your computer and use it in GitHub Desktop.
https://github.com/dedmen/armake/blob/master/src/main.c
https://github.com/acemod/ACE3/blob/master/Makefile
class AceModuleOptions {
force = 1; //Force build
disableWarnings[] = {"unquoted-string", "redefinition-wo-undef"};
includeFolders[] = {"include"}; //local or global path. If local then relative to buildscript
target = "release/ace_<sourceName>.pbo";
//<sourceName> is auto replaced by the folder-/filename that IterateMainAddons provides
//There is <sourcePath> too that has full path to file. And <sourcePathLocal> that has path relative to buildscript
};
class BuildTasks {
class BuildMainAddon : AceModuleOptions {
type = "build";
};
class SignPbo {
type = "sign";
force = 1;
privatekey = "keys/ACE_$(VERSION).biprivatekey";
target = "<sourcePath>-<Git_hash>.bisign";
};
class IterateMainAddons {
type = "forEachSubfolder"; // forEachSubfolder, forEachFile, cmd, copyFile, build, sign, keygen, regexpReplace
source = "addons/";
filter = "*"; //only in forEachX operations
task = "BuildMainAddon"; //only in forEachX operations
};
class GenerateKey {
type = "keygen";
force = 1;
target = "keys/ACE_$(VERSION).biprivatekey";
};
class IterateRelease {
type = "forEachFile";
source = "release/";
filter = "*.pbo"; //only in forEachX operations
task = "SignPbo"; //only in forEachX operations
};
class GetGitHash {
type = "cmd";
cmd = "shell git log -1 --pretty=format:""%H"" | head -c 8";
outputVar = "Git_hash"; //writes command output into variable
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment