Drop Qt 4 support
With this CL, --qtver configure option will be removed and Mozc no
longer supports to be built with Qt 4.
BUG=#327
TEST=
REF_BUG=26887740
REF_CL=141386550
REF_TIME=2016-12-08T11:43:38+09:00
REF_TIME_RAW=1481165018 +0900
Hiroyuki Komatsu
7 years ago
98 | 98 | If you don't specify this option, `--target_platform=Linux` will be used implicitly. |
99 | 99 | |
100 | 100 | #### --noqt (Linux desktop target only) |
101 | You can use `--noqt` option to build Mozc without depending on Qt 4 library. | |
101 | You can use `--noqt` option to build Mozc without depending on Qt 5 library. | |
102 | 102 | |
103 | 103 | #### --server_dir (Linux desktop target only) |
104 | 104 | You can use `--server_dir` option to specify the directory name where `mozc_server` will be installed. |
105 | 105 | |
106 | 106 | ## Compile options |
107 | In `build_mozc.py build` step, you can specify build types (`Release`` or `Debug`) and one or more build targets. Please find each GYP file to see what build targets are defined. | |
107 | In `build_mozc.py build` step, you can specify build types (`Release` or `Debug`) and one or more build targets. Please find each GYP file to see what build targets are defined. | |
108 | 108 | |
109 | 109 | ``` |
110 | 110 | python build_mozc.py build -c {Release, Debug} [gyp_path_1.gyp:gyp_target_name1] [gyp_path_2.gyp:gyp_target_name2] |
271 | 271 | parser.add_option('--gypdir', dest='gypdir', |
272 | 272 | help='Specifies the location of GYP to be used.') |
273 | 273 | parser.add_option('--noqt', action='store_true', dest='noqt', default=False) |
274 | parser.add_option('--qtver', dest='qtver', choices=('4', '5'), default='5') | |
275 | 274 | parser.add_option('--version_file', dest='version_file', |
276 | 275 | help='use the specified version template file', |
277 | 276 | default='data/version/mozc_version_template.bzl') |
504 | 503 | if options.noqt or options.target_platform in ['Android', 'NaCl']: |
505 | 504 | qt_version = '' |
506 | 505 | else: |
507 | qt_version = options.qtver | |
506 | qt_version = '5' | |
508 | 507 | GenerateVersionFile(template_path, version_path, options.target_platform, |
509 | 508 | options.android_application_id, |
510 | 509 | options.android_arch, qt_version) |
590 | 589 | gyp_options.extend(['-D', 'qt_dir=']) |
591 | 590 | |
592 | 591 | # Check if Qt libraries are installed. |
593 | if options.qtver == '5': | |
594 | system_qt_found = PkgExists('Qt5Core', 'Qt5Gui', 'Qt5Widgets') | |
595 | else: | |
596 | system_qt_found = PkgExists('QtCore >= 4.0', 'QtCore < 5.0', | |
597 | 'QtGui >= 4.0', 'QtGui < 5.0') | |
598 | if not system_qt_found: | |
592 | if not PkgExists('Qt5Core', 'Qt5Gui', 'Qt5Widgets'): | |
599 | 593 | PrintErrorAndExit('Qt is required to build GUI Tool. ' |
600 | 594 | 'Specify --noqt to skip building GUI Tool.') |
601 | 595 | |
605 | 599 | gyp_options.extend(['-D', 'qt_dir=%s' % os.path.abspath(options.qtdir)]) |
606 | 600 | else: |
607 | 601 | gyp_options.extend(['-D', 'qt_dir=']) |
608 | gyp_options.extend(['-D', 'qt_ver=%s' % options.qtver]) | |
609 | 602 | |
610 | 603 | if target_platform == 'Windows' and options.wix_dir: |
611 | 604 | gyp_options.extend(['-D', 'use_wix=YES']) |
772 | 765 | copy_script = os.path.join( |
773 | 766 | ABS_SCRIPT_DIR, 'build_tools', 'copy_dll_and_symbol.py') |
774 | 767 | copy_params = [] |
775 | if qt_version == '4': | |
776 | copy_params.append({ | |
777 | 'basenames': 'QtCored4;QtGuid4', | |
778 | 'dll_paths': abs_qt_bin_dir, | |
779 | 'pdb_paths': abs_qt_lib_dir, | |
780 | 'target_dir': os.path.join(abs_out_win_dir, 'DebugDynamic')}) | |
781 | copy_params.append({ | |
782 | 'basenames': 'QtCore4;QtGui4', | |
783 | 'dll_paths': abs_qt_bin_dir, | |
784 | 'pdb_paths': abs_qt_lib_dir, | |
785 | 'target_dir': os.path.join(abs_out_win_dir, 'ReleaseDynamic')}) | |
786 | elif qt_version == '5': | |
768 | if qt_version == '5': | |
787 | 769 | copy_params.append({ |
788 | 770 | 'basenames': 'Qt5Cored;Qt5Guid;Qt5Widgetsd', |
789 | 771 | 'dll_paths': abs_qt_bin_dir, |
47 | 47 | def ParseOption(): |
48 | 48 | """Parse command line options.""" |
49 | 49 | parser = optparse.OptionParser() |
50 | parser.add_option('--qtver', dest='qtver', choices=('4', '5'), default='4') | |
51 | 50 | parser.add_option('--qtdir', dest='qtdir') |
52 | 51 | parser.add_option('--target', dest='target') |
53 | 52 | |
79 | 78 | if not opt.target: |
80 | 79 | PrintErrorAndExit('--target option is mandatory.') |
81 | 80 | |
82 | qtver = opt.qtver | |
83 | 81 | qtdir = os.path.abspath(opt.qtdir) |
84 | 82 | target = os.path.abspath(opt.target) |
85 | 83 | |
86 | 84 | # Changes the reference to QtCore framework from the target application |
87 | # From: /path/to/qt/lib/QtCore.framework/Versions/4/QtCore | |
85 | # From: /path/to/qt/lib/QtCore.framework/Versions/5/QtCore | |
88 | 86 | # To: @executable_path/../../../MozcTool.app/Contents/Frameworks/... |
89 | qtcore_framework = GetFrameworkPath('QtCore', qtver) | |
87 | qtcore_framework = GetFrameworkPath('QtCore', '5') | |
90 | 88 | InstallNameTool(target, |
91 | 89 | '%s/lib/%s' % (qtdir, qtcore_framework), |
92 | 90 | GetReferenceTo(qtcore_framework)) |
93 | 91 | |
94 | 92 | # Changes the reference to QtGui framework from the target application |
95 | qtgui_framework = GetFrameworkPath('QtGui', qtver) | |
93 | qtgui_framework = GetFrameworkPath('QtGui', '5') | |
96 | 94 | InstallNameTool(target, |
97 | 95 | '%s/lib/%s' % (qtdir, qtgui_framework), |
98 | 96 | GetReferenceTo(qtgui_framework)) |
99 | 97 | |
100 | if qtver == '5': | |
101 | # Changes the reference to QtWidgets framework from the target application | |
102 | qtwidgets_framework = GetFrameworkPath('QtWidgets', '5') | |
103 | InstallNameTool(target, | |
104 | '%s/lib/%s' % (qtdir, qtwidgets_framework), | |
105 | GetReferenceTo(qtwidgets_framework)) | |
98 | # Changes the reference to QtWidgets framework from the target application | |
99 | qtwidgets_framework = GetFrameworkPath('QtWidgets', '5') | |
100 | InstallNameTool(target, | |
101 | '%s/lib/%s' % (qtdir, qtwidgets_framework), | |
102 | GetReferenceTo(qtwidgets_framework)) | |
106 | 103 | |
107 | 104 | # Change the reference to $(branding)Tool_lib from the target application |
108 | 105 | # From: @executable_path/../Frameworks/MozcTool_lib.framework/... |
48 | 48 | def ParseOption(): |
49 | 49 | """Parse command line options.""" |
50 | 50 | parser = optparse.OptionParser() |
51 | parser.add_option('--qtver', dest='qtver', choices=('4', '5'), default='4') | |
52 | 51 | parser.add_option('--qtdir', dest='qtdir') |
53 | 52 | parser.add_option('--target', dest='target') |
54 | 53 | |
112 | 111 | if not opt.target: |
113 | 112 | PrintErrorAndExit('--target option is mandatory.') |
114 | 113 | |
115 | qtver = opt.qtver | |
116 | 114 | qtdir = os.path.abspath(opt.qtdir) |
117 | 115 | target = os.path.abspath(opt.target) |
118 | 116 | |
119 | 117 | ref_to = '@executable_path/../../../ConfigDialog.app/Contents/Frameworks' |
120 | if qtver == '5': | |
121 | CopyQt(qtdir, 'QtCore', '5', target, copy_resources=True) | |
122 | CopyQt(qtdir, 'QtGui', '5', target, copy_resources=True) | |
123 | CopyQt(qtdir, 'QtWidgets', '5', target, copy_resources=True) | |
124 | CopyQt(qtdir, 'QtPrintSupport', '5', target, copy_resources=True) | |
125 | 118 | |
126 | ChangeReferences(qtdir, GetFrameworkPath('QtCore', '5'), | |
127 | '5', target, ref_to) | |
128 | ChangeReferences(qtdir, GetFrameworkPath('QtGui', '5'), | |
129 | '5', target, ref_to, | |
130 | references=['QtCore']) | |
131 | ChangeReferences(qtdir, GetFrameworkPath('QtWidgets', '5'), | |
132 | '5', target, ref_to, | |
133 | references=['QtCore', 'QtGui']) | |
134 | ChangeReferences(qtdir, GetFrameworkPath('QtPrintSupport', '5'), | |
135 | '5', target, ref_to, | |
136 | references=['QtCore', 'QtGui', 'QtWidgets']) | |
119 | CopyQt(qtdir, 'QtCore', '5', target, copy_resources=True) | |
120 | CopyQt(qtdir, 'QtGui', '5', target, copy_resources=True) | |
121 | CopyQt(qtdir, 'QtWidgets', '5', target, copy_resources=True) | |
122 | CopyQt(qtdir, 'QtPrintSupport', '5', target, copy_resources=True) | |
137 | 123 | |
138 | libqcocoa = 'QtCore.framework/Resources/plugins/platforms/libqcocoa.dylib' | |
139 | CopyFiles(['%s/plugins/platforms/libqcocoa.dylib' % qtdir], | |
140 | '%s/%s' % (target, libqcocoa)) | |
141 | ChangeReferences(qtdir, libqcocoa, '5', target, ref_to, | |
142 | references=['QtCore', 'QtGui', | |
143 | 'QtWidgets', 'QtPrintSupport']) | |
144 | else: | |
145 | CopyQt(qtdir, 'QtCore', '4', target) | |
146 | CopyQt(qtdir, 'QtGui', '4', target, copy_resources=True) | |
124 | ChangeReferences(qtdir, GetFrameworkPath('QtCore', '5'), | |
125 | '5', target, ref_to) | |
126 | ChangeReferences(qtdir, GetFrameworkPath('QtGui', '5'), | |
127 | '5', target, ref_to, | |
128 | references=['QtCore']) | |
129 | ChangeReferences(qtdir, GetFrameworkPath('QtWidgets', '5'), | |
130 | '5', target, ref_to, | |
131 | references=['QtCore', 'QtGui']) | |
132 | ChangeReferences(qtdir, GetFrameworkPath('QtPrintSupport', '5'), | |
133 | '5', target, ref_to, | |
134 | references=['QtCore', 'QtGui', 'QtWidgets']) | |
147 | 135 | |
148 | ChangeReferences(qtdir, GetFrameworkPath('QtCore', '4'), | |
149 | '4', target, ref_to) | |
150 | ChangeReferences(qtdir, GetFrameworkPath('QtGui', '4'), | |
151 | '4', target, ref_to, references=['QtCore']) | |
136 | libqcocoa = 'QtCore.framework/Resources/plugins/platforms/libqcocoa.dylib' | |
137 | CopyFiles(['%s/plugins/platforms/libqcocoa.dylib' % qtdir], | |
138 | '%s/%s' % (target, libqcocoa)) | |
139 | ChangeReferences(qtdir, libqcocoa, '5', target, ref_to, | |
140 | references=['QtCore', 'QtGui', | |
141 | 'QtWidgets', 'QtPrintSupport']) | |
152 | 142 | |
153 | 143 | |
154 | 144 | if __name__ == '__main__': |
29 | 29 | |
30 | 30 | MAJOR=2 |
31 | 31 | MINOR=20 |
32 | BUILD=2672 | |
32 | BUILD=2673 | |
33 | 33 | REVISION=102 |
34 | 34 | # This version represents the version of Mozc IME engine (converter, predictor, |
35 | 35 | # etc.). This version info is included both in the Mozc server and in the Mozc |
31 | 31 | #ifndef MOZC_GUI_ABOUT_DIALOG_ABOUT_DIALOG_H_ |
32 | 32 | #define MOZC_GUI_ABOUT_DIALOG_ABOUT_DIALOG_H_ |
33 | 33 | |
34 | #ifdef MOZC_USE_QT5 | |
35 | 34 | #include <QtWidgets/QDialog> |
36 | #else | |
37 | #include <QtGui/QDialog> | |
38 | #endif | |
39 | 35 | |
40 | 36 | #include <memory> |
41 | 37 |
26 | 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 | 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 | |
29 | #ifdef MOZC_USE_QT5 | |
30 | 29 | #include <QtGui/QGuiApplication> |
31 | #else | |
32 | #include <QtGui/QApplication> | |
33 | #endif | |
34 | 30 | #include <QtGui/QtGui> |
35 | 31 | #include "base/system_util.h" |
36 | 32 | #include "gui/about_dialog/about_dialog.h" |
28 | 28 | |
29 | 29 | #include "gui/administration_dialog/administration_dialog.h" |
30 | 30 | |
31 | #ifdef MOZC_USE_QT5 | |
32 | 31 | #include <QtWidgets/QMessageBox> |
33 | #else | |
34 | #include <QtGui/QMessageBox> | |
35 | #endif | |
32 | ||
36 | 33 | #include "base/run_level.h" |
37 | 34 | #include "config/stats_config_util.h" |
38 | 35 | #include "server/cache_service_manager.h" |
30 | 30 | #define MOZC_GUI_ADMINISTRATION_DIALOG_H_ |
31 | 31 | |
32 | 32 | #include <QtGui/QtGui> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QDialog> |
35 | #else | |
36 | #include <QtGui/QDialog> | |
37 | #endif | |
34 | ||
38 | 35 | #include <string> |
39 | 36 | #include "gui/administration_dialog/ui_administration_dialog.h" |
40 | 37 |
26 | 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 | 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 | |
29 | #ifdef MOZC_USE_QT5 | |
30 | 29 | #include <QtGui/QGuiApplication> |
31 | #else | |
32 | #include <QtGui/QApplication> | |
33 | #endif | |
34 | 30 | #include <QtGui/QtGui> |
31 | ||
35 | 32 | #include "base/system_util.h" |
36 | 33 | #include "gui/administration_dialog/administration_dialog.h" |
37 | 34 | #include "gui/base/locale_util.h" |
35 | 35 | namespace mozc { |
36 | 36 | namespace gui { |
37 | 37 | |
38 | #ifdef MOZC_USE_QT5 | |
39 | 38 | void DebugUtil::MessageHandler(QtMsgType type, |
40 | 39 | const QMessageLogContext &context, |
41 | 40 | const QString &q_msg) { |
56 | 55 | break; |
57 | 56 | } |
58 | 57 | } |
59 | #else // ! MOZC_USE_QT5 | |
60 | void DebugUtil::MessageHandler(QtMsgType type, const char *msg) { | |
61 | switch (type) { | |
62 | case QtDebugMsg: | |
63 | LOG(INFO) << msg; | |
64 | break; | |
65 | case QtWarningMsg: | |
66 | LOG(WARNING) << msg; | |
67 | break; | |
68 | case QtCriticalMsg: | |
69 | LOG(ERROR) << msg; | |
70 | break; | |
71 | case QtFatalMsg: | |
72 | LOG(FATAL) << msg; | |
73 | break; | |
74 | } | |
75 | } | |
76 | #endif // ! MOZC_USE_QT5 | |
77 | 58 | |
78 | 59 | } // namespace gui |
79 | 60 | } // namespace mozc |
32 | 32 | #define MOZC_GUI_BASE_DEBUG_UTIL_H_ |
33 | 33 | |
34 | 34 | #include <string> |
35 | #ifdef MOZC_USE_QT5 | |
36 | 35 | #include <QtGui/QGuiApplication> |
37 | #else | |
38 | #include <QtGui/QApplication> | |
39 | #endif | |
40 | 36 | |
41 | 37 | namespace mozc { |
42 | 38 | namespace gui { |
45 | 41 | public: |
46 | 42 | // Callback function used as a Qt message handler which is called when Qt |
47 | 43 | // message functions (qDebug, qWarning, qCritical and qFatal) are called. |
48 | #ifdef MOZC_USE_QT5 | |
49 | 44 | static void MessageHandler(QtMsgType type, |
50 | 45 | const QMessageLogContext &context, |
51 | 46 | const QString &q_msg); |
52 | #else | |
53 | static void MessageHandler(QtMsgType type, const char *msg); | |
54 | #endif | |
55 | 47 | |
56 | 48 | private: |
57 | 49 | DebugUtil() {} |
43 | 43 | #include <CommCtrl.h> // for CCSIZEOF_STRUCT |
44 | 44 | #endif |
45 | 45 | |
46 | #ifdef MOZC_USE_QT5 | |
47 | 46 | #include <QtGui/QGuiApplication> |
48 | #else | |
49 | #include <QtCore/QTextCodec> | |
50 | #include <QtGui/QApplication> | |
51 | #endif | |
52 | 47 | |
53 | 48 | #include <QtGui/QtGui> |
54 | 49 | #include <map> |
113 | 108 | if (loaded) { |
114 | 109 | qApp->installTranslator(&default_translator_); |
115 | 110 | } |
116 | ||
117 | #ifndef MOZC_USE_QT5 | |
118 | // Set default encoding for multi-byte string to be UTF8 | |
119 | QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); | |
120 | QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); | |
121 | #endif | |
122 | 111 | } |
123 | 112 | |
124 | 113 | void TranslationDataImpl::InstallTranslationMessageAndFont( |
28 | 28 | |
29 | 29 | #include "gui/base/table_util.h" |
30 | 30 | |
31 | #ifdef MOZC_USE_QT5 | |
32 | 31 | #include <QtWidgets/QTableWidget> |
33 | #else | |
34 | #include <QtGui/QTableWidget> | |
35 | #endif | |
36 | 32 | |
37 | 33 | namespace mozc { |
38 | 34 | namespace gui { |
28 | 28 | |
29 | 29 | #include <QtCore/QObject> |
30 | 30 | #include <QtCore/QString> |
31 | #ifdef MOZC_USE_QT5 | |
32 | 31 | #include <QtGui/QGuiApplication> |
33 | 32 | #include <QtWidgets/QApplication> |
34 | 33 | #include <QtWidgets/QWidget> |
35 | #else | |
36 | #include <QtGui/QApplication> | |
37 | #include <QtGui/QWidget> | |
38 | #endif | |
39 | 34 | |
40 | 35 | #include "base/version.h" |
41 | 36 | #include "gui/base/window_title_modifier.h" |
44 | 39 | namespace gui { |
45 | 40 | bool WindowTitleModifier::eventFilter(QObject *obj, |
46 | 41 | QEvent *event) { |
47 | #ifdef MOZC_USE_QT5 | |
48 | 42 | QWidget *w = QApplication::activeWindow(); |
49 | #else | |
50 | QWidget *w = qApp->activeWindow(); | |
51 | #endif | |
52 | 43 | if (w != NULL && obj != NULL && w == obj && |
53 | 44 | QEvent::WindowActivate == event->type() && |
54 | 45 | w->windowTitle().indexOf(prefix_) == -1) { |
30 | 30 | #include <windows.h> |
31 | 31 | #endif |
32 | 32 | |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtGui/QGuiApplication> |
35 | #else | |
36 | #include <QtGui/QApplication> | |
37 | #endif | |
38 | 34 | #include <QtCore/QFile> |
39 | 35 | |
40 | 36 | #include <memory> |
29 | 29 | #include "gui/character_pad/character_palette.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QMessageBox> |
34 | #else | |
35 | #include <QtGui/QMessageBox> | |
36 | #endif | |
37 | 33 | |
38 | 34 | #ifdef OS_WIN |
39 | 35 | #include <Windows.h> |
30 | 30 | #define MOZC_GUI_CHARACTER_PAD_CHARACTER_PALETTE_H_ |
31 | 31 | |
32 | 32 | #include <QtCore/QMap> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QMainWindow> |
35 | #else | |
36 | #include <QtGui/QMainWindow> | |
37 | #endif | |
38 | 34 | |
39 | 35 | #include <memory> |
40 | 36 |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | 32 | #include <QtCore/QTextCodec> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QToolTip> |
35 | #endif | |
36 | 34 | |
37 | 35 | #include "gui/character_pad/selection_handler.h" |
38 | 36 | #include "gui/character_pad/unicode_util.h" |
29 | 29 | #ifndef MOZC_GUI_CHARACTER_PAD_CHARACTER_PALETTE_TABLE_WIDGET_H_ |
30 | 30 | #define MOZC_GUI_CHARACTER_PAD_CHARACTER_PALETTE_TABLE_WIDGET_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QTableWidget> |
34 | #else | |
35 | #include <QtGui/QTableWidget> | |
36 | #endif | |
37 | 33 | |
38 | 34 | class QTextCodec; |
39 | 35 | class QTableWidgetItem; |
28 | 28 | |
29 | 29 | #include "gui/character_pad/hand_writing.h" |
30 | 30 | |
31 | #ifdef MOZC_USE_QT5 | |
32 | 31 | #ifdef ENABLE_CLOUD_HANDWRITING |
33 | 32 | #include <QtGui/QGuiApplication> |
34 | 33 | #endif // ENABLE_CLOUD_HANDWRITING |
34 | ||
35 | 35 | #include <QtGui/QtGui> |
36 | 36 | #include <QtWidgets/QMessageBox> |
37 | #else // ! MOZC_USE_QT5 | |
38 | #ifdef ENABLE_CLOUD_HANDWRITING | |
39 | #include <QtGui/QApplication> | |
40 | #endif // ENABLE_CLOUD_HANDWRITING | |
41 | #include <QtGui/QtGui> | |
42 | #include <QtGui/QMessageBox> | |
43 | #endif // ! MOZC_USE_QT5 | |
37 | ||
44 | 38 | #ifdef OS_WIN |
45 | 39 | #include <windows.h> |
46 | 40 | #include <windowsx.h> |
29 | 29 | #ifndef MOZC_GUI_CHARACTER_PAD_HAND_WRITING_H_ |
30 | 30 | #define MOZC_GUI_CHARACTER_PAD_HAND_WRITING_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QMainWindow> |
34 | #else | |
35 | #include <QtGui/QMainWindow> | |
36 | #endif | |
37 | 33 | |
38 | 34 | #include <memory> |
39 | 35 |
29 | 29 | #ifndef MOZC_GUI_CHARACTER_PAD_HAND_WRITING_CANVAS_H_ |
30 | 30 | #define MOZC_GUI_CHARACTER_PAD_HAND_WRITING_CANVAS_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QWidget> |
34 | #else | |
35 | #include <QtGui/QWidget> | |
36 | #endif | |
37 | 33 | #include <QtCore/QVector> |
38 | 34 | #include <QtCore/QPair> |
39 | 35 |
31 | 31 | // MutexLocker locks in the constructor and unlocks in the destructor. |
32 | 32 | #include <QtCore/QMutexLocker> |
33 | 33 | #include <QtGui/QtGui> |
34 | #ifdef MOZC_USE_QT5 | |
35 | 34 | #include <QtWidgets/QListWidgetItem> |
36 | #endif | |
37 | 35 | |
38 | 36 | #include "base/clock.h" |
39 | 37 | #include "base/logging.h" |
30 | 30 | |
31 | 31 | #include <QtCore/QStringList> |
32 | 32 | #include <QtGui/QtGui> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QToolTip> |
35 | #endif | |
36 | 34 | |
37 | 35 | #include "gui/character_pad/selection_handler.h" |
38 | 36 | #include "gui/character_pad/unicode_util.h" |
30 | 30 | #define MOZC_GUI_CHARACTER_PAD_RESULT_LIST_H_ |
31 | 31 | |
32 | 32 | #include <QtCore/QStringList> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QWidget> |
35 | 34 | #include <QtWidgets/QListWidget> |
36 | #else | |
37 | #include <QtGui/QWidget> | |
38 | #include <QtGui/QListWidget> | |
39 | #endif | |
40 | 35 | |
41 | 36 | namespace mozc { |
42 | 37 | namespace gui { |
28 | 28 | |
29 | 29 | #include "gui/character_pad/selection_handler.h" |
30 | 30 | |
31 | #ifdef MOZC_USE_QT5 | |
32 | 31 | #include <QtGui/QGuiApplication> |
33 | 32 | #include <QtGui/QClipboard> |
34 | 33 | #include <QtWidgets/QApplication> |
35 | 34 | #include <QtWidgets/QMessageBox> |
36 | #else | |
37 | #include <QtGui/QApplication> | |
38 | #include <QtGui/QClipboard> | |
39 | #include <QtGui/QMessageBox> | |
40 | #endif | |
41 | 35 | |
42 | 36 | #include "base/singleton.h" |
43 | 37 |
201 | 201 | } |
202 | 202 | |
203 | 203 | QString toHtmlEscaped(const QString &text) { |
204 | #ifdef MOZC_USE_QT5 | |
205 | 204 | return text.toHtmlEscaped(); |
206 | #else | |
207 | return Qt::escape(text); | |
208 | #endif | |
209 | 205 | } |
210 | 206 | } // namespace |
211 | 207 |
29 | 29 | #include "gui/config_dialog/character_form_editor.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QHeaderView> |
34 | #endif | |
35 | 33 | |
36 | 34 | #include <memory> |
37 | 35 |
29 | 29 | #ifndef MOZC_GUI_CONFIG_DIALOG_CHARACTER_FORM_EDITOR_H_ |
30 | 30 | #define MOZC_GUI_CONFIG_DIALOG_CHARACTER_FORM_EDITOR_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QTableWidget> |
34 | #else | |
35 | #include <QtGui/QTableWidget> | |
36 | #endif | |
37 | 33 | |
38 | 34 | #include <memory> |
39 | 35 |
29 | 29 | #include "gui/config_dialog/combobox_delegate.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QComboBox> |
34 | #else | |
35 | #include <QtGui/QComboBox> | |
36 | #endif | |
37 | 33 | |
38 | 34 | namespace mozc { |
39 | 35 | namespace gui { |
32 | 32 | #include <QtCore/QModelIndex> |
33 | 33 | #include <QtCore/QObject> |
34 | 34 | #include <QtCore/QStringList> |
35 | #ifdef MOZC_USE_QT5 | |
36 | 35 | #include <QtWidgets/QComboBox> |
37 | 36 | #include <QtWidgets/QItemDelegate> |
38 | #else | |
39 | #include <QtGui/QComboBox> | |
40 | #include <QtGui/QItemDelegate> | |
41 | #endif | |
42 | 37 | |
43 | 38 | class QMouseEvent; |
44 | 39 |
34 | 34 | #endif // OS_ANDROID || OS_NACL |
35 | 35 | |
36 | 36 | #ifdef OS_WIN |
37 | #ifdef MOZC_USE_QT5 | |
38 | 37 | #include <QtGui/QGuiApplication> |
39 | #else | |
40 | #include <QtGui/QApplication> | |
41 | #endif | |
42 | 38 | #include <windows.h> |
43 | 39 | #endif |
44 | 40 | |
45 | #ifdef MOZC_USE_QT5 | |
46 | 41 | #include <QtWidgets/QMessageBox> |
47 | #else | |
48 | #include <QtGui/QMessageBox> | |
49 | #endif | |
50 | 42 | |
51 | 43 | #include <algorithm> |
52 | 44 | #include <cstdlib> |
30 | 30 | |
31 | 31 | #include <QtCore/QStringList> |
32 | 32 | #include <QtCore/QTextCodec> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtGui/QtGui> |
35 | 34 | #include <QtWidgets/QApplication> |
36 | 35 | #include <QtWidgets/QDialog> |
37 | #else | |
38 | #include <QtGui/QApplication> | |
39 | #include <QtGui/QDialog> | |
40 | #include <QtGui/QtGui> | |
41 | #endif | |
36 | ||
42 | 37 | #include "base/system_util.h" |
43 | 38 | #include "gui/base/locale_util.h" |
44 | 39 | #include "gui/base/singleton_window_helper.h" |
29 | 29 | #include "gui/config_dialog/generic_table_editor.h" |
30 | 30 | |
31 | 31 | #include <QtCore/QFile> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtGui/QtGui> |
34 | 33 | #include <QtWidgets/QFileDialog> |
35 | 34 | #include <QtWidgets/QMenu> |
36 | 35 | #include <QtWidgets/QMessageBox> |
37 | #else | |
38 | #include <QtGui/QFileDialog> | |
39 | #include <QtGui/QtGui> | |
40 | #endif | |
41 | 36 | |
42 | 37 | #include <algorithm> // for unique |
43 | 38 | #include <cctype> |
120 | 115 | QAbstractItemView::SelectedClicked); |
121 | 116 | editorTableWidget->setSortingEnabled(true); |
122 | 117 | |
123 | #ifdef MOZC_USE_QT5 | |
124 | 118 | editorTableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); |
125 | #else | |
126 | editorTableWidget->verticalHeader()->setResizeMode(QHeaderView::Fixed); | |
127 | #endif | |
128 | 119 | editorTableWidget->verticalHeader()->setDefaultSectionSize( |
129 | 120 | GetTableHeight(editorTableWidget)); |
130 | 121 |
29 | 29 | #ifndef MOZC_GUI_CONFIG_DIALOG_GENERIC_TABLE_EDITOR_H_ |
30 | 30 | #define MOZC_GUI_CONFIG_DIALOG_GENERIC_TABLE_EDITOR_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QWidget> |
34 | #else | |
35 | #include <QtGui/QWidget> | |
36 | #endif | |
37 | 33 | #include <string> |
38 | 34 | #include "gui/config_dialog/ui_generic_table_editor.h" |
39 | 35 |
42 | 42 | #endif |
43 | 43 | |
44 | 44 | #include <QtCore/QString> |
45 | #ifdef MOZC_USE_QT5 | |
46 | 45 | #include <QtWidgets/QMessageBox> |
47 | 46 | #include <QtWidgets/QMenu> |
48 | 47 | #include <QtWidgets/QPushButton> |
49 | 48 | #include <QtWidgets/QTableWidget> |
50 | #else | |
51 | #include <QtGui/QMessageBox> | |
52 | #endif | |
53 | 49 | |
54 | 50 | #include "base/logging.h" |
55 | 51 | #include "base/util.h" |
287 | 283 | result_state = KeyBindingFilter::DENY_KEY; |
288 | 284 | } |
289 | 285 | |
290 | #ifdef MOZC_USE_QT5 | |
291 | 286 | const char key = modifier_required_key_.isEmpty() ? |
292 | 287 | 0 : modifier_required_key_[0].toLatin1(); |
293 | #else | |
294 | const char key = modifier_required_key_.isEmpty() ? | |
295 | 0 : modifier_required_key_[0].toAscii(); | |
296 | #endif | |
297 | 288 | |
298 | 289 | // Alt or Ctrl or these combinations |
299 | 290 | if ((alt_pressed_ || ctrl_pressed_) && |
30 | 30 | #define MOZC_GUI_CONFIG_DIALOG_KEYBINDING_EDITOR_H_ |
31 | 31 | |
32 | 32 | #include <QtGui/QtGui> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtGui/QGuiApplication> |
35 | #else | |
36 | #include <QtGui/QDialog> | |
37 | #endif | |
38 | 34 | |
39 | 35 | #include <memory> |
40 | 36 | #include <string> |
29 | 29 | #include "gui/config_dialog/keybinding_editor_delegate.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QPushButton> |
34 | #else | |
35 | #include <QtGui/QPushButton> | |
36 | #endif | |
37 | 33 | |
38 | 34 | #include <memory> |
39 | 35 |
31 | 31 | |
32 | 32 | #include <QtCore/QModelIndex> |
33 | 33 | #include <QtCore/QObject> |
34 | #ifdef MOZC_USE_QT5 | |
35 | 34 | #include <QtWidgets/QItemDelegate> |
36 | #else | |
37 | #include <QtGui/QItemDelegate> | |
38 | #endif | |
39 | 35 | |
40 | 36 | namespace mozc { |
41 | 37 | namespace gui { |
33 | 33 | #endif // OS_ANDROID || OS_NACL |
34 | 34 | |
35 | 35 | #include <QtCore/QFile> |
36 | #ifdef MOZC_USE_QT5 | |
37 | 36 | #include <QtGui/QtGui> |
38 | 37 | #include <QtWidgets/QFileDialog> |
39 | 38 | #include <QtWidgets/QMenu> |
40 | 39 | #include <QtWidgets/QMessageBox> |
41 | #else | |
42 | #include <QtGui/QFileDialog> | |
43 | #include <QtGui/QtGui> | |
44 | #endif | |
45 | 40 | |
46 | 41 | #include <algorithm> // for unique |
47 | 42 | #include <cctype> |
29 | 29 | #ifndef MOZC_GUI_CONFIG_DIALOG_KEYMAP_EDITOR_H_ |
30 | 30 | #define MOZC_GUI_CONFIG_DIALOG_KEYMAP_EDITOR_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QWidget> |
34 | #else | |
35 | #include <QtGui/QWidget> | |
36 | #endif | |
37 | 33 | |
38 | 34 | #include <memory> |
39 | 35 | #include <set> |
29 | 29 | #include "gui/config_dialog/roman_table_editor.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QMenu> |
34 | 33 | #include <QtWidgets/QMessageBox> |
35 | #endif | |
36 | 34 | |
37 | 35 | #include <cctype> |
38 | 36 | #include <memory> |
29 | 29 | #ifndef MOZC_GUI_CONFIG_DIALOG_ROMAN_TABLE_EDITOR_H_ |
30 | 30 | #define MOZC_GUI_CONFIG_DIALOG_ROMAN_TABLE_EDITOR_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QWidget> |
34 | #else | |
35 | #include <QtGui/QWidget> | |
36 | #endif | |
37 | 33 | |
38 | 34 | #include <memory> |
39 | 35 | #include <string> |
29 | 29 | #include "gui/confirmation_dialog/confirmation_dialog.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QAbstractButton> |
34 | 33 | #include <QtWidgets/QMessageBox> |
35 | #else | |
36 | #include <QtGui/QMessageBox> | |
37 | #endif | |
38 | 34 | |
39 | 35 | #include "base/flags.h" |
40 | 36 |
30 | 30 | #define MOZC_GUI_CONFIRMATION_DIALOG_H_ |
31 | 31 | |
32 | 32 | #include <QtCore/QObject> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QMessageBox> |
35 | #else | |
36 | #include <QtGui/QMessageBox> | |
37 | #endif | |
38 | 34 | |
39 | 35 | namespace mozc { |
40 | 36 | namespace gui { |
26 | 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 | 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 | |
29 | #ifdef MOZC_USE_QT5 | |
30 | 29 | #include <QtGui/QGuiApplication> |
31 | 30 | #include <QtGui/QtGui> |
32 | 31 | #include <QtWidgets/QApplication> |
33 | #else | |
34 | #include <QtGui/QApplication> | |
35 | #include <QtGui/QtGui> | |
36 | #endif | |
37 | 32 | |
38 | 33 | #include "base/flags.h" |
39 | 34 | #include "base/logging.h" |
29 | 29 | #ifndef MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_CONTENT_TABLE_WIDGET_H_ |
30 | 30 | #define MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_CONTENT_TABLE_WIDGET_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QTableWidget> |
34 | #else | |
35 | #include <QtGui/QTableWidget> | |
36 | #endif | |
37 | 33 | |
38 | 34 | namespace mozc { |
39 | 35 | namespace gui { |
34 | 34 | |
35 | 35 | #include <QtCore/QTimer> |
36 | 36 | #include <QtGui/QtGui> |
37 | #ifdef MOZC_USE_QT5 | |
38 | 37 | #include <QtWidgets/QProgressDialog> |
39 | 38 | #include <QtWidgets/QMessageBox> |
40 | 39 | #include <QtWidgets/QFileDialog> |
41 | 40 | #include <QtWidgets/QMenu> |
42 | 41 | #include <QtWidgets/QInputDialog> |
43 | 42 | #include <QtWidgets/QShortcut> |
44 | #else | |
45 | #include <QtGui/QProgressDialog> | |
46 | #endif | |
47 | 43 | |
48 | 44 | #ifdef OS_WIN |
49 | 45 | #include <Windows.h> |
393 | 389 | |
394 | 390 | // We fix the row height so that paint() is executed faster. |
395 | 391 | // This changes allows DictionaryTool handle about 1M words. |
396 | #ifdef MOZC_USE_QT5 | |
397 | 392 | dic_content_->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed); |
398 | #else | |
399 | dic_content_->verticalHeader()->setResizeMode(QHeaderView::Fixed); | |
400 | #endif | |
401 | 393 | dic_content_->verticalHeader()->setDefaultSectionSize( |
402 | 394 | GetTableHeight(dic_content_)); |
403 | 395 |
29 | 29 | #ifndef MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_TOOL_H_ |
30 | 30 | #define MOZC_GUI_DICTIONARY_TOOL_DICTIONARY_TOOL_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QLabel> |
34 | 33 | #include <QtWidgets/QPushButton> |
35 | 34 | #include <QtWidgets/QSplitterHandle> |
36 | 35 | #include <QtWidgets/QSplitter> |
37 | #else | |
38 | #include <QtGui/QLabel> | |
39 | #include <QtGui/QPushButton> | |
40 | #include <QtGui/QSplitterHandle> | |
41 | #include <QtGui/QSplitter> | |
42 | #endif | |
43 | 36 | |
44 | 37 | #include <memory> |
45 | 38 | #include <string> |
28 | 28 | |
29 | 29 | #include <QtCore/QTextCodec> |
30 | 30 | #include <QtCore/QTranslator> |
31 | #ifdef MOZC_USE_QT5 | |
32 | 31 | #include <QtGui/QGuiApplication> |
33 | #else | |
34 | #include <QtGui/QApplication> | |
35 | #endif | |
32 | ||
36 | 33 | #include <string> |
37 | 34 | #include "base/logging.h" |
38 | 35 | #include "base/system_util.h" |
29 | 29 | #include "gui/dictionary_tool/find_dialog.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QTableWidget> |
34 | 33 | #include <QtWidgets/QMessageBox> |
35 | #endif | |
36 | 34 | |
37 | 35 | #include "base/logging.h" |
38 | 36 |
29 | 29 | #ifndef MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_ |
30 | 30 | #define MOZC_GUI_DICTIONARY_TOOL_FIND_DIALOG_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QDialog> |
34 | #else | |
35 | #include <QtGui/QDialog> | |
36 | #endif | |
33 | ||
37 | 34 | #include "gui/dictionary_tool/ui_find_dialog.h" |
38 | 35 | |
39 | 36 | class QTableWidget; |
29 | 29 | #include "gui/dictionary_tool/import_dialog.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QFileDialog> |
34 | #endif | |
35 | 33 | |
36 | 34 | #include "base/util.h" |
37 | 35 | #include "dictionary/user_dictionary_storage.h" |
34 | 34 | #ifndef MOZC_GUI_DICTIONARY_TOOL_IMPORT_DIALOG_H_ |
35 | 35 | #define MOZC_GUI_DICTIONARY_TOOL_IMPORT_DIALOG_H_ |
36 | 36 | |
37 | #ifdef MOZC_USE_QT5 | |
38 | 37 | #include <QtWidgets/QDialog> |
39 | #else | |
40 | #include <QtGui/QDialog> | |
41 | #endif | |
38 | ||
42 | 39 | #include "dictionary/user_dictionary_importer.h" |
43 | 40 | #include "gui/dictionary_tool/ui_import_dialog.h" |
44 | 41 |
29 | 29 | #include "gui/dictionary_tool/zero_width_splitter.h" |
30 | 30 | |
31 | 31 | #include <QtGui/QtGui> |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QSplitter> |
34 | #else | |
35 | #include <QtGui/QSplitter> | |
36 | #endif | |
37 | 33 | |
38 | 34 | void ZeroWidthSplitterHandle::paintEvent(QPaintEvent *event) { |
39 | 35 | #ifdef OS_MACOSX |
29 | 29 | #ifndef MOZC_GUI_DICTIONARY_TOOL_ZERO_WIDTH_SPLITTER_H_ |
30 | 30 | #define MOZC_GUI_DICTIONARY_TOOL_ZERO_WIDTH_SPLITTER_H_ |
31 | 31 | |
32 | #ifdef MOZC_USE_QT5 | |
33 | 32 | #include <QtWidgets/QSplitter> |
34 | #else | |
35 | #include <QtGui/QSplitter> | |
36 | #endif | |
37 | 33 | |
38 | 34 | // Special QSplitter whose handle size is only 1px. |
39 | 35 | // This line is drawed with a proper colour corresponding to |
30 | 30 | |
31 | 31 | #include <QtCore/QTimer> |
32 | 32 | #include <QtGui/QtGui> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QAbstractButton> |
35 | 34 | #include <QtWidgets/QMessageBox> |
36 | #else | |
37 | #include <QtGui/QMessageBox> | |
38 | #endif | |
39 | 35 | |
40 | 36 | #include "base/flags.h" |
41 | 37 |
30 | 30 | #define MOZC_GUI_ERROR_MESSAGE_DIALOG_H_ |
31 | 31 | |
32 | 32 | #include <QtCore/QObject> |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtWidgets/QMessageBox> |
35 | #else | |
36 | #include <QtGui/QMessageBox> | |
37 | #endif | |
38 | 34 | |
39 | 35 | namespace mozc { |
40 | 36 | namespace gui { |
26 | 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 | 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 | |
29 | #ifdef MOZC_USE_QT5 | |
30 | 29 | #include <QtGui/QGuiApplication> |
31 | 30 | #include <QtGui/QtGui> |
32 | 31 | #include <QtWidgets/QApplication> |
33 | #else | |
34 | #include <QtGui/QApplication> | |
35 | #include <QtGui/QtGui> | |
36 | #endif | |
32 | ||
37 | 33 | #include "base/logging.h" |
38 | 34 | #include "base/process_mutex.h" |
39 | 35 | #include "base/system_util.h" |
1030 | 1030 | 'postbuild_name': 'Change the reference to frameworks.', |
1031 | 1031 | 'action': [ |
1032 | 1032 | 'python', '../build_tools/change_reference_mac.py', |
1033 | '--qtver', '<(qt_ver)', | |
1034 | 1033 | '--qtdir', '<(qt_dir)', |
1035 | 1034 | '--target', |
1036 | 1035 | '${BUILT_PRODUCTS_DIR}/GuiTool_lib.framework/Versions/A/GuiTool_lib', |
1278 | 1277 | ], |
1279 | 1278 | 'conditions': [ |
1280 | 1279 | ['use_qt=="YES"', { |
1281 | 'conditions': [ | |
1282 | ['qt_ver==5', { | |
1283 | 'mac_bundle_resources': ['../data/mac/qt.conf'], | |
1284 | }], | |
1285 | ], | |
1280 | 'mac_bundle_resources': ['../data/mac/qt.conf'], | |
1286 | 1281 | 'sources': [ |
1287 | 1282 | 'tool/mozc_tool_main.cc', |
1288 | 1283 | ], |
1297 | 1292 | 'postbuild_name': 'Change the reference to frameworks', |
1298 | 1293 | 'action': [ |
1299 | 1294 | 'python', '../build_tools/change_reference_mac.py', |
1300 | '--qtver', '<(qt_ver)', | |
1301 | 1295 | '--qtdir', '<(qt_dir)', |
1302 | 1296 | '--target', |
1303 | 1297 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)', |
1307 | 1301 | 'postbuild_name': 'Copy Qt frameworks to the frameworks directory.', |
1308 | 1302 | 'action': [ |
1309 | 1303 | 'python', '../build_tools/copy_qt_frameworks_mac.py', |
1310 | '--qtver', '<(qt_ver)', | |
1311 | 1304 | '--qtdir', '<(qt_dir)', |
1312 | 1305 | '--target', '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/Frameworks/', |
1313 | 1306 | ], |
34 | 34 | 'sources': [ |
35 | 35 | 'tool/mozc_tool_main.cc', |
36 | 36 | ], |
37 | 'conditions': [ | |
38 | ['qt_ver==5', { | |
39 | 'mac_bundle_resources': ['../data/mac/qt.conf'], | |
40 | }], | |
41 | ], | |
37 | 'mac_bundle_resources': ['../data/mac/qt.conf'], | |
42 | 38 | 'dependencies': [ |
43 | 39 | 'config_dialog_mac', |
44 | 40 | 'gen_mozc_tool_info_plist', |
49 | 45 | 'postbuild_name': 'Change the reference to frameworks', |
50 | 46 | 'action': [ |
51 | 47 | 'python', '../build_tools/change_reference_mac.py', |
52 | '--qtver', '<(qt_ver)', | |
53 | 48 | '--qtdir', '<(qt_dir)', |
54 | 49 | '--target', |
55 | 50 | '${BUILT_PRODUCTS_DIR}/<(product_name).app/Contents/MacOS/<(product_name)', |
30 | 30 | #include <windows.h> |
31 | 31 | #endif |
32 | 32 | |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtGui/QGuiApplication> |
35 | #else | |
36 | #include <QtGui/QApplication> | |
37 | #endif | |
38 | 34 | #include <QtGui/QtGui> |
35 | ||
39 | 36 | #include "base/logging.h" |
40 | 37 | #include "base/process_mutex.h" |
41 | 38 | #include "base/system_util.h" |
46 | 46 | 'AdditionalLibraryDirectories': [ |
47 | 47 | '<(qt_dir)/lib', |
48 | 48 | ], |
49 | 'conditions': [ | |
50 | ['qt_ver==5', { | |
51 | 'AdditionalDependencies': [ | |
52 | 'Qt5Cored.lib', | |
53 | 'Qt5Guid.lib', | |
54 | 'Qt5Widgetsd.lib', | |
55 | ], | |
56 | }, { | |
57 | 'AdditionalDependencies': [ | |
58 | 'QtCored4.lib', | |
59 | 'QtGuid4.lib', | |
60 | ], | |
61 | }], | |
49 | 'AdditionalDependencies': [ | |
50 | 'Qt5Cored.lib', | |
51 | 'Qt5Guid.lib', | |
52 | 'Qt5Widgetsd.lib', | |
62 | 53 | ], |
63 | 54 | }, |
64 | 55 | }, |
69 | 60 | 'AdditionalLibraryDirectories': [ |
70 | 61 | '<(qt_dir)/lib', |
71 | 62 | ], |
72 | 'conditions': [ | |
73 | ['qt_ver==5', { | |
74 | 'AdditionalDependencies': [ | |
75 | 'Qt5Core.lib', | |
76 | 'Qt5Gui.lib', | |
77 | 'Qt5Widgets.lib', | |
78 | ], | |
79 | }, { | |
80 | 'AdditionalDependencies': [ | |
81 | 'QtCore4.lib', | |
82 | 'QtGui4.lib', | |
83 | ], | |
84 | }], | |
63 | 'AdditionalDependencies': [ | |
64 | 'Qt5Core.lib', | |
65 | 'Qt5Gui.lib', | |
66 | 'Qt5Widgets.lib', | |
85 | 67 | ], |
86 | 68 | }, |
87 | 69 | }, |
103 | 85 | 'mac_framework_dirs': [ |
104 | 86 | '<(qt_dir)/lib', |
105 | 87 | ], |
106 | 'conditions': [ | |
107 | ['qt_ver==5', { | |
108 | 'libraries': [ | |
109 | '<(qt_dir)/lib/QtCore.framework', | |
110 | '<(qt_dir)/lib/QtGui.framework', | |
111 | '<(qt_dir)/lib/QtWidgets.framework', | |
112 | ] | |
113 | }, { | |
114 | 'libraries': [ | |
115 | '<(qt_dir)/lib/QtCore.framework', | |
116 | '<(qt_dir)/lib/QtGui.framework', | |
117 | ] | |
118 | }], | |
119 | ], | |
88 | 'libraries': [ | |
89 | '<(qt_dir)/lib/QtCore.framework', | |
90 | '<(qt_dir)/lib/QtGui.framework', | |
91 | '<(qt_dir)/lib/QtWidgets.framework', | |
92 | ] | |
120 | 93 | }, |
121 | 94 | }], |
122 | 95 | ], |
125 | 98 | ] |
126 | 99 | }], |
127 | 100 | ['target_platform=="Linux"', { |
128 | 'conditions': [ | |
129 | ['qt_ver==5', { | |
130 | 'cflags': ['<!@(pkg-config --cflags Qt5Widgets Qt5Gui Qt5Core)'], | |
131 | 'libraries': ['<!@(pkg-config --libs Qt5Widgets Qt5Gui Qt5Core)'], | |
132 | }, { | |
133 | 'cflags': ['<!@(pkg-config --cflags QtGui QtCore)'], | |
134 | 'libraries': ['<!@(pkg-config --libs QtGui QtCore)'], | |
135 | }], | |
136 | ], | |
101 | 'cflags': ['<!@(pkg-config --cflags Qt5Widgets Qt5Gui Qt5Core)'], | |
102 | 'libraries': ['<!@(pkg-config --libs Qt5Widgets Qt5Gui Qt5Core)'], | |
137 | 103 | }], |
138 | 104 | # Workarounds related with clang. |
139 | 105 | ['(_toolset=="target" and compiler_target=="clang") or ' |
33 | 33 | 'variables': { |
34 | 34 | 'conditions': [ |
35 | 35 | ['target_platform=="Linux"', { |
36 | 'conditions': [ | |
37 | ['qt_ver==5', { | |
38 | 'moc_path': '<!(pkg-config --variable=host_bins Qt5Core)/moc', | |
39 | }, { | |
40 | 'moc_path': '<!(pkg-config --variable=moc_location QtGui)', | |
41 | }], | |
42 | ], | |
36 | 'moc_path': '<!(pkg-config --variable=host_bins Qt5Core)/moc', | |
43 | 37 | }, 'qt_dir', { |
44 | 38 | 'moc_path': '<(qt_dir)/bin/moc<(EXECUTABLE_SUFFIX)', |
45 | 39 | }, { |
33 | 33 | 'variables': { |
34 | 34 | 'conditions': [ |
35 | 35 | ['target_platform=="Linux"', { |
36 | 'conditions': [ | |
37 | ['qt_ver==5', { | |
38 | 'rcc_path': '<!(pkg-config --variable=host_bins Qt5Core)/rcc', | |
39 | }, { | |
40 | # seems that --variable=rcc_location is not supported | |
41 | 'rcc_path': '<!(pkg-config --variable=exec_prefix QtGui)/bin/rcc', | |
42 | }], | |
43 | ], | |
36 | 'rcc_path': '<!(pkg-config --variable=host_bins Qt5Core)/rcc', | |
44 | 37 | }, 'qt_dir', { |
45 | 38 | 'rcc_path': '<(qt_dir)/bin/rcc<(EXECUTABLE_SUFFIX)', |
46 | 39 | }, { |
33 | 33 | 'variables': { |
34 | 34 | 'conditions': [ |
35 | 35 | ['target_platform=="Linux"', { |
36 | 'conditions': [ | |
37 | ['qt_ver==5', { | |
38 | 'uic_path': '<!(pkg-config --variable=host_bins Qt5Core)/uic', | |
39 | }, { | |
40 | 'uic_path': '<!(pkg-config --variable=uic_location QtGui)', | |
41 | }], | |
42 | ], | |
36 | 'uic_path': '<!(pkg-config --variable=host_bins Qt5Core)/uic', | |
43 | 37 | }, 'qt_dir', { |
44 | 38 | 'uic_path': '<(qt_dir)/bin/uic<(EXECUTABLE_SUFFIX)', |
45 | 39 | }, { |
30 | 30 | #include <windows.h> |
31 | 31 | #endif |
32 | 32 | |
33 | #ifdef MOZC_USE_QT5 | |
34 | 33 | #include <QtGui/QGuiApplication> |
35 | #else | |
36 | #include <QtGui/QApplication> | |
37 | #endif | |
38 | 34 | #include <QtGui/QtGui> |
35 | ||
39 | 36 | #include "base/logging.h" |
40 | 37 | #include "base/process_mutex.h" |
41 | 38 | #include "base/system_util.h" |
143 | 143 | } |
144 | 144 | |
145 | 145 | // install Qt debug handler |
146 | #ifdef MOZC_USE_QT5 | |
147 | 146 | qInstallMessageHandler(mozc::gui::DebugUtil::MessageHandler); |
148 | #else | |
149 | qInstallMsgHandler(mozc::gui::DebugUtil::MessageHandler); | |
150 | #endif | |
151 | 147 | |
152 | 148 | #ifdef OS_WIN |
153 | 149 | // Update JumpList if available. |
38 | 38 | #endif // OS_WIN |
39 | 39 | |
40 | 40 | #include <QtGui/QtGui> |
41 | #ifdef MOZC_USE_QT5 | |
42 | 41 | #include <QtWidgets/QMessageBox> |
43 | #endif | |
44 | 42 | #include <cstdlib> |
45 | 43 | #ifdef OS_WIN |
46 | 44 | #include <memory> // for std::unique_ptr |
87 | 85 | const DWORD num_copied = |
88 | 86 | ::GetEnvironmentVariable(wenvname.c_str(), buffer.get(), buffer_size); |
89 | 87 | if (num_copied > 0) { |
90 | #ifdef MOZC_USE_QT5 | |
91 | 88 | return QString::fromUtf16(buffer.get()); |
92 | #else | |
93 | return QString::fromWCharArray(buffer.get()); | |
94 | #endif | |
95 | 89 | } |
96 | 90 | return ""; |
97 | 91 | #endif // OS_WIN |
31 | 31 | |
32 | 32 | #include <QtCore/QString> |
33 | 33 | #include <QtGui/QtGui> |
34 | #ifdef MOZC_USE_QT5 | |
35 | 34 | #include <QtWidgets/QDialog> |
36 | #else | |
37 | #include <QtGui/QDialog> | |
38 | #endif | |
39 | 35 | |
40 | 36 | #include <memory> |
41 | 37 |
26 | 26 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 | 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 | |
29 | #ifdef MOZC_USE_QT5 | |
30 | 29 | #include <QtGui/QGuiApplication> |
31 | 30 | #include <QtWidgets/QDialog> |
32 | #else | |
33 | #include <QtGui/QApplication> | |
34 | #include <QtGui/QDialog> | |
35 | #endif | |
36 | 31 | #include <QtGui/QtGui> |
32 | ||
37 | 33 | #include "base/system_util.h" |
38 | 34 | #include "gui/base/locale_util.h" |
39 | 35 | #include "gui/base/singleton_window_helper.h" |
55 | 55 | # use_qt is 'YES' only if you want to use GUI binaries. |
56 | 56 | 'use_qt%': 'YES', |
57 | 57 | |
58 | # Qt version. It should be either of 4 or 5. | |
59 | 'qt_ver%' : '4', | |
60 | ||
61 | 58 | # use_libprotobuf represents if protobuf library is used or not. |
62 | 59 | # This option is only for Linux. |
63 | 60 | # You should not set this flag if you want to use "dlopen" to |
92 | 89 | ['enable_gtk_renderer==1', { |
93 | 90 | 'defines': ['ENABLE_GTK_RENDERER'], |
94 | 91 | }], |
95 | ['qt_ver==5', { | |
96 | 'defines': ['MOZC_USE_QT5'], | |
97 | }], | |
98 | 92 | ] |
99 | 93 | } |
100 | 94 | } |
59 | 59 | 'release_crt_merge_module_id_prefix': 'CRT140', |
60 | 60 | 'debug_crt_merge_module_path': 'C:/Program Files (x86)/Common Files/Merge Modules/Microsoft_VC140_DebugCRT_x86.msm', |
61 | 61 | 'release_crt_merge_module_path': 'C:/Program Files (x86)/Common Files/Merge Modules/Microsoft_VC140_CRT_x86.msm', |
62 | 'qtcore4_dll_path': '', | |
63 | 'qtcored4_dll_path': '', | |
64 | 'qtgui4_dll_path': '', | |
65 | 'qtguid4_dll_path': '', | |
66 | 62 | 'qt5core_dll_path': '', |
67 | 63 | 'qt5cored_dll_path': '', |
68 | 64 | 'qt5gui_dll_path': '', |
77 | 73 | ['use_qt=="YES"', { |
78 | 74 | 'mozc_zinnia_model_data_path': '<(DEPTH)/third_party/zinnia/tomoe/handwriting-light-ja.model', |
79 | 75 | 'mozc_tool_path': '<(outdir32_dynamic)/GoogleIMEJaTool.exe', |
80 | }], | |
81 | ['use_qt=="YES" and qt_ver==4', { | |
82 | 'qtcore4_dll_path': '<(qt_dir)/bin/QtCore4.dll', | |
83 | 'qtcored4_dll_path': '<(qt_dir)/bin/QtCored4.dll', | |
84 | 'qtgui4_dll_path': '<(qt_dir)/bin/QtGui4.dll', | |
85 | 'qtguid4_dll_path': '<(qt_dir)/bin/QtGuid4.dll', | |
86 | }], | |
87 | ['use_qt=="YES" and qt_ver==5', { | |
88 | 76 | 'qt5core_dll_path': '<(qt_dir)/bin/Qt5Core.dll', |
89 | 77 | 'qt5cored_dll_path': '<(qt_dir)/bin/Qt5Cored.dll', |
90 | 78 | 'qt5gui_dll_path': '<(qt_dir)/bin/Qt5Gui.dll', |
100 | 88 | 'release_crt_merge_module_id_prefix': '<(release_crt_merge_module_id_prefix)', |
101 | 89 | 'debug_crt_merge_module_path': '<(debug_crt_merge_module_path)', |
102 | 90 | 'release_crt_merge_module_path': '<(release_crt_merge_module_path)', |
103 | 'qtcore4_dll_path': '<(qtcore4_dll_path)', | |
104 | 'qtcored4_dll_path': '<(qtcored4_dll_path)', | |
105 | 'qtgui4_dll_path': '<(qtgui4_dll_path)', | |
106 | 'qtguid4_dll_path': '<(qtguid4_dll_path)', | |
107 | 91 | 'qt5core_dll_path': '<(qt5core_dll_path)', |
108 | 92 | 'qt5cored_dll_path': '<(qt5cored_dll_path)', |
109 | 93 | 'qt5gui_dll_path': '<(qt5gui_dll_path)', |
54 | 54 | <?endif?> |
55 | 55 | <?ifndef ReleaseCrtMergeModulePath ?> |
56 | 56 | <?define ReleaseCrtMergeModulePath="" ?> |
57 | <?endif?> | |
58 | <?ifndef QtCore4DllPath ?> | |
59 | <?define QtCore4DllPath="" ?> | |
60 | <?endif?> | |
61 | <?ifndef QtCored4DllPath ?> | |
62 | <?define QtCored4DllPath="" ?> | |
63 | <?endif?> | |
64 | <?ifndef QtGui4DllPath ?> | |
65 | <?define QtGui4DllPath="" ?> | |
66 | <?endif?> | |
67 | <?ifndef QtGuid4DllPath ?> | |
68 | <?define QtGuid4DllPath="" ?> | |
69 | 57 | <?endif?> |
70 | 58 | <?ifndef Qt5CoreDllPath ?> |
71 | 59 | <?define Qt5CoreDllPath="" ?> |
386 | 374 | </Component> |
387 | 375 | <?endif?> |
388 | 376 | <?if $(var.VSConfigurationName) = "Debug" ?> |
389 | <?if $(var.QtCored4DllPath) != "" ?> | |
390 | <Component Id='QtCored4Dll' Guid='*'> | |
391 | <!-- Always overwrite: b/31845781 --> | |
392 | <RemoveFile Id='QtCored4.dll' Name='QtCored4.dll' On="install" /> | |
393 | <File Id='QtCored4.dll' | |
394 | Name='QtCored4.dll' DiskId='1' Vital='yes' | |
395 | Checksum='yes' Source='$(var.QtCored4DllPath)' /> | |
396 | </Component> | |
397 | <?endif?> | |
398 | <?if $(var.QtGuid4DllPath) != "" ?> | |
399 | <Component Id='QtGuid4Dll' Guid='*'> | |
400 | <!-- Always overwrite: b/31845781 --> | |
401 | <RemoveFile Id='QtGuid4.dll' Name='QtGuid4.dll' On="install" /> | |
402 | <File Id='QtGuid4.dll' | |
403 | Name='QtGuid4.dll' DiskId='1' Vital='yes' | |
404 | Checksum='yes' Source='$(var.QtGuid4DllPath)' /> | |
405 | </Component> | |
406 | <?endif?> | |
407 | 377 | <?if $(var.Qt5CoredDllPath) != "" ?> |
408 | 378 | <Component Id='Qt5CoredDll' Guid='*'> |
409 | 379 | <!-- Always overwrite: b/31845781 --> |
432 | 402 | </Component> |
433 | 403 | <?endif?> |
434 | 404 | <?else?> |
435 | <?if $(var.QtCore4DllPath) != "" ?> | |
436 | <Component Id='QtCore4Dll' Guid='*'> | |
437 | <!-- Always overwrite: b/31845781 --> | |
438 | <RemoveFile Id='QtCore4.dll' Name='QtCore4.dll' On="install" /> | |
439 | <File Id='QtCore4.dll' | |
440 | Name='QtCore4.dll' DiskId='1' Vital='yes' | |
441 | Checksum='yes' Source='$(var.QtCore4DllPath)' /> | |
442 | </Component> | |
443 | <?endif?> | |
444 | <?if $(var.QtGui4DllPath) != "" ?> | |
445 | <Component Id='QtGui4Dll' Guid='*'> | |
446 | <!-- Always overwrite: b/31845781 --> | |
447 | <RemoveFile Id='QtGui4.dll' Name='QtGui4.dll' On="install" /> | |
448 | <File Id='QtGui4.dll' | |
449 | Name='QtGui4.dll' DiskId='1' Vital='yes' | |
450 | Checksum='yes' Source='$(var.QtGui4DllPath)' /> | |
451 | </Component> | |
452 | <?endif?> | |
453 | 405 | <?if $(var.Qt5CoreDllPath) != "" ?> |
454 | 406 | <Component Id='Qt5CoreDll' Guid='*'> |
455 | 407 | <!-- Always overwrite: b/31845781 --> |
694 | 646 | <ComponentRef Id='ZinniaModelData' /> |
695 | 647 | <?endif?> |
696 | 648 | <?if $(var.VSConfigurationName) = "Debug" ?> |
697 | <?if $(var.QtCored4DllPath) != "" ?> | |
698 | <ComponentRef Id='QtCored4Dll' /> | |
699 | <?endif?> | |
700 | <?if $(var.QtGuid4DllPath) != "" ?> | |
701 | <ComponentRef Id='QtGuid4Dll' /> | |
702 | <?endif?> | |
703 | 649 | <?if $(var.Qt5CoredDllPath) != "" ?> |
704 | 650 | <ComponentRef Id='Qt5CoredDll' /> |
705 | 651 | <?endif?> |
713 | 659 | <ComponentRef Id='QWindowsdDll' /> |
714 | 660 | <?endif?> |
715 | 661 | <?else?> |
716 | <?if $(var.QtCore4DllPath) != "" ?> | |
717 | <ComponentRef Id='QtCore4Dll' /> | |
718 | <?endif?> | |
719 | <?if $(var.QtGui4DllPath) != "" ?> | |
720 | <ComponentRef Id='QtGui4Dll' /> | |
721 | <?endif?> | |
722 | 662 | <?if $(var.Qt5CoreDllPath) != "" ?> |
723 | 663 | <ComponentRef Id='Qt5CoreDll' /> |
724 | 664 | <?endif?> |
54 | 54 | <?endif?> |
55 | 55 | <?ifndef ReleaseCrtMergeModulePath ?> |
56 | 56 | <?define ReleaseCrtMergeModulePath="" ?> |
57 | <?endif?> | |
58 | <?ifndef QtCore4DllPath ?> | |
59 | <?define QtCore4DllPath="" ?> | |
60 | <?endif?> | |
61 | <?ifndef QtCored4DllPath ?> | |
62 | <?define QtCored4DllPath="" ?> | |
63 | <?endif?> | |
64 | <?ifndef QtGui4DllPath ?> | |
65 | <?define QtGui4DllPath="" ?> | |
66 | <?endif?> | |
67 | <?ifndef QtGuid4DllPath ?> | |
68 | <?define QtGuid4DllPath="" ?> | |
69 | 57 | <?endif?> |
70 | 58 | <?ifndef Qt5CoreDllPath ?> |
71 | 59 | <?define Qt5CoreDllPath="" ?> |
403 | 391 | </Component> |
404 | 392 | <?endif?> |
405 | 393 | <?if $(var.VSConfigurationName) = "Debug" ?> |
406 | <?if $(var.QtCored4DllPath) != "" ?> | |
407 | <Component Id='QtCored4Dll' Guid='*'> | |
408 | <!-- Always overwrite: b/31845781 --> | |
409 | <RemoveFile Id='QtCored4.dll' Name='QtCored4.dll' On="install" /> | |
410 | <File Id='QtCored4.dll' | |
411 | Name='QtCored4.dll' DiskId='1' Vital='yes' | |
412 | Checksum='yes' Source='$(var.QtCored4DllPath)' /> | |
413 | </Component> | |
414 | <?endif?> | |
415 | <?if $(var.QtGuid4DllPath) != "" ?> | |
416 | <Component Id='QtGuid4Dll' Guid='*'> | |
417 | <!-- Always overwrite: b/31845781 --> | |
418 | <RemoveFile Id='QtGuid4.dll' Name='QtGuid4.dll' On="install" /> | |
419 | <File Id='QtGuid4.dll' | |
420 | Name='QtGuid4.dll' DiskId='1' Vital='yes' | |
421 | Checksum='yes' Source='$(var.QtGuid4DllPath)' /> | |
422 | </Component> | |
423 | <?endif?> | |
424 | 394 | <?if $(var.Qt5CoredDllPath) != "" ?> |
425 | 395 | <Component Id='Qt5CoredDll' Guid='*'> |
426 | 396 | <!-- Always overwrite: b/31845781 --> |
449 | 419 | </Component> |
450 | 420 | <?endif?> |
451 | 421 | <?else?> |
452 | <?if $(var.QtCore4DllPath) != "" ?> | |
453 | <Component Id='QtCore4Dll' Guid='*'> | |
454 | <!-- Always overwrite: b/31845781 --> | |
455 | <RemoveFile Id='QtCore4.dll' Name='QtCore4.dll' On="install" /> | |
456 | <File Id='QtCore4.dll' | |
457 | Name='QtCore4.dll' DiskId='1' Vital='yes' | |
458 | Checksum='yes' Source='$(var.QtCore4DllPath)' /> | |
459 | </Component> | |
460 | <?endif?> | |
461 | <?if $(var.QtGui4DllPath) != "" ?> | |
462 | <Component Id='QtGui4Dll' Guid='*'> | |
463 | <!-- Always overwrite: b/31845781 --> | |
464 | <RemoveFile Id='QtGui4.dll' Name='QtGui4.dll' On="install" /> | |
465 | <File Id='QtGui4.dll' | |
466 | Name='QtGui4.dll' DiskId='1' Vital='yes' | |
467 | Checksum='yes' Source='$(var.QtGui4DllPath)' /> | |
468 | </Component> | |
469 | <?endif?> | |
470 | 422 | <?if $(var.Qt5CoreDllPath) != "" ?> |
471 | 423 | <Component Id='Qt5CoreDll' Guid='*'> |
472 | 424 | <!-- Always overwrite: b/31845781 --> |
766 | 718 | <ComponentRef Id='ZinniaModelData' /> |
767 | 719 | <?endif?> |
768 | 720 | <?if $(var.VSConfigurationName) = "Debug" ?> |
769 | <?if $(var.QtCored4DllPath) != "" ?> | |
770 | <ComponentRef Id='QtCored4Dll' /> | |
771 | <?endif?> | |
772 | <?if $(var.QtGuid4DllPath) != "" ?> | |
773 | <ComponentRef Id='QtGuid4Dll' /> | |
774 | <?endif?> | |
775 | 721 | <?if $(var.Qt5CoredDllPath) != "" ?> |
776 | 722 | <ComponentRef Id='Qt5CoredDll' /> |
777 | 723 | <?endif?> |
785 | 731 | <ComponentRef Id='QWindowsdDll' /> |
786 | 732 | <?endif?> |
787 | 733 | <?else?> |
788 | <?if $(var.QtCore4DllPath) != "" ?> | |
789 | <ComponentRef Id='QtCore4Dll' /> | |
790 | <?endif?> | |
791 | <?if $(var.QtGui4DllPath) != "" ?> | |
792 | <ComponentRef Id='QtGui4Dll' /> | |
793 | <?endif?> | |
794 | 734 | <?if $(var.Qt5CoreDllPath) != "" ?> |
795 | 735 | <ComponentRef Id='Qt5CoreDll' /> |
796 | 736 | <?endif?> |
73 | 73 | '-dReleaseCrtMergeModulePath=<(release_crt_merge_module_path)', |
74 | 74 | ], |
75 | 75 | }], |
76 | ['qtcore4_dll_path!=""', { | |
77 | 'additional_args': [ | |
78 | '-dQtCore4DllPath=<(qtcore4_dll_path)', | |
79 | ], | |
80 | }], | |
81 | ['qtcored4_dll_path!=""', { | |
82 | 'additional_args': [ | |
83 | '-dQtCored4DllPath=<(qtcored4_dll_path)', | |
84 | ], | |
85 | }], | |
86 | ['qtgui4_dll_path!=""', { | |
87 | 'additional_args': [ | |
88 | '-dQtGui4DllPath=<(qtgui4_dll_path)', | |
89 | ], | |
90 | }], | |
91 | ['qtguid4_dll_path!=""', { | |
92 | 'additional_args': [ | |
93 | '-dQtGuid4DllPath=<(qtguid4_dll_path)', | |
94 | ], | |
95 | }], | |
96 | 76 | ['qt5core_dll_path!=""', { |
97 | 77 | 'additional_args': [ |
98 | 78 | '-dQt5CoreDllPath=<(qt5core_dll_path)', |