Skip to content

Commit

Permalink
Adds per-platform prebuild and postbuild commands
Browse files Browse the repository at this point in the history
Also a minor changelog update that gets rid of a sublist that contained only one item.
  • Loading branch information
samtupy committed Oct 10, 2024
1 parent a00e141 commit daeb68c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions doc/src/appendix/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ This document lists all major changes that have taken place in NVGT since we sta
* The `reset` method now takes a new parameter, true by default, which resets the form's echo mode to default. This is useful to retrieve the value of the `audioform_keyboard_echo` property.
* The go to line functionality can now be used on non multiline input fields as well. In non multiline fields, the line number field will be invisible.
* Added a new method that allows you to toggle the go to line functionality. `bool set_enable_go_to_index(int control_index, bool enabled);`
* sound_pool.nvgt modifications:
* Added a new parameter in `update_listener_3d` function called `refresh_y_is_elevation` (bool) which toggles whether the sound pool should refresh the global `sound_pool_default_y_is_elevation` property. This makes it possible to constantly change the global property for the sound elevation.
* Added a new parameter in sound_pool's `update_listener_3d` function called `refresh_y_is_elevation` (bool) which toggles whether the sound pool should refresh the global `sound_pool_default_y_is_elevation` property. This makes it possible to constantly change the global property for the sound elevation.
* token_gen.nvgt can now generate different token types, see the `token_gen_flag` enum.
* Add string::is_whitespace method.
* Fix small memory leak in pathfinder due to not releasing callback data reference on path calculation failure.
Expand Down
6 changes: 4 additions & 2 deletions doc/src/manual/-Toolkit Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ This section contains options that are directly related to the compiling/bundlin
* mac_bundle = integer default 2: 0 no bundle, 1 .app, 2 .dmg/.zip, 3 both .app and .dmg/.zip
* no_success_message: specifically hides the compilation success message if defined
* output_basename = string default set from input filename: the output file or directory name of the final compiled package without an extension
* prebuild_command = string: a custom system command that will be executed before the build begins if set
* postbuild_command = string: a custom system command that will be executed after the build completes but before the success message
* precommand = string: a custom system command that will be executed before the build begins if no platform specific command is set
* `precommand_<platform>` = string: allows the execution of custom prebuild commands on a per-platform basis
* postcommand = string: a custom system command that will be executed after the build completes but before the success message
* `postcommand_<platform>` = string: allows the execution of custom postbuild commands on a per-platform basis
* product_identifier=string default com.NVGTUser.InputBasenameSlug: the reverse domain bundle identifier for your application (highly recommended to customize for mobile platforms, see compiling for distribution tutorial)
* product_identifier_domain = string defaults to com.NVGTUser: everything accept the final chunk of a reverse domain identifier (used only if build.product_identifier is default)
* product_name=string defaults to input file basename: human friendly display name of your application
Expand Down
4 changes: 2 additions & 2 deletions src/bundling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class nvgt_compilation_output_impl : public virtual nvgt_compilation_output {
stubpath = format("%snvgt_%s%s.bin", stubpath.toString(), platform, (stub != "" ? string("_") + stub : ""));
outpath = config.getString("build.output_basename", Path(input_file).setExtension("").toString());
alter_output_path(outpath);
string precommand = config.getString("build.precommand", "");
string precommand = config.getString("build.precommand_" + g_platform, config.getString("build.precommand", ""));
if (!precommand.empty()) {
set_status("executing prebuild command...");
if (!user_command(precommand)) throw Exception("prebuild command failed");
Expand Down Expand Up @@ -183,7 +183,7 @@ class nvgt_compilation_output_impl : public virtual nvgt_compilation_output {
fs.close();
finalize_product(outpath);
output_file = outpath.toString();
string postcommand = config.getString("build.postcommand", "");
string postcommand = config.getString("build.postcommand_" + g_platform, config.getString("build.postcommand", ""));
if (!postcommand.empty()) {
set_status("executing postbuild command...");
if (!user_command(postcommand)) throw Exception("postbuild command failed");
Expand Down

0 comments on commit daeb68c

Please sign in to comment.