diff --git a/.ecode/project_build.json b/.ecode/project_build.json index 162193d2c..4e956475c 100644 --- a/.ecode/project_build.json +++ b/.ecode/project_build.json @@ -1,5 +1,5 @@ { - "ecode": { + "ecode-linux": { "build": [ { "args": "--with-debug-symbols gmake", @@ -39,7 +39,42 @@ "build_dir": "${project_root}/make/${os}" } }, - "eepp": { + "ecode-macos": { + "build": [ + { + "args": "config=${build_type} ecode", + "command": "${build_dir}/make_no_fw.sh", + "working_dir": "${build_dir}" + } + ], + "build_types": [ + "debug", + "release" + ], + "clean": [ + { + "args": "config=${build_type} clean", + "command": "${build_dir}/make_no_fw.sh", + "working_dir": "${build_dir}" + } + ], + "config": { + "clear_sys_env": false + }, + "os": [ + "macos" + ], + "output_parser": { + "config": { + "preset": "generic", + "relative_file_paths": true + } + }, + "var": { + "build_dir": "${project_root}/projects/${os}" + } + }, + "eepp-linux": { "build": [ { "args": "--with-debug-symbols gmake", @@ -78,5 +113,40 @@ "var": { "build_dir": "${project_root}/make/${os}" } + }, + "eepp-macos": { + "build": [ + { + "args": "config=${build_type}", + "command": "${build_dir}/make_no_fw.sh", + "working_dir": "${build_dir}" + } + ], + "build_types": [ + "debug", + "release" + ], + "clean": [ + { + "args": "config=${build_type} clean", + "command": "${build_dir}/make_no_fw.sh", + "working_dir": "${build_dir}" + } + ], + "config": { + "clear_sys_env": false + }, + "os": [ + "macos" + ], + "output_parser": { + "config": { + "preset": "generic", + "relative_file_paths": true + } + }, + "var": { + "build_dir": "${project_root}/projects/${os}" + } } } \ No newline at end of file diff --git a/src/tools/ecode/projectbuild.cpp b/src/tools/ecode/projectbuild.cpp index d1f187031..6f6db54ed 100644 --- a/src/tools/ecode/projectbuild.cpp +++ b/src/tools/ecode/projectbuild.cpp @@ -781,16 +781,24 @@ void ProjectBuildManager::runBuild( const std::string& buildName, const std::str continue; } + if ( progressFn ) { + progressFn( + progress, + Sys::getDateTimeStr() + ": " + + String::format( i18n( "starting_process", "Starting %s %s\n" ).toUtf8().c_str(), + cmd.cmd.c_str(), cmd.args.c_str() ), + nullptr ); + + progressFn( + progress, + Sys::getDateTimeStr() + ": " + + String::format( i18n( "working_dir_at", "Working Dir %s\n" ).toUtf8().c_str(), + cmd.workingDir.c_str() ), + nullptr ); + } + if ( mProcess->create( cmd.cmd, cmd.args, options, toUnorderedMap( env ), cmd.workingDir ) ) { - if ( progressFn ) - progressFn( progress, - Sys::getDateTimeStr() + ": " + - String::format( - i18n( "starting_process", "Starting %s %s\n" ).toUtf8().c_str(), - cmd.cmd.c_str(), cmd.args.c_str() ), - nullptr ); - std::string buffer( 1024, '\0' ); unsigned bytesRead = 0; int returnCode; diff --git a/src/tools/ecode/statusbuildoutputcontroller.cpp b/src/tools/ecode/statusbuildoutputcontroller.cpp index 2a692ccb9..427ee5726 100644 --- a/src/tools/ecode/statusbuildoutputcontroller.cpp +++ b/src/tools/ecode/statusbuildoutputcontroller.cpp @@ -203,6 +203,18 @@ void StatusBuildOutputController::runBuild( const std::string& buildName, enableCleanButton = true; } + const auto updateBuildButton = [this, enableCleanButton]() { + UIPushButton* buildButton = getBuildButton( mApp ); + if ( buildButton ) + buildButton->setText( mApp->i18n( "build", "Build" ) ); + + if ( enableCleanButton ) { + UIPushButton* cleanButton = getCleanButton( mApp ); + if ( cleanButton ) + cleanButton->setEnabled( true ); + } + }; + auto res = pbm->build( buildName, [this]( const auto& key, const auto& def ) { return mApp->i18n( key, def ); }, buildType, @@ -230,7 +242,7 @@ void StatusBuildOutputController::runBuild( const std::string& buildName, } } while ( !buffer.empty() ); }, - [this, enableCleanButton]( auto exitCode, const ProjectBuildCommand* cmd ) { + [this, updateBuildButton]( auto exitCode, const ProjectBuildCommand* cmd ) { if ( !mCurLineBuffer.empty() && nullptr != cmd ) searchFindAndAddStatusResult( mPatternHolder, mCurLineBuffer, cmd ); String buffer; @@ -250,15 +262,7 @@ void StatusBuildOutputController::runBuild( const std::string& buildName, mBuildOutput->setScrollY( mBuildOutput->getMaxScroll().y ); } ); - UIPushButton* buildButton = getBuildButton( mApp ); - if ( buildButton ) - buildButton->setText( mApp->i18n( "build", "Build" ) ); - - if ( enableCleanButton ) { - UIPushButton* cleanButton = getCleanButton( mApp ); - if ( cleanButton ) - cleanButton->setEnabled( true ); - } + updateBuildButton(); if ( !mApp->getWindow()->hasFocus() ) mApp->getWindow()->flash( WindowFlashOperation::UntilFocused ); @@ -266,6 +270,7 @@ void StatusBuildOutputController::runBuild( const std::string& buildName, if ( !res.isValid() ) { mApp->getNotificationCenter()->addNotification( res.errorMsg ); + updateBuildButton(); } } diff --git a/src/tools/ecode/uibuildsettings.cpp b/src/tools/ecode/uibuildsettings.cpp index 2bf145f62..4624773ee 100644 --- a/src/tools/ecode/uibuildsettings.cpp +++ b/src/tools/ecode/uibuildsettings.cpp @@ -437,7 +437,7 @@ UIBuildSettings::UIBuildSettings( auto panelBuildNameDDL = getUISceneNode() ->getRoot() - ->querySelector( " #build_tab #build_list" ) + ->querySelector( "#build_tab_view #build_list" ) ->asType(); buildNameInput->on( Event::OnValueChange, [this, panelBuildNameDDL]( auto ) { @@ -495,7 +495,7 @@ UIBuildSettings::UIBuildSettings( auto buildTypeDropDown = find( "build_type_list" ); auto panelBuildTypeDDL = getUISceneNode() ->getRoot() - ->querySelector( "#build_tab #build_type_list" ) + ->querySelector( "#build_tab_view #build_type_list" ) ->asType(); std::vector buildTypes;