diff --git a/docs/changelog.txt b/docs/changelog.txt index 22f7a0c..03c415d 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,3 +1,5 @@ +- Fixed a bug that the execution button still says "processing" after getting errors. + ver 0.6.3 - Supported Unix-like systems (FreeBSD, Haiku, etc). - Added URL validation for safety. diff --git a/license.txt b/license.txt index 3811178..89b89a0 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2023 matyalatte +Copyright (c) 2022-2024 matyalatte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/meson.build b/meson.build index b5c7f73..8a0da3f 100644 --- a/meson.build +++ b/meson.build @@ -32,9 +32,11 @@ if tuw_OS == 'windows' tuw_link_args = [ '/LARGEADDRESSAWARE', '/INCREMENTAL:NO', - '/MANIFEST:NO', '/ENTRY:wmainCRTStartup' ] + if meson.version().version_compare('<1.4.0') + tuw_link_args += ['/MANIFEST:NO'] + endif if (get_option('optimization') == 's') tuw_cpp_args += ['/Os'] diff --git a/src/main_frame.cpp b/src/main_frame.cpp index 4edba2c..8f7bd2b 100644 --- a/src/main_frame.cpp +++ b/src/main_frame.cpp @@ -384,14 +384,6 @@ std::string MainFrame::GetCommand() { } void MainFrame::RunCommand() { - char* text = uiButtonText(m_run_button); - uiButtonSetText(m_run_button, "Processing..."); -#ifdef __APPLE__ - uiMainStep(1); -#elif defined(__TUW_UNIX__) - uiUnixWaitEvents(); -#endif - std::string cmd = GetCommand(); PrintFmt("[RunCommand] Command: %s\n", cmd.c_str()); @@ -402,7 +394,15 @@ void MainFrame::RunCommand() { "Command: " + cmd; ShowSuccessDialog(msg, "Safe Mode"); } else { + char* text = uiButtonText(m_run_button); + uiButtonSetText(m_run_button, "Processing..."); + #ifdef __APPLE__ + uiMainStep(1); + #elif defined(__TUW_UNIX__) + uiUnixWaitEvents(); + #endif ExecuteResult result = Execute(cmd); + uiButtonSetText(m_run_button, text); rapidjson::Value& sub_definition = m_definition["gui"][m_definition_id]; bool check_exit_code = json_utils::GetBool(sub_definition, "check_exit_code", false); @@ -432,8 +432,6 @@ void MainFrame::RunCommand() { ShowSuccessDialog("Success!"); } } - - uiButtonSetText(m_run_button, text); } // read gui_definition.json