Skip to content

Commit c3571be

Browse files
committed
Merge pull request #319 from GuoLunHao/v3
change the lib path for the prebuilt project searched
2 parents be4cc39 + c081b77 commit c3571be

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/plugin_generate/gen_templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def modify_project_properties(self, cfg_path):
286286

287287
def modify_build_cfg(self):
288288
build_cfg_files = self.config_json[TemplateGenerator.KEY_BUILD_CFG_FILES]
289-
fw_version_path = "${COCOS_FRAMEWORKS}/%s" % self.fw_version
289+
fw_version_path = "${COCOS_X_ROOT}/%s" % self.fw_version
290290

291291
for build_cfg_file in build_cfg_files:
292292
cfg_full_path = os.path.join(self.engine_template_dir, build_cfg_file)

plugins/plugin_generate/modify_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def modify_xcode_proj(self, proj_file_path):
9494
# pbx_proj.remove_group_by_name("JS Common")
9595

9696
# add libraries search path
97-
libs_path = "/Applications/Cocos/frameworks/%s/prebuilt" % self.version
97+
libs_path = "/Applications/Cocos/Cocos2d-x/%s/prebuilt" % self.version
9898
ios_template_prebuilt_path = "%s/%s" % (libs_path, "ios")
9999
pbx_proj.add_library_search_paths(ios_template_prebuilt_path, target_name=ios_target_name, recursive=False)
100100
mac_template_prebuilt_path = "%s/%s" % (libs_path, "mac")
@@ -133,7 +133,7 @@ def modify_xcode_proj(self, proj_file_path):
133133
file_content = f.read()
134134
f.close()
135135

136-
install_path = "/Applications/Cocos/frameworks/%s" % self.version
136+
install_path = "/Applications/Cocos/Cocos2d-x/%s" % self.version
137137
for old_engine_path in replace_engine_strs:
138138
file_content = file_content.replace(old_engine_path, install_path)
139139

@@ -158,7 +158,7 @@ def modify_vs_proj(self, proj_file_path):
158158
# remove the project references
159159
vcx_proj.remove_proj_reference()
160160

161-
install_path = "$(COCOS_FRAMEWORKS)\\%s\\" % self.version
161+
install_path = "$(COCOS_X_ROOT)\\%s\\" % self.version
162162

163163
copy_libs_cmd = "if not exist \"$(OutDir)\" mkdir \"$(OutDir)\"\n" \
164164
"xcopy /Y /Q \"$(EngineRoot)\\prebuilt\\win32\\*.*\" \"$(OutDir)\"\n"

0 commit comments

Comments
 (0)