spec2 - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Spec2 indicates the new build system specified by About.ey files. The original proposal can be found at Talk:Compilers/.

  • We know we need a field for the default directory name
  • We also need one for the extension
  • And probably one for a default file/whatever name

Additionally, part of the big idea behind spec2 is to always deal with a game folder, not just a game exe.

This results in the following:

Run-Directory: $tempfiles # Resolves to something like /tmp/egm####/
Run-Name: $random
Extension: .exe
Module: $directory/$name.$extension # This is the default and is usually left implicit.
# Hence, the above line is completely extraneous, but each of the variables mentioned
# should be available to the below functions, with the combination available as $module.

Run-Command: $module
Run-Parameters:
Resources: $module
Resources-Appendable: yes # Most eyaml parsers handle booleans almost as well as a human. "True" and "1" also work.

Though useful in most cases anyway, the $module variable can be a bit of a misnomer. Take OS X, for instance. The $module keyword was designed with all three major platforms in mind, but on OS X, it actually defaults to naming a folder rather than a binary (which would have been an even larger misnomer). Since .app programs are in fact directories, working with them means an obvious change in values from the Windows-oriented example given above. In OS X, the descriptor file would more closely resemble this:

Run-Command: launch
Run-Parameters: $module
Resources: $module/resource.res
Resource-Appendable: no

Here, the Apple "launch" command is used as the main binary, while the $module (the .app directory) is passed as its parameter instead. Resources treats $module like a directory as well, specifying a file inside it, which resource-appendable specifies must be re-written from start instead of added to.

⚠️ **GitHub.com Fallback** ⚠️