From: Chris Koeritz Date: Sat, 4 Jun 2022 22:48:59 +0000 (-0400) Subject: updates to fix bundler on win32 X-Git-Tag: 2.140.136^2~41 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=997f97dd6f7d7c6ba0d70d2dd09c2fa4f17e8efd;p=feisty_meow.git updates to fix bundler on win32 needed to get rid of variable flags including forward slash, which totally conflicted with paths using forward slash, and caused mayhem. --- diff --git a/nucleus/applications/bundler/bundle_creator.cpp b/nucleus/applications/bundler/bundle_creator.cpp index b8e2fceb..9313883f 100644 --- a/nucleus/applications/bundler/bundle_creator.cpp +++ b/nucleus/applications/bundler/bundle_creator.cpp @@ -192,6 +192,9 @@ int bundle_creator::execute() BASE_LOG(astring("starting file bundling at ") + time_stamp::notarize(false)); command_line cmds(_global_argc, _global_argv); + +//BASE_LOG(astring("before starting, cmds has: ") + parser_bits::platform_eol_to_chars() + cmds.text_form()); + astring temp; if (cmds.get_value('?', temp)) return print_instructions(); if (cmds.get_value("?", temp)) return print_instructions(); diff --git a/nucleus/applications/bundler/makefile b/nucleus/applications/bundler/makefile index 7f317de8..64638c93 100644 --- a/nucleus/applications/bundler/makefile +++ b/nucleus/applications/bundler/makefile @@ -12,6 +12,7 @@ include variables.def # hopefully this approach of having a neutral outer # maker will get rid of that broken behavior. +PROJECT = bundler_app LAST_TARGETS = maker OTHER_CLEANS = breaker diff --git a/nucleus/library/application/command_line.cpp b/nucleus/library/application/command_line.cpp index f132867f..ea3d28d5 100644 --- a/nucleus/library/application/command_line.cpp +++ b/nucleus/library/application/command_line.cpp @@ -25,9 +25,6 @@ #include #include -#include -//temp - #undef LOG #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) @@ -70,17 +67,9 @@ command_parameter &command_parameter::operator = ////////////// // option_prefixes: the list of valid prefixes for options on a command line. -// these are the characters that precede command line arguments. For Unix, -// the default is a dash (-), while for DOS most programs use forward-slash -// (/). Adding more characters is trivial; just add a character to the list -// before the sentinel of '\0'. -#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__WIN32__) - static char option_prefixes[] = { '-', '/', '\0' }; -#elif defined(__UNIX__) - static char option_prefixes[] = { '-', '\0' }; -#else - #error "I don't know what kind of operating system this is." -#endif +// these are the characters that precede command line arguments. we have +// dropped any but the linux default of dash ('-'). +static char option_prefixes[] = { '-', '\0' }; bool it_is_a_prefix_char(char to_test) { @@ -121,10 +110,11 @@ command_line::command_line(const astring &full_line) astring accumulator; string_array string_list; bool in_quote = false; -//hmmm: this is not quote right yet. +//hmmm: this is not quite right yet. // use the separate command line method, but get it to run iteratively // so we can keep pulling them apart? maybe it already does! // separate is better because it handles escaped quotes. +//hmmm: does above complaint parse? what's not right yet? for (int i = 0; i < full_line.length(); i++) { char to_examine = full_line.get(i); if (to_examine == '"') {