diff --git a/Makefile b/Makefile
index 2e7f814..ec597f1 100644
a
|
b
|
|
1 | 1 | MKDIR = mkdir -p |
2 | | prefix = /usr |
| 2 | prefix = @PREFIX@ |
3 | 3 | bindir = $(prefix)/bin |
4 | 4 | TOOLS = assistant \ |
5 | 5 | designer \ |
… |
… |
distclean: |
60 | 60 | |
61 | 61 | install: |
62 | 62 | cd src/qtchooser && $(MAKE) install |
63 | | for tool in $(TOOLS); do ln -sf qtchooser "$(INSTALL_ROOT)$(bindir)/$$tool"; done |
| 63 | for tool in $(TOOLS); do ln -sf qtchooser-mp "$(DESTDIR)$(bindir)/$$tool"; done |
64 | 64 | case `uname -s` in Darwin) \ |
65 | | for tool in $(MACTOOLS); do ln -sf qtchooser "$(INSTALL_ROOT)$(bindir)/$$tool"; done \ |
| 65 | for tool in $(MACTOOLS); do ln -sf qtchooser-mp "$(DESTDIR)$(bindir)/$$tool"; done \ |
66 | 66 | ;; esac |
67 | | $(MKDIR) $(INSTALL_ROOT)$(prefix)/share/man/man1 |
68 | | install -m 644 -p doc/qtchooser.1 $(INSTALL_ROOT)$(prefix)/share/man/man1 |
| 67 | $(MKDIR) $(DESTDIR)$(prefix)/share/man/man1 |
| 68 | install -m 644 -p doc/qtchooser.1 $(DESTDIR)$(prefix)/share/man/man1/qtchooser-mp.1 |
69 | 69 | |
70 | 70 | uninstall: |
71 | 71 | cd src/qtchooser && $(MAKE) uninstall |
72 | | -for tool in $(TOOLS); do rm -f "$(INSTALL_ROOT)$(bindir)/$$tool"; done |
| 72 | -for tool in $(TOOLS); do rm -f "$(DESTDIR)$(bindir)/$$tool"; done |
73 | 73 | case `uname -s` in Darwin) \ |
74 | | for tool in $(MACTOOLS); do rm -f "$(INSTALL_ROOT)$(bindir)/$$tool"; done \ |
| 74 | for tool in $(MACTOOLS); do rm -f "$(DESTDIR)$(bindir)/$$tool"; done \ |
75 | 75 | ;; esac |
76 | 76 | |
77 | 77 | tests/auto/Makefile: tests/auto/auto.pro |
diff --git a/src/qtchooser/Makefile b/src/qtchooser/Makefile
index 6ad619a..2384ec4 100644
a
|
b
|
|
1 | | prefix = /usr |
| 1 | prefix = @PREFIX@ |
2 | 2 | bindir = $(prefix)/bin |
3 | 3 | |
4 | 4 | ####### Compiler, tools and options |
… |
… |
MKDIR = mkdir -p |
12 | 12 | |
13 | 13 | SOURCES = main.cpp |
14 | 14 | OBJECTS = main.o |
15 | | TARGET = qtchooser |
| 15 | TARGET = qtchooser-mp |
16 | 16 | |
17 | 17 | OBJECTS_TEST = main-test.o |
18 | 18 | TARGET_TEST = test/qtchooser |
… |
… |
distclean: clean |
43 | 43 | -$(DEL_FILE) $(TARGET) $(TARGET_TEST) |
44 | 44 | |
45 | 45 | install: $(TARGET) |
46 | | $(MKDIR) "$(INSTALL_ROOT)$(bindir)" |
47 | | $(INSTALL_PROGRAM) $(TARGET) "$(INSTALL_ROOT)$(bindir)/$(TARGET)" |
| 46 | $(MKDIR) "$(DESTDIR)$(bindir)" |
| 47 | $(INSTALL_PROGRAM) $(TARGET) "$(DESTDIR)$(bindir)/$(TARGET)" |
48 | 48 | |
49 | 49 | uninstall: |
50 | | -$(DEL_FILE) "$(INSTALL_ROOT)$(bindir)/$(TARGET)" |
| 50 | -$(DEL_FILE) "$(DESTDIR)$(bindir)/$(TARGET)" |
51 | 51 | |
52 | 52 | |
53 | 53 | ####### Compile |
diff --git a/src/qtchooser/main.cpp b/src/qtchooser/main.cpp
index d028ee6..3468f97 100644
a
|
b
|
|
82 | 82 | |
83 | 83 | using namespace std; |
84 | 84 | |
85 | | static const char myName[] = "qtchooser" EXE_SUFFIX; |
| 85 | static const char myName[] = "qtchooser-mp" EXE_SUFFIX; |
86 | 86 | static const char confSuffix[] = ".conf"; |
87 | 87 | |
88 | 88 | static const char *argv0; |
… |
… |
private: |
152 | 152 | int ToolWrapper::printHelp() |
153 | 153 | { |
154 | 154 | puts("Usage:\n" |
155 | | " qtchooser { -l | -list-versions | -print-env }\n" |
156 | | " qtchooser -install [-f] [-local] <name> <path-to-qmake>\n" |
157 | | " qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]\n" |
| 155 | " qtchooser-mp { -l | -list-versions | -print-env }\n" |
| 156 | " qtchooser-mp -install [-f] [-local] <name> <path-to-qmake>\n" |
| 157 | " qtchooser-mp -run-tool=<tool name> [-qt=<Qt version>] [program arguments]\n" |
158 | 158 | " <executable name> [-qt=<Qt version>] [program arguments]\n" |
159 | 159 | "\n" |
160 | 160 | "Environment variables accepted:\n" |
… |
… |
vector<string> ToolWrapper::searchPaths() const |
454 | 454 | paths.push_back(localDir); |
455 | 455 | |
456 | 456 | // search the XDG config location directories |
457 | | vector<string> xdgPaths = stringSplit(qgetenv("XDG_CONFIG_DIRS", "/etc/xdg").c_str()); |
| 457 | vector<string> xdgPaths = stringSplit(qgetenv("XDG_MACPORTS_CONFIG_DIRS", "@PREFIX@/etc/xdg").c_str()); |
458 | 458 | paths.insert(paths.end(), xdgPaths.begin(), xdgPaths.end()); |
459 | 459 | |
460 | 460 | #if defined(QTCHOOSER_GLOBAL_DIR) |
… |
… |
vector<string> ToolWrapper::searchPaths() const |
465 | 465 | #endif |
466 | 466 | |
467 | 467 | for (vector<string>::iterator it = paths.begin(); it != paths.end(); ++it) |
468 | | *it += "/qtchooser/"; |
| 468 | *it += "/qtchooser-mp/"; |
469 | 469 | |
470 | 470 | return paths; |
471 | 471 | } |
diff --git a/src/qtchooser/qtchooser.pro b/src/qtchooser/qtchooser.pro
index 6037e5c..fce3942 100644
a
|
b
|
TEMPLATE = app |
2 | 2 | DESTDIR = ../../bin |
3 | 3 | CONFIG -= qt |
4 | 4 | SOURCES += main.cpp Makefile |
| 5 | TARGET = qtchooser-mp |
5 | 6 | |
6 | 7 | error("This .pro file is not meant to be used to build") |
diff --git a/doc/qtchooser.1 b/doc/qtchooser.1
index 4c9bb83..5e8572e 100644
a
|
b
|
|
1 | 1 | .TH QTCHOOSER 1 "JANUARY 2, 2013" |
2 | 2 | .\" Please adjust this date whenever revising the manpage. |
3 | 3 | .SH NAME |
4 | | qtchooser \- a wrapper used to select between Qt development binary versions |
| 4 | qtchooser-mp \- a wrapper used to select between Qt development binary versions |
5 | 5 | .SH SYNOPSIS |
6 | | .B qtchooser |
| 6 | .B qtchooser-mp |
7 | 7 | \fB\-list\-versions\fR |
8 | 8 | .br |
9 | | .B qtchooser |
| 9 | .B qtchooser-mp |
10 | 10 | \fB\-print\-env\fR [\fB\-qt=\fIversion\fR] |
11 | 11 | .br |
12 | | .B qtchooser |
| 12 | .B qtchooser-mp |
13 | 13 | \fB\-run\-tool=\fItool\fR [\fB\-qt=\fIversion\fR] [\fIprogram_arguments\fR] |
14 | 14 | .br |
15 | 15 | .B <executable_name> |
… |
… |
or local Qt builds are to be used. |
26 | 26 | It is commonly used via a symlink from an \fIexecutable_name\fR like qmake. |
27 | 27 | .SH OPTIONS |
28 | 28 | The options which apply to the |
29 | | \fBqtchooser\fR |
| 29 | \fBqtchooser-mp\fR |
30 | 30 | command are: |
31 | 31 | .PP |
32 | 32 | \fB\-list\-versions\fR |
… |
… |
Runs the selected \fItool\fR. |
51 | 51 | .SH ENVIRONMENT |
52 | 52 | .TP |
53 | 53 | .B QTCHOOSER_NO_GLOBAL_DIR |
54 | | If qtchooser has been built with \fBQTCHOOSER_GLOBAL_DIR\fR (predefined search |
55 | | paths for qtchooser's configuration files, useful in some distros), setting this |
| 54 | If qtchooser-mp has been built with \fBQTCHOOSER_GLOBAL_DIR\fR (predefined search |
| 55 | paths for qtchooser-mp's configuration files, useful in some distros), setting this |
56 | 56 | variable will override its effect. |
57 | 57 | .RE |
58 | 58 | .TP |
59 | 59 | .B QT_SELECT |
60 | 60 | Same as \fB\-qt=\fIversion\fR. If set, the selected configuration is used and binaries |
61 | | symlinked to qtchooser will be executed without additional parameters. |
| 61 | symlinked to qtchooser-mp will be executed without additional parameters. |
62 | 62 | .RE |
63 | 63 | .TP |
64 | 64 | .B XDG_CONFIG_HOME |
… |
… |
Used as specified in |
68 | 68 | <\fBhttp://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html\fR> |
69 | 69 | .SH FILES |
70 | 70 | .TP |
71 | | .I /etc/xdg/qtchooser/*.conf |
| 71 | .I <MacPorts prefix>/etc/xdg/qtchooser-mp/*.conf |
72 | 72 | System-wide configuration files. Each has two lines, the first is the path |
73 | 73 | to the binaries and the second is the path to the Qt libraries. If a |
74 | 74 | \fIdefault.conf\fR is provided, the settings from it will be automatically |
75 | | used in case nothing else is selected. |
| 75 | used in case nothing else is selected. \fI<MacPorts prefix>\fR is the location |
| 76 | where you installed MacPorts, typically \fI/opt/local\fR. |
76 | 77 | .TP |
77 | | .I \fB$HOME\fP/.config/qtchooser/*.conf |
| 78 | .I \fB$HOME\fP/.config/qtchooser-mp/*.conf |
78 | 79 | User configuration files. |
79 | 80 | |
80 | 81 | .SH AUTHOR |
81 | | qtchooser was written by Thiago Macieira from Intel. |
| 82 | qtchooser-mp was written by Thiago Macieira from Intel. |
82 | 83 | .PP |
83 | 84 | This manual page was written by Timo Jyrinki <timo@debian.org>, |
84 | 85 | for the Debian project (but may be used by others). |