Skip to content

Commit

Permalink
Merge branch 'develop' into debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
SpartanJ committed Jan 12, 2025
2 parents b340fcb + ef7908f commit 75ba896
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/assets/i18n/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ File path is: </string>
<string name="custom_variables">Custom Variables</string>
<string name="custom_variables_desc">Custom Variables allow to simplify the build commands steps adding custom variables that can be used over the build settings in commands, arguments, and working directories.</string>
<string name="custom_variables_desc_2">Custom Variables can be invoked using ${variable_name} in any of the commands.</string>
<string name="custom_variables_desc_3">There are predefined custom variables available to use:&amp;#10;${project_root}: The folder / project root directory.&amp;#10;${build_type}: The build type selected to build the project.&amp;#10;${os}: The current operating system name.&amp;#10;${nproc}: The number of logical processing units.&amp;#10;${current_doc}: The last or current focused document path.&amp;#10;${current_doc_name}: The last or current focused document name (without extension</string>
<string name="custom_variables_desc_3">There are predefined custom variables available to use:&#10;${project_root}: The folder / project root directory.&#10;${build_type}: The build type selected to build the project.&#10;${os}: The current operating system name.&#10;${arch}: The current operating architecture.&#10;${nproc}: The number of logical processing units.&#10;${current_doc}: The last or current focused document path.&#10;${current_doc_name}: The last or current focused document name (without extension).&#10;${current_doc_dir}: The last or current focused document directory.</string>
<string name="cut">Cut</string>
<string name="dark">Dark</string>
<string name="date">Date</string>
Expand Down
3 changes: 3 additions & 0 deletions src/tools/ecode/projectbuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static const char* VAR_ARCH = "${arch}";
static const char* VAR_NPROC = "${nproc}";
static const char* VAR_CURRENT_DOC = "${current_doc}";
static const char* VAR_CURRENT_DOC_NAME = "${current_doc_name}";
static const char* VAR_CURRENT_DOC_DIR = "${current_doc_dir}";

static void replaceVar( ProjectBuildStep& s, const std::string& var, const std::string& val ) {
static std::string slashDup = FileSystem::getOSSlash() + FileSystem::getOSSlash();
Expand Down Expand Up @@ -382,11 +383,13 @@ void ProjectBuildManager::replaceDynamicVars( ProjectBuildCommand& cmd ) {
std::string curDoc = getCurrentDocument();
std::string curDocName =
FileSystem::fileRemoveExtension( FileSystem::fileNameFromPath( curDoc ) );
std::string curDocDir = FileSystem::fileRemoveFileName( curDoc );
replaceVar( cmd, VAR_OS, currentOS );
replaceVar( cmd, VAR_ARCH, Sys::getOSArchitecture() );
replaceVar( cmd, VAR_NPROC, nproc );
replaceVar( cmd, VAR_CURRENT_DOC, curDoc );
replaceVar( cmd, VAR_CURRENT_DOC_NAME, curDocName );
replaceVar( cmd, VAR_CURRENT_DOC_DIR, curDocDir );
if ( cmd.workingDir.empty() )
cmd.workingDir = mProjectRoot;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/ecode/uibuildsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ static const auto SETTINGS_PANEL_XML = R"xml(
<PushButton id="custom_var_del" icon="icon(delete-bin, 12dp)" min-width="20dp" tooltip="@string(del_custom_variable, Delete Selected Variable)" lg="center" />
</vbox>
</hbox>
<TextView class="span" lw="mp" lh="wc" word-wrap="true" text='@string(custom_variables_desc_3, There are predefined custom variables available to use:&#10;${project_root}: The folder / project root directory.&#10;${build_type}: The build type selected to build the project.&#10;${os}: The current operating system name.&#10;${arch}: The current operating architecture.&#10;${nproc}: The number of logical processing units.&#10;${current_doc}: The last or current focused document path.&#10;${current_doc_name}: The last or current focused document name (without extension).)' />
<TextView class="span" lw="mp" lh="wc" word-wrap="true" text='@string(custom_variables_desc_3, "There are predefined custom variables available to use:&#10;${project_root}: The folder / project root directory.&#10;${build_type}: The build type selected to build the project.&#10;${os}: The current operating system name.&#10;${arch}: The current operating architecture.&#10;${nproc}: The number of logical processing units.&#10;${current_doc}: The last or current focused document path.&#10;${current_doc_name}: The last or current focused document name (without extension).&#10;${current_doc_dir}: The last or current focused document directory.")' />
</vbox>
<vbox lw="mp" lh="wc" class="build_environment">
Expand Down

0 comments on commit 75ba896

Please sign in to comment.