Codebase list mozc / b67b2ad
Enable to run GUI tools from /Applications on mac Previous: GuiTool.app contains necessary frameworks (e.g. QtGui, MozcTool_lib) but it is not used by users or installed to /Applications. This change: Make ConfigDialog.app contain these frameworks instead. GuiTool.app is deprecated. BUG= TEST=manually tested on macOS sierra (10.12) REF_BUG=31895238 REF_CL=135079284,139075087,138347924 REF_TIME=2016-10-04T17:45:42+09:00 REF_TIME_RAW=1475570742 +0900 Hiroyuki Komatsu 7 years ago
9 changed file(s) with 223 addition(s) and 276 deletion(s). Raw diff Collapse all Expand all
6161
6262
6363 def GetReferenceTo(framework):
64 return ('@executable_path/../../../GuiTool.app/Contents/Frameworks/%s' %
64 return ('@executable_path/../../../ConfigDialog.app/Contents/Frameworks/%s' %
6565 framework)
6666
6767
116116 qtdir = os.path.abspath(opt.qtdir)
117117 target = os.path.abspath(opt.target)
118118
119 ref_to = '@executable_path/../../../GuiTool.app/Contents/Frameworks'
119 ref_to = '@executable_path/../../../ConfigDialog.app/Contents/Frameworks'
120120 if qtver == '5':
121121 CopyQt(qtdir, 'QtCore', '5', target, copy_resources=True)
122122 CopyQt(qtdir, 'QtGui', '5', target, copy_resources=True)
00 [Paths]
1 Plugins = ../../GuiTool.app/Contents/Frameworks/QtCore.framework/Resources/plugins
1 Plugins = ../../ConfigDialog.app/Contents/Frameworks/QtCore.framework/Resources/plugins
2929
3030 MAJOR=2
3131 MINOR=19
32 BUILD=2627
32 BUILD=2628
3333 REVISION=102
3434 # This version represents the version of Mozc IME engine (converter, predictor,
3535 # etc.). This version info is included both in the Mozc server and in the Mozc
835835 ],
836836 },
837837 {
838 'target_name': 'gen_mozc_tool_files',
839 'type': 'none',
840 'variables': {
841 'subdir': 'tool',
842 'qrc_base_name': 'mozc_tool',
843 },
844 'sources': [
845 '<(subdir)/mozc_tool.qrc',
846 ],
847 'includes': [
848 'qt_rcc.gypi',
849 ],
850 },
851 {
852838 'target_name': 'prelauncher_lib',
853839 'type': 'static_library',
854840 'sources': [
864850 {
865851 'target_name': 'mozc_tool_lib',
866852 'sources': [
867 '<(gen_out_dir)/tool/qrc_mozc_tool.cc',
868853 'tool/mozc_tool_libmain.cc',
869854 ],
870855 'dependencies': [
877862 'confirmation_dialog_lib',
878863 'dictionary_tool_lib',
879864 'error_message_dialog_lib',
880 'gen_mozc_tool_files',
881865 'gui_base',
882866 'post_install_dialog_lib',
883867 'set_default_dialog_lib',
951935 'tool/mozc_tool_main_noqt.cc',
952936 ],
953937 }],
954 ['OS=="mac"', {
955 'product_name': '<(product_name)',
938 # For Mac, ConfigDialog is the host app for necessary frameworks.
939 ['OS=="win"', {
940 'product_name': '<(tool_product_name_win)',
941 'sources': [
942 '<(gen_out_dir)/tool/mozc_tool_autogen.rc',
943 ],
944 'dependencies': [
945 '../base/base.gyp:base',
946 '../win32/base/win32_base.gyp:ime_base',
947 'gen_mozc_tool_header',
948 ],
949 'msvs_settings': {
950 'VCManifestTool': {
951 'AdditionalManifestFiles': 'tool/mozc_tool.exe.manifest',
952 'EmbedManifest': 'true',
953 },
954 },
955 }],
956 ],
957 },
958 {
959 'target_name': 'encoding_util',
960 'type': 'static_library',
961 'sources': [
962 'base/encoding_util.cc',
963 ],
964 'dependencies': [
965 '../base/base.gyp:base_core',
966 ],
967 },
968 {
969 'target_name': 'encoding_util_test',
970 'type': 'executable',
971 'sources': [
972 'base/encoding_util_test.cc',
973 ],
974 'dependencies': [
975 '../testing/testing.gyp:gtest_main',
976 'encoding_util',
977 ],
978 'variables': {
979 'test_size': 'small',
980 },
981 },
982 {
983 'target_name': 'gui_all_test',
984 'type': 'none',
985 'dependencies': [
986 'encoding_util_test',
987 ],
988 },
989 ],
990 'conditions': [
991 ['OS=="win"', {
992 'targets': [
993 {
994 'target_name': 'gen_mozc_tool_header',
956995 'variables': {
957 'product_name': 'GuiTool',
996 'gen_resource_proj_name': 'mozc_tool',
997 'gen_main_resource_path': 'gui/tool/mozc_tool.rc',
998 'gen_output_resource_path':
999 '<(gen_out_dir)/tool/mozc_tool_autogen.rc',
1000 },
1001 'includes': [
1002 '../gyp/gen_win32_resource_header.gypi',
1003 ],
1004 },
1005 ],
1006 }],
1007 ['OS=="mac"', {
1008 'targets': [
1009 {
1010 'target_name': 'gen_mozc_tool_info_plist',
1011 'type': 'none',
1012 'actions': [
1013 {
1014 'action_name': 'generate normal info plist',
1015 'inputs': [
1016 '../data/mac/mozc_tool_info',
1017 ],
1018 'outputs': [
1019 '<(gen_out_dir)/mozc_tool_info',
1020 ],
1021 'action': [
1022 'python', '../build_tools/tweak_info_plist.py',
1023 '--output', '<(gen_out_dir)/mozc_tool_info',
1024 '--input', '../data/mac/mozc_tool_info',
1025 '--version_file', '../mozc_version.txt',
1026 '--branding', '<(branding)',
1027 ],
1028 },
1029 {
1030 'action_name': 'generate hidden info plist',
1031 'inputs': [
1032 '../data/mac/hidden_mozc_tool_info',
1033 ],
1034 'outputs': [
1035 '<(gen_out_dir)/hidden_mozc_tool_info',
1036 ],
1037 'action': [
1038 'python', '../build_tools/tweak_info_plist.py',
1039 '--output', '<(gen_out_dir)/hidden_mozc_tool_info',
1040 '--input', '../data/mac/hidden_mozc_tool_info',
1041 '--version_file', '../mozc_version.txt',
1042 '--branding', '<(branding)',
1043 ],
1044 },
1045 ],
1046 },
1047 {
1048 'target_name': 'gen_mozc_tool_info_strings',
1049 'type': 'none',
1050 'actions': [
1051 {
1052 'action_name': 'generate_config_dialog_english_strings',
1053 'inputs': [
1054 '../data/mac/ConfigDialog/English.lproj/InfoPlist.strings',
1055 ],
1056 'outputs': [
1057 '<(gen_out_dir)/ConfigDialog/English.lproj/InfoPlist.strings',
1058 ],
1059 'action': [
1060 'python', '../build_tools/tweak_info_plist_strings.py',
1061 '--output',
1062 '<(gen_out_dir)/ConfigDialog/English.lproj/InfoPlist.strings',
1063 '--input',
1064 '../data/mac/ConfigDialog/English.lproj/InfoPlist.strings',
1065 '--branding', '<(branding)',
1066 ],
1067 },
1068 {
1069 'action_name': 'generate_config_dialog_japanese_strings',
1070 'inputs': [
1071 '../data/mac/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1072 ],
1073 'outputs': [
1074 '<(gen_out_dir)/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1075 ],
1076 'action': [
1077 'python', '../build_tools/tweak_info_plist_strings.py',
1078 '--output',
1079 '<(gen_out_dir)/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1080 '--input',
1081 '../data/mac/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1082 '--branding', '<(branding)',
1083 ],
1084 },
1085 ],
1086 },
1087 {
1088 'target_name': 'gen_mozc_tool_lib_info_plist',
1089 'type': 'none',
1090 'actions': [
1091 {
1092 'action_name': 'mozc_tool_lib info.plist',
1093 'inputs': [
1094 '../data/mac/mozc_tool_lib_info',
1095 ],
1096 'outputs': [
1097 '<(gen_out_dir)/mozc_tool_lib_info',
1098 ],
1099 'action': [
1100 'python', '../build_tools/tweak_info_plist.py',
1101 '--output', '<(gen_out_dir)/mozc_tool_lib_info',
1102 '--input', '../data/mac/mozc_tool_lib_info',
1103 '--version_file', '../mozc_version.txt',
1104 '--branding', '<(branding)',
1105 ],
1106 },
1107 ],
1108 },
1109 {
1110 'target_name': 'about_dialog_mac',
1111 'type': 'executable',
1112 'mac_bundle': 1,
1113 'variables': {
1114 'product_name': 'AboutDialog',
1115 },
1116 'xcode_settings': {
1117 'INFOPLIST_FILE': '<(gen_out_dir)/hidden_mozc_tool_info',
1118 },
1119 'includes': [
1120 'mac_gui.gypi',
1121 ],
1122 },
1123 {
1124 # ConfigDialog.app is the host app of Frameworks (e.g. GuiTool_lib,
1125 # QtCore, Breakpad, etc.). These Frameworks are refferred by other
1126 # apps like AboutDialog.app.
1127 'target_name': 'config_dialog_mac',
1128 'product_name': 'ConfigDialog',
1129 'type': 'executable',
1130 'mac_bundle': 1,
1131 'variables': {
1132 'product_name': 'ConfigDialog',
1133 'copying_frameworks': [
1134 '<(PRODUCT_DIR)/GuiTool_lib.framework',
1135 ],
9581136 },
9591137 'dependencies': [
9601138 'gen_mozc_tool_info_plist',
1139 'gen_mozc_tool_info_strings',
1140 ],
1141 'xcode_settings': {
1142 'INFOPLIST_FILE': '<(gen_out_dir)/mozc_tool_info',
1143 },
1144 'mac_bundle_resources': [
1145 '../data/images/mac/product_icon.icns',
1146 '<(gen_out_dir)/ConfigDialog/English.lproj/InfoPlist.strings',
1147 '<(gen_out_dir)/ConfigDialog/Japanese.lproj/InfoPlist.strings',
9611148 ],
9621149 'conditions': [
9631150 ['use_qt=="YES"', {
964 'variables': {
965 'copying_frameworks': [
966 '<(PRODUCT_DIR)/GuiTool_lib.framework',
967 ],
968 },
9691151 'conditions': [
9701152 ['qt_ver==5', {
9711153 'mac_bundle_resources': ['../data/mac/qt.conf'],
9721154 }],
9731155 ],
974 # We include this gypi file here because the variables
975 # in a condition cannot be refferred from the gypi file
976 # included outside from the condition.
1156 'sources': [
1157 'tool/mozc_tool_main.cc',
1158 ],
1159 'dependencies': [
1160 'mozc_tool_lib',
1161 ],
9771162 'includes': [
9781163 '../gyp/postbuilds_mac.gypi',
9791164 ],
9801165 'postbuilds': [
9811166 {
982 'postbuild_name': 'Change the reference to frameworks.',
1167 'postbuild_name': 'Change the reference to frameworks',
9831168 'action': [
9841169 'python', '../build_tools/change_reference_mac.py',
9851170 '--qtver', '<(qt_ver)',
9981183 ],
9991184 },
10001185 ],
1001 }, {
1002 # So we include the same file explicitly here.
1003 'includes': [
1004 '../gyp/postbuilds_mac.gypi',
1005 ],
1006 }]
1007 ],
1008 'mac_bundle': 1,
1009 'xcode_settings': {
1010 'INFOPLIST_FILE': '<(gen_out_dir)/hidden_mozc_tool_info',
1011 },
1012 }],
1013 ['OS=="win"', {
1014 'product_name': '<(tool_product_name_win)',
1015 'sources': [
1016 '<(gen_out_dir)/tool/mozc_tool_autogen.rc',
1017 ],
1018 'dependencies': [
1019 '../base/base.gyp:base',
1020 '../win32/base/win32_base.gyp:ime_base',
1021 'gen_mozc_tool_header',
1022 ],
1023 'msvs_settings': {
1024 'VCManifestTool': {
1025 'AdditionalManifestFiles': 'tool/mozc_tool.exe.manifest',
1026 'EmbedManifest': 'true',
1027 },
1028 },
1029 }],
1030 ],
1031 },
1032 {
1033 'target_name': 'encoding_util',
1034 'type': 'static_library',
1035 'sources': [
1036 'base/encoding_util.cc',
1037 ],
1038 'dependencies': [
1039 '../base/base.gyp:base_core',
1040 ],
1041 },
1042 {
1043 'target_name': 'encoding_util_test',
1044 'type': 'executable',
1045 'sources': [
1046 'base/encoding_util_test.cc',
1047 ],
1048 'dependencies': [
1049 '../testing/testing.gyp:gtest_main',
1050 'encoding_util',
1051 ],
1052 'variables': {
1053 'test_size': 'small',
1054 },
1055 },
1056 {
1057 'target_name': 'gui_all_test',
1058 'type': 'none',
1059 'dependencies': [
1060 'encoding_util_test',
1061 ],
1062 },
1063 ],
1064 'conditions': [
1065 ['OS=="win"', {
1066 'targets': [
1067 {
1068 'target_name': 'gen_mozc_tool_header',
1069 'variables': {
1070 'gen_resource_proj_name': 'mozc_tool',
1071 'gen_main_resource_path': 'gui/tool/mozc_tool.rc',
1072 'gen_output_resource_path':
1073 '<(gen_out_dir)/tool/mozc_tool_autogen.rc',
1074 },
1075 'includes': [
1076 '../gyp/gen_win32_resource_header.gypi',
1077 ],
1078 },
1079 ],
1080 }],
1081 ['OS=="mac"', {
1082 'targets': [
1083 {
1084 'target_name': 'gen_mozc_tool_info_plist',
1085 'type': 'none',
1086 'actions': [
1087 {
1088 'action_name': 'generate normal info plist',
1089 'inputs': [
1090 '../data/mac/mozc_tool_info',
1091 ],
1092 'outputs': [
1093 '<(gen_out_dir)/mozc_tool_info',
1094 ],
1095 'action': [
1096 'python', '../build_tools/tweak_info_plist.py',
1097 '--output', '<(gen_out_dir)/mozc_tool_info',
1098 '--input', '../data/mac/mozc_tool_info',
1099 '--version_file', '../mozc_version.txt',
1100 '--branding', '<(branding)',
1101 ],
1102 },
1103 {
1104 'action_name': 'generate hidden info plist',
1105 'inputs': [
1106 '../data/mac/hidden_mozc_tool_info',
1107 ],
1108 'outputs': [
1109 '<(gen_out_dir)/hidden_mozc_tool_info',
1110 ],
1111 'action': [
1112 'python', '../build_tools/tweak_info_plist.py',
1113 '--output', '<(gen_out_dir)/hidden_mozc_tool_info',
1114 '--input', '../data/mac/hidden_mozc_tool_info',
1115 '--version_file', '../mozc_version.txt',
1116 '--branding', '<(branding)',
1117 ],
1118 },
1119 ],
1120 },
1121 {
1122 'target_name': 'gen_mozc_tool_info_strings',
1123 'type': 'none',
1124 'actions': [
1125 {
1126 'action_name': 'generate_config_dialog_english_strings',
1127 'inputs': [
1128 '../data/mac/ConfigDialog/English.lproj/InfoPlist.strings',
1129 ],
1130 'outputs': [
1131 '<(gen_out_dir)/ConfigDialog/English.lproj/InfoPlist.strings',
1132 ],
1133 'action': [
1134 'python', '../build_tools/tweak_info_plist_strings.py',
1135 '--output',
1136 '<(gen_out_dir)/ConfigDialog/English.lproj/InfoPlist.strings',
1137 '--input',
1138 '../data/mac/ConfigDialog/English.lproj/InfoPlist.strings',
1139 '--branding', '<(branding)',
1140 ],
1141 },
1142 {
1143 'action_name': 'generate_config_dialog_japanese_strings',
1144 'inputs': [
1145 '../data/mac/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1146 ],
1147 'outputs': [
1148 '<(gen_out_dir)/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1149 ],
1150 'action': [
1151 'python', '../build_tools/tweak_info_plist_strings.py',
1152 '--output',
1153 '<(gen_out_dir)/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1154 '--input',
1155 '../data/mac/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1156 '--branding', '<(branding)',
1157 ],
1158 },
1159 ],
1160 },
1161 {
1162 'target_name': 'gen_mozc_tool_lib_info_plist',
1163 'type': 'none',
1164 'actions': [
1165 {
1166 'action_name': 'mozc_tool_lib info.plist',
1167 'inputs': [
1168 '../data/mac/mozc_tool_lib_info',
1169 ],
1170 'outputs': [
1171 '<(gen_out_dir)/mozc_tool_lib_info',
1172 ],
1173 'action': [
1174 'python', '../build_tools/tweak_info_plist.py',
1175 '--output', '<(gen_out_dir)/mozc_tool_lib_info',
1176 '--input', '../data/mac/mozc_tool_lib_info',
1177 '--version_file', '../mozc_version.txt',
1178 '--branding', '<(branding)',
1179 ],
1180 },
1181 ],
1182 },
1183 {
1184 'target_name': 'about_dialog_mac',
1185 'type': 'executable',
1186 'mac_bundle': 1,
1187 'variables': {
1188 'product_name': 'AboutDialog',
1189 },
1190 'xcode_settings': {
1191 'INFOPLIST_FILE': '<(gen_out_dir)/hidden_mozc_tool_info',
1192 },
1193 'includes': [
1194 'mac_gui.gypi',
1195 ],
1196 },
1197 {
1198 'target_name': 'config_dialog_mac',
1199 'type': 'executable',
1200 'mac_bundle': 1,
1201 'variables': {
1202 'product_name': 'ConfigDialog',
1203 },
1204 'dependencies': [
1205 'gen_mozc_tool_info_strings',
1206 ],
1207 'xcode_settings': {
1208 'INFOPLIST_FILE': '<(gen_out_dir)/mozc_tool_info',
1209 },
1210 'mac_bundle_resources': [
1211 '../data/images/mac/product_icon.icns',
1212 '<(gen_out_dir)/ConfigDialog/English.lproj/InfoPlist.strings',
1213 '<(gen_out_dir)/ConfigDialog/Japanese.lproj/InfoPlist.strings',
1214 ],
1215 'includes': [
1216 'mac_gui.gypi',
1186 }, { # else
1187 'sources': [
1188 'tool/mozc_tool_main_noqt.cc',
1189 ],
1190 }],
12171191 ],
12181192 },
12191193 {
4040 }],
4141 ],
4242 'dependencies': [
43 'config_dialog_mac',
4344 'gen_mozc_tool_info_plist',
4445 'mozc_tool_lib',
4546 ],
+0
-21
src/gui/tool/mozc_tool.qrc less more
0 <!DOCTYPE RCC>
1 <RCC version="1.0">
2 <!--
3 // The following is the manual step to make *qm files.
4 // - Edit source files
5 // % g4 edit *.cpp *.h *.ts
6 // - Update *ts file. tr() messages are stored in .ts
7 // % lupdate . -ts mozc_tool_ja.ts
8 // % lupdate . -ts mozc_tool_en.ts
9 // - open *.ts files with QT linguest and added translation
10 // - convert *.ts file to *.qm file
11 // % lrelease mozc_tool_ja.ts -qm mozc_tool_ja.qm
12 // % lrelease mozc_tool_en.ts -qm mozc_tool_en.qm
13 -->
14 <qresource>
15 <!---
16 // copeid from QT_DIR/transliations/qt_ja_JP.qm which contains default TS
17 -->
18
19 </qresource>
20 </RCC>
149149 qInstallMsgHandler(mozc::gui::DebugUtil::MessageHandler);
150150 #endif
151151
152 Q_INIT_RESOURCE(qrc_mozc_tool);
153
154 // we cannot install the translation of qt_ja_JP here.
155 // as Qpplication is initialized inside Run* function
156
157152 #ifdef OS_WIN
158153 // Update JumpList if available.
159154 mozc::gui::WinUtil::KeepJumpListUpToDate();
270270 '../base/base.gyp:crash_report_handler',
271271 '../client/client.gyp:client',
272272 '../config/config.gyp:stats_config_util',
273 '../gui/gui.gyp:mozc_tool',
274273 '../gui/gui.gyp:about_dialog_mac',
275274 '../gui/gui.gyp:character_palette_mac',
276275 '../gui/gui.gyp:config_dialog_mac',
313312 '<(PRODUCT_DIR)/<(branding)Converter.app',
314313 '<(PRODUCT_DIR)/<(branding)Prelauncher.app',
315314 '<(PRODUCT_DIR)/<(branding)Renderer.app',
316 '<(PRODUCT_DIR)/GuiTool.app',
317315 '<(PRODUCT_DIR)/AboutDialog.app',
318316 '<(PRODUCT_DIR)/CharacterPalette.app',
319317 '<(PRODUCT_DIR)/ConfigDialog.app',