Skip to content
Browse files

* Added support for --basename (Thanks Ryan!).

 * Added partial support for --version (output only, no regex matching like *nix one).
  • Loading branch information...
1 parent 86de07e commit a5185c3df39aca3b5245615e9d3541f0224a753a takeshimiya committed Dec 21, 2006
Showing with 38 additions and 13 deletions.
  1. +38 −13 wx-config-win.cpp
View
51 wx-config-win.cpp
@@ -266,7 +266,9 @@ class CmdLineOptions : public Options
keyExists("--unicode") ||
keyExists("--static") ||
keyExists("--universal") ||
- keyExists("--release") ||
+ keyExists("--release") ||
+ keyExists("--version") ||
+ keyExists("--basename") ||
keyExists("--cc") ||
keyExists("--cxx") ||
keyExists("--ld") ||
@@ -286,7 +288,7 @@ class CmdLineOptions : public Options
std::cerr << " --cflags Outputs all pre-processor and compiler flags.\n";
std::cerr << " --cxxflags Same as --cflags but for C++.\n";
std::cerr << " --rcflags Outputs all resource compiler flags. [UNTESTED]\n";
- std::cerr << " --libs Outputs all linker flags.\n";
+ std::cerr << " --libs Outputs all linker flags.\n";
std::cerr << std::endl;
std::cerr << " --debug[=yes|no] Uses a debug configuration if found.\n";
std::cerr << " --unicode[=yes|no] Uses an unicode configuration if found.\n";
@@ -296,7 +298,9 @@ class CmdLineOptions : public Options
std::cerr << " --compiler[=gcc,dmc,vc] Selects the compiler.\n";
// std::cerr << " --variable=NAME Returns the value of a defined variable.\n";
// std::cerr << " --define-variable=NAME=VAL Sets a global value for a variable.\n";
- std::cerr << " --release Outputs the wxWidgets release number.\n";
+ std::cerr << " --release Outputs the wxWidgets release number.\n";
+ std::cerr << " --version Outputs the wxWidgets version.\n";
+ std::cerr << " --basename Outputs the base name of the wxWidgets libraries.\n";
std::cerr << " --cc Outputs the name of the C compiler.\n";
std::cerr << " --cxx Outputs the name of the C++ compiler.\n";
std::cerr << " --ld Outputs the linker command.\n";
@@ -1111,7 +1115,9 @@ class CompilerMinGW : public Compiler
po["rcflags"] += easyMode(addResIncludeDir(po["prefix"] + "\\samples"));
po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"];
- po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"];
+ po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"];
+ po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"];
+ po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"];
po["cc"] = m_programs.cc;
po["cxx"] = m_programs.cxx;
po["ld"] = m_programs.ld;
@@ -1412,7 +1418,9 @@ class CompilerDMC : public Compiler
po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"];
- po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"];
+ po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"];
+ po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"];
+ po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"];
po["cc"] = m_programs.cc;
po["cxx"] = m_programs.cxx;
po["ld"] = m_programs.ld;
@@ -1724,6 +1732,8 @@ class CompilerVC : public Compiler
po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"];
po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"];
+ po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"];
+ po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"];
po["cc"] = m_programs.cc;
po["cxx"] = m_programs.cxx;
po["ld"] = m_programs.ld;
@@ -1936,6 +1946,8 @@ class CompilerWAT : public Compiler
po["release"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"];
po["version"] = cfg["WXVER_MAJOR"] + "." + cfg["WXVER_MINOR"] + "." + cfg["WXVER_RELEASE"];
+ po["basename"] = "wx" + po["PORTNAME"] + po["WXUNIVNAME"] + po["WX_RELEASE_NODOT"];
+ po["basename"] += po["WXUNICODEFLAG"] + po["WXDEBUGFLAG"] + cfg["WX_LIB_FLAVOUR"];
po["cc"] = m_programs.cc;
po["cxx"] = m_programs.cxx;
po["ld"] = m_programs.ld;
@@ -2473,17 +2485,30 @@ void outputFlags(Options& po, const CmdLineOptions& cl)
if (cl.keyExists("--rcflags"))
std::cout << po["rcflags"] << std::endl;
if (cl.keyExists("--release"))
- std::cout << po["release"] << std::endl;
-
-#if 0 // not implemented
- if (cl.keyExists("--version"))
- std::cout << po["version"];
+ std::cout << po["release"];
+ if (cl.keyExists("--version"))
+ std::cout << po["version"];
+ if (cl.keyExists("--basename"))
+ std::cout << po["basename"];
+
+#if 0 // not implemented
+ if (cl.keyExists("--version=")) // incomplete
+ std::cout << po["version="];
+ if (cl.keyExists("--ld")) // incomplete
+ std::cout << po["ld"];
+ if (cl.keyExists("--rezflags"))
+ std::cout << po["rezflags"];
+ if (cl.keyExists("--linkdeps"))
+ std::cout << po["linkdeps"];
+ if (cl.keyExists("--version-full"))
+ std::cout << po["version-full"];
+ if (cl.keyExists("--exec-prefix="))
+ std::cout << po["exec-prefix="];
+ if (cl.keyExists("--toolkit"))
+ std::cout << po["toolkit"];
if (cl.keyExists("--list"))
std::cout << po["list"];
- if (cl.keyExists("--basename"))
- std::cout << po["basename"];
#endif
-
}
// -------------------------------------------------------------------------------------------------

0 comments on commit a5185c3

Please sign in to comment.
Something went wrong with that request. Please try again.