mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-01-15 07:21:07 +00:00
18 lines
37 KiB
HTML
18 lines
37 KiB
HTML
<!doctype html>
|
||
<html lang="zh" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-installation-guide/installation-manual">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<meta name="generator" content="Docusaurus v2.0.0-beta.20">
|
||
<link rel="alternate" type="application/rss+xml" href="/cocos-service-pack/blog/rss.xml" title="Cocos Service Pack RSS Feed">
|
||
<link rel="alternate" type="application/atom+xml" href="/cocos-service-pack/blog/atom.xml" title="Cocos Service Pack Atom Feed"><title data-rh="true">手动安装 | Cocos Service Pack</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://smallmain.github.io/cocos-service-pack/docs/installation-guide/installation-manual"><meta data-rh="true" name="docusaurus_locale" content="zh"><meta data-rh="true" name="docsearch:language" content="zh"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="手动安装 | Cocos Service Pack"><meta data-rh="true" name="description" content="需掌握一定的自定义引擎知识。"><meta data-rh="true" property="og:description" content="需掌握一定的自定义引擎知识。"><link data-rh="true" rel="icon" href="/cocos-service-pack/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://smallmain.github.io/cocos-service-pack/docs/installation-guide/installation-manual"><link data-rh="true" rel="alternate" href="https://smallmain.github.io/cocos-service-pack/docs/installation-guide/installation-manual" hreflang="zh"><link data-rh="true" rel="alternate" href="https://smallmain.github.io/cocos-service-pack/docs/installation-guide/installation-manual" hreflang="x-default"><link rel="stylesheet" href="/cocos-service-pack/assets/css/styles.4efbebb6.css">
|
||
<link rel="preload" href="/cocos-service-pack/assets/js/runtime~main.5825ae06.js" as="script">
|
||
<link rel="preload" href="/cocos-service-pack/assets/js/main.25651981.js" as="script">
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||
<div role="region"><a href="#" class="skipToContent_ZgBM">跳到主要内容</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/cocos-service-pack/"><div class="navbar__logo"><img src="/cocos-service-pack/img/logo.png" alt="Cocos Service Pack" class="themedImage_W2Cr themedImage--light_TfLj"><img src="/cocos-service-pack/img/logo.png" alt="Cocos Service Pack" class="themedImage_W2Cr themedImage--dark_oUvU"></div><b class="navbar__title text--truncate">Cocos Service Pack</b></a></div><div class="navbar__items navbar__items--right"><a class="navbar__item navbar__link" href="/cocos-service-pack/">首页</a><a class="navbar__item navbar__link navbar__link--active" href="/cocos-service-pack/docs/intro">文档</a><a href="https://smallmain.github.io/cocos-service-pack/demo/web-desktop/index.html" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">演示</a><a href="https://github.com/smallmain/cocos-service-pack" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link header-github-link">加星鼓励</a><div class="searchBox_dLyj"><div class="navbar__search searchBarContainer_NW3z"><input placeholder="搜索" aria-label="Search" class="navbar__search-input"><div class="loadingRing_RJI3 searchBarLoadingRing_YnHq"><div></div><div></div><div></div><div></div></div><div class="searchHintContainer_Pkmr"><kbd class="searchHint_iIMx">ctrl</kbd><kbd class="searchHint_iIMx">K</kbd></div></div></div><div class="toggle_S7eR colorModeToggle_vKtC"><button class="clean-btn toggleButton_rCf9 toggleButtonDisabled_Pu9x" type="button" disabled="" title="切换浅色/暗黑模式(当前为浅色模式)" aria-label="切换浅色/暗黑模式(当前为浅色模式)"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_v35p"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_nQuB"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_mKqt"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_RiI4" type="button"></button><div class="docPage_ualW"><aside class="theme-doc-sidebar-container docSidebarContainer_UQUJ"><div class="sidebar_RiAD"><nav class="menu thin-scrollbar menu_izAj"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/cocos-service-pack/docs/intro">介绍</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" href="/cocos-service-pack/docs/installation-guide/installation-intro">安装指南</a><button aria-label="打开/收起侧边栏菜单「安装指南」" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/cocos-service-pack/docs/installation-guide/installation-engine-plugin">使用引擎扩展安装</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/cocos-service-pack/docs/installation-guide/installation-manual">手动安装</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="true" href="/cocos-service-pack/docs/start-guide/start-guide-intro">入门教程</a><button aria-label="打开/收起侧边栏菜单「入门教程」" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/cocos-service-pack/docs/start-guide/batcher-guide">新 UI 渲染批次合并指南</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/cocos-service-pack/docs/start-guide/advance-batcher-guide">进阶合批指南</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/cocos-service-pack/docs/start-guide/new-features">上手其它新特性</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/cocos-service-pack/docs/start-guide/breaking-change">破坏性变更</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="true" href="/cocos-service-pack/docs/user-guide/user-guide-intro">使用指南</a><button aria-label="打开/收起侧边栏菜单「使用指南」" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/cocos-service-pack/docs/user-guide/multi-render/multi-render-intro">多纹理渲染</a><button aria-label="打开/收起侧边栏菜单「多纹理渲染」" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/cocos-service-pack/docs/user-guide/text-render/text-render-intro">文本渲染</a><button aria-label="打开/收起侧边栏菜单「文本渲染」" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/cocos-service-pack/docs/user-guide/dynamic-batcher/dynamic-batcher-intro">动态合图</a><button aria-label="打开/收起侧边栏菜单「动态合图」" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" tabindex="0" href="/cocos-service-pack/docs/user-guide/spine/spine-intro">Spine</a><button aria-label="打开/收起侧边栏菜单「Spine」" type="button" class="clean-btn menu__caret"></button></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" href="/cocos-service-pack/docs/theory-guide/theory-guide-intro">原理文档</a><button aria-label="打开/收起侧边栏菜单「原理文档」" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/cocos-service-pack/docs/uninstall-guide">卸载指南</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/cocos-service-pack/docs/update-log">更新日志</a></li></ul></nav></div></aside><main class="docMainContainer_uL0j"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_DM6M"><div class="docItemContainer_vinB"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Xlws" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/cocos-service-pack/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_kU5B"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><a class="breadcrumbs__link" itemprop="item" href="/cocos-service-pack/docs/installation-guide/installation-intro"><span itemprop="name">安装指南</span></a><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">手动安装</span><meta itemprop="position" content="2"></li></ul></nav><div class="tocCollapsible_bZGK theme-doc-toc-mobile tocMobile_TmEX"><button type="button" class="clean-btn tocCollapsibleButton_l22C">本页总览</button></div><div class="theme-doc-markdown markdown"><h1>手动安装</h1><h2 class="anchor anchorWithStickyNavbar_mojV" id="service-pack-v100">Service Pack v1.0.0<a class="hash-link" href="#service-pack-v100" title="标题的直接链接"></a></h2><p>适配 Cocos Creator v2.4.9 版本,<a href="TODO" target="_blank" rel="noopener noreferrer">点此下载服务包</a></p><hr><h2 class="anchor anchorWithStickyNavbar_mojV" id="标准安装">标准安装<a class="hash-link" href="#标准安装" title="标题的直接链接"></a></h2><p>请确保您的项目符合以下条件,否则请使用 <a href="#%E8%A1%A5%E4%B8%81%E5%AE%89%E8%A3%85">补丁安装</a>。:</p><ul><li><strong>项目所使用的引擎版本与服务包适配的引擎版本一致</strong></li><li><strong>项目未使用自定义引擎</strong></li></ul><div class="admonition admonition-tip alert alert--success"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="16" viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>提示</h5></div><div class="admonition-content"><p>建议升级到最新的引擎版本,官方只会对 2.x 版本只会进行维护性更新,所以不用担心其稳定性问题。</p><p>如果你的项目引擎版本较低,可以看一看 <a href="/cocos-service-pack/docs/installation-guide/installation-engine-plugin">使用引擎扩展安装</a> ,支持对多个引擎版本进行一键安装。</p></div></div><h3 class="anchor anchorWithStickyNavbar_mojV" id="1替换自定义引擎">1.替换自定义引擎<a class="hash-link" href="#1替换自定义引擎" title="标题的直接链接"></a></h3><p>下载服务包后,解压压缩包可以看到压缩包内的 <code>engine</code> <code>cocos2d-x</code> <code>jsb-adapter</code> 这三个目录分别是已经整理好的 <strong>JavaScript 引擎</strong>、<strong>Cocos2d-x 引擎</strong> 和 <strong>jsb-adpater</strong>。</p><p>打开 Cocos Creator 菜单的 <strong>项目 - 项目设置 - 自定义引擎</strong>。</p><p>分别填写 <strong>JavaScript 引擎路径</strong>(对应 <code>engine</code> 目录)和 <strong>Cocos2d-x 引擎路径</strong>(对应 <code>cocos2d-x</code> 目录)。</p><p><img loading="lazy" alt="custom-engine" src="/cocos-service-pack/assets/images/custom-engine-f933a2bc1ad1148376ca43b1ddda39df.png" width="1196" height="1134" class="img_E7b_"></p><p>然后点击 Cocos Creator 主界面右上角的 <strong>编辑器</strong> 按钮,进入到编辑器的资源目录。</p><p><img loading="lazy" alt="ide-cocos-path" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAq4AAABGCAYAAAANdxbAAAAi9ElEQVR4Xu2d5ZocNxOF8y/fZeQCHCcO2rHDcRzHcZiZmR0Gh5mZmZk5ubb+/M5ujWu0klrdM93bs3t+7GPvtlpQOiodHZXUe+y5556V/fzvf/8b/5+/6XfZQ/jQ+JB/WMCA/KH8ofyh/KH84fL7wz322muvSj+ygTAgDAgDwoAwIAwIA8LA0DGwx957712tXbu24l/70e+yh/Cg8SB/sIAB+UP5Q/lD+UP5w+H4wxFx1Y9sIAwIA8KAMCAMCAPCgDAwdAxMEFcpC1IWpCxIWZCyMBxlQeNR41HjUeNROz+TO19SXKU4S3EXBoQBYUAYEAaEAWFgLjCwEOO696TSGMrEei775LYOhA/hQ/hIby9qfGh8aHxofKQwIP/Q3D9IcdUKay5WWEOPuVH9FBcmDAgDwoAwIAx0jwHFuOo2Bd0msYgBxXgrxlsxpYopVUypYkoVUzrs21SkuEpxleIqDAgDwoAwIAwIA8LAXGBAxFVAnQugavul++0X2Vg2FgaEAWFAGBg6BkRcRVxFXIUBYUAYEAaEAWFAGJgLDGRjXJfcLhB8YUvPJ1dmYYyk7CP75GImhQ/hQ/hIx9RqfGh8aHxofMRizqW4aoU1FyusoW9dqH7aXhMGhAFhQBgQBrrHgIiriKuIqzAgDCwDBjZt2lRt2bKl2r59e3XiiSfqRzYYYwBMgA0wUkqEhCeNob79SBucluI5l07EdRkmrFl0nPLoflUnG8vGXWBgv/32G5GSvicZlTefxAasgJkUFoWn+ezXlTYe63A6S1+6x5o1a7IrOj2XfXKAEz6ED+EjTfBj46OOtJ500klZUqvnq88+YCY2zsCX8LT68OBJ75D8QYjTrviBFFcprsVbUbNcMSkvqZ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w//777+q7776rLr300iVlkgas//HHH9Wvv/5aXXPNNbX1gqgy//z3338jUkwbrV5XXXVV9fvvv4+epX7++eefCmx59fScc86pnn322SjO33jjjVEdKee+++5LjgXeJ58mNuojbdf+dVkVV76x/MILL4w7+4cffojG2jHxvvrqq1FQ/PvvvyPHm2P4t99+exJQd999d6v4vtK6Uy9A/9tvv0Xr8Msvv1QQuFT9AXpqUHz//fcVhLbN6oZVI7azgWYEOsyLy4R//vnnaN1feumlir5pWn4T20GYGfShQ6DukNlc2bO2Xc4xhc8efvjhbN2+/vrriTatX78+mv6RRx7JOkQrF2Ias8U02Gvar+CYPqHOYOODDz6oPv300won/NRTT41IxNlnn10tIdkd73qUYr1pe9uk72PSKC0Dv/jXX39F8cWkTl+W5lWajkUYihiEIvy5/PLLR6SgyTgj7UcffTTClW07098Ql6b5kB5fCxEpbU/f6YauuNKnP/74Y9L2LDK6tNnpp59evfLKK6PyIZoQPzAHR/CLGPwzcy/p3nvvvRE5tOe33XZbxYKO+eP8888f4RRyC85I/+STT46EHP6OkAYpb0NcWWCF84DHLPWhPfjSFJZ5n3y6tGmbvNv4xibvLNs9rlu3bl1CiCCuofIGMXr77bcnOu6rr74araZ8ZzJZxpSPBx98cJwOAvTJJ59Un3/++QRpQ0lMKZexmMBU3WPlcxmvJ4i08cMPP6x++umncb14fsIJJyypP47ct5HB8eWXX1Z//vnnRJu8YlcXw3jQQQeNCEU4EGLKL59uYwKztN9880317rvvTpTP1klO+Q3rc9xxx0X7PWZ/nIevJ32H7bw9UaFj5ZfajkFZWv8mE6ER11h/xBZSRlzD9OaE68qGDIT4o20h9uj7FPZi+K3DEzsNtDUcj7n6gl8WouxAhAufuvKaPD/44IOr999/P4n1Nu1tUn4s/1hM33LEsLGFmiKt1ncstk3tz01eTerPmMaHpPABNsHTvffeO/q5//77R4sf0kM08PP2jH+Z3FFpbbuXusyauDZpX8xOs3y/JMZ1luU1bY/1VW78s/s1KzyF+UAoIc5eSYW85shfWFcEIXwTY+T111/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rOSs5KzmwlkNceUvRUqKlHApZVp+oF8/IMVVpEWkRYsXLV7kB+QH5AfkB+QH5sIPSHGVs5KzkrOaC2clZUvKlpStfpUt2Vv2HqLfleIq0iLSosWLFi/yA/ID8gPyA/IDc+EH9uCuTM+o+f8Ew9Zz2ccNZuFD40P+wSmf8o/yj/KPY7Kj+UHzQx/zw/8BGCUck8BEYhoAAAAASUVORK5CYII=" width="686" height="70" class="img_E7b_"></p><p>接着使用压缩包内的 <code>jsb-adapter</code> 替换掉编辑器的 <code>Resources/builtin/jsb-adapter</code> 目录。</p><div class="admonition admonition-info alert alert--info"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>提示</h5></div><div class="admonition-content"><p>如果你的项目不需要在原生平台上运行,则只定制 JavaScript 引擎即可。</p><p>如果你的项目需要在原生模拟器中预览,可能需要重新编译模拟器,更多详情可阅读官方的 <a href="https://docs.cocos.com/creator/2.4/manual/zh/advanced-topics/engine-customization.html" target="_blank" rel="noopener noreferrer">自定义引擎</a> 文档。</p></div></div><h3 class="anchor anchorWithStickyNavbar_mojV" id="2安装引擎扩展">2.安装引擎扩展<a class="hash-link" href="#2安装引擎扩展" title="标题的直接链接"></a></h3><div class="admonition admonition-caution alert alert--warning"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>注意</h5></div><div class="admonition-content"><p><strong>请勿将此引擎扩展与 <a href="/cocos-service-pack/docs/installation-guide/installation-engine-plugin">使用引擎扩展安装</a> 中的引擎扩展混淆!</strong></p><p><strong>该扩展提供了必需的内置资源,是服务包开源的一部分,请勿同时安装两个引擎扩展,这会引起冲突!</strong></p></div></div><p>压缩包内 <code>service-pack-support</code> 目录即是扩展本身,将其放到项目的 <code>packages</code> 目录即可。</p><p>服务包需要使用名为 <code>sp</code> 的 AssetBundle 存放资源,如果你的项目有使用 AssetBundle,请<strong>确保该名称未被占用</strong>。</p><p>没有必要将这个 Asset Bundle 设为远程包或者 Zip 压缩,里面只是一个多纹理 Effect 着色器资源。</p><p>更多详情可阅读官方的 <a href="https://docs.cocos.com/creator/2.4/manual/zh/extension/install-and-share.html" target="_blank" rel="noopener noreferrer">安装扩展</a> 文档。</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="3typescript-类型提示可选">3.TypeScript 类型提示(可选)<a class="hash-link" href="#3typescript-类型提示可选" title="标题的直接链接"></a></h3><p>如果你的项目使用 TypeScript,可将压缩包内 <code>creator-sp.d.ts</code> 文件拷贝到项目根目录中。</p><p><img loading="lazy" alt="dts" src="/cocos-service-pack/assets/images/dts-b0a6d67589aaa8fee8c37961e7c56151.png" width="712" height="164" class="img_E7b_"></p><p>部分代码编辑器可能需要重启之后类型提示才会生效。</p><h3 class="anchor anchorWithStickyNavbar_mojV" id="4重启-cocos-creator">4.重启 Cocos Creator<a class="hash-link" href="#4重启-cocos-creator" title="标题的直接链接"></a></h3><p>完成以上的步骤后重启 Cocos Creator。</p><p>可在项目预览时检查 Devtools Console 打印的是否为 <code>Cocos Creator SP v2.4.x</code>,是的话则已经成功安装。</p><p><img loading="lazy" src="/cocos-service-pack/assets/images/installed-console-0f88c8e116d47cedee5905a74c33c2c5.png" width="1081" height="241" class="img_E7b_"></p><p>接下来推荐你从 <a href="/cocos-service-pack/docs/start-guide/start-guide-intro">入门教程</a> 开始了解服务包为你的开发都带来了哪些新特性!</p><hr><h2 class="anchor anchorWithStickyNavbar_mojV" id="补丁安装">补丁安装<a class="hash-link" href="#补丁安装" title="标题的直接链接"></a></h2><div class="admonition admonition-caution alert alert--warning"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg></span>提示</h5></div><div class="admonition-content"><p><strong>建议至少将 Cocos Creator 升级到 v2.4.x 版本,服务包所做的改动不保证对 v2.4 版本以下的兼容性。</strong></p><p>补丁安装需要掌握一定的 <a href="https://git-scm.com/doc" target="_blank" rel="noopener noreferrer">Git</a> 知识和修改引擎源码的能力。</p></div></div><p>补丁安装实际上就是打 Git Patch,<strong>在压缩包内的 <code>patches</code> 目录放着最新的 Git Patch 文件。</strong></p><p>这种方式理论上可以在任意版本的引擎上进行,但由于这种方式如果需要正确的进行下去本就需要你拥有相关的知识与能力,所以我们不会说的很细致。</p><p>Git Patch 存储了我们所有的源码提交信息,所以你可以只挑选你想要的提交进行应用,在引擎目录去打补丁文件就等同于应用了我们对引擎的改动,之后就可以按照官方的自定义引擎文档去使用了。</p><p>打补丁一般使用两种命令:</p><ul><li>直接提交使用 <code>git am</code></li><li>只将改动保留到工作区使用 <code>git apply</code></li></ul><p>最好在打补丁时加上输出详细信息的命令参数以更好地确认补丁应用的情况。</p><p>常见的问题是我们在仓库的 <code>engine</code>、<code>jsb-adapter</code>、<code>cocos2d-x</code> 文件夹存放源码,那么提供的补丁文件对源码的应用路径也会是 <code>./engine</code> 这样的二级目录,如果你直接在引擎目录应用补丁,可能会发生没反应、补丁被跳过的问题,需要使用相应的命令参数来修正补丁应用的路径。</p><p>在完成自定义引擎的工作后,请别忘了安装引擎扩展哦。(可参考<a href="#2%E5%AE%89%E8%A3%85%E5%BC%95%E6%93%8E%E6%89%A9%E5%B1%95">标准安装的第 2 步</a>进行操作)。</p></div></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="文档分页导航"><a class="pagination-nav__link pagination-nav__link--prev" href="/cocos-service-pack/docs/installation-guide/installation-engine-plugin"><div class="pagination-nav__sublabel">上一页</div><div class="pagination-nav__label">使用引擎扩展安装</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/cocos-service-pack/docs/start-guide/start-guide-intro"><div class="pagination-nav__sublabel">下一页</div><div class="pagination-nav__label">入门指南</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_cNA8 thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#service-pack-v100" class="table-of-contents__link toc-highlight">Service Pack v1.0.0</a></li><li><a href="#标准安装" class="table-of-contents__link toc-highlight">标准安装</a><ul><li><a href="#1替换自定义引擎" class="table-of-contents__link toc-highlight">1.替换自定义引擎</a></li><li><a href="#2安装引擎扩展" class="table-of-contents__link toc-highlight">2.安装引擎扩展</a></li><li><a href="#3typescript-类型提示可选" class="table-of-contents__link toc-highlight">3.TypeScript 类型提示(可选)</a></li><li><a href="#4重启-cocos-creator" class="table-of-contents__link toc-highlight">4.重启 Cocos Creator</a></li></ul></li><li><a href="#补丁安装" class="table-of-contents__link toc-highlight">补丁安装</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2022 Cocos Service Pack.</div></div></div></footer></div>
|
||
<script src="/cocos-service-pack/assets/js/runtime~main.5825ae06.js"></script>
|
||
<script src="/cocos-service-pack/assets/js/main.25651981.js"></script>
|
||
</body>
|
||
</html> |