Skip to content

Commit

Permalink
Deploying to main from @ GamemakerChina/GameMaker-maunl-zh@4cbbe4d 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
LiarOnce committed May 30, 2024
1 parent ac6bdba commit ccf4b68
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Settings/Building_via_Command_Line.htm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Settings/Runner_Details/Compiler_Batch_Files.htm
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath="../..",gTopicId="5.4.0_2"</script><script type="text/javascript" src="../../template/scripts/rh.min.js"></script><script type="text/javascript" src="../../template/scripts/common.min.js"></script><script type="text/javascript" src="../../template/scripts/topic.min.js"></script><script type="text/javascript" src="../../template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="../../whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="../../template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="../../template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><link rel="stylesheet" type="text/css" href="../../assets/css/default.css"><script src="../../../assets/scripts/main_script.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="Adobe RoboHelp 2022"><title>Compiler Batch Files / Scripts</title><meta name="topic-status" content="Draft"><link rel="stylesheet" type="text/css" href="../../assets/css/default.css"><meta name="template" content="../../assets/masterpages/Manual_Page.htt"><meta name="rh-authors" content="Gurpreet S. Matharoo"><meta name="topic-comment" content="Page explaining the batch files that can be used with the compiler"><meta name="rh-index-keywords" content="Compiler Batch Files Scripts"><meta name="search-keywords" content="compiler, batch, files, shell, scripts, asset compiler, run, build"><meta name="brsnext" value="Settings/Command_Line_Parameters.htm"><meta name="brsprev" value="Settings/Building_via_Command_Line.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="Compiler Batch Files / Scripts"><span>Compiler Batch Files / Scripts</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><div></div><div><h1>编译器批处理文件/脚本</h1><p><span data-keyref="GameMaker Name">GameMaker</span> 编译器允许您将批处理文件(Windows)或 Shell 脚本(在 macOS 和 Linux 上)放在项目目录中,并放在项目中每个扩展的目录中。</p><h2>安置</h2><p>脚本文件可以放置在项目目录的根目录中,与项目的<span class="inline2">.yyp</span>文件放在一起。</p><p>脚本文件也可以放置在扩展名的目录中,这个目录可能像下面这样:<span class="inline2">project_directory/extensions/extension_folder/</span>.</p><p>脚本文件的扩展版本将首先执行,其根目录版本将最后执行。扩展的执行顺序无法控制,因此扩展开发人员必须确保一个扩展的脚本不依赖于另一个扩展的脚本。</p><h2>执行</h2><p>具有特定名称的脚本文件,放置在上面描述的任何目录中,在编译过程的不同点执行:</p><p class="note"><span data-conref="../../assets/snippets/Tag_note.hts"><span class="note">NOTE</span></span>&nbsp;These steps are listed in the order that they are run, except for those under "<strong>Platform-Specific Steps</strong>".</p><table border="1" cellpadding="1" cellspacing="1"><colgroup><col style="width:33.33%"><col style="width:33.33%"><col style="width:33.33%"></colgroup><tbody><tr><th>Windows 批处理文件名</th><th>MacOS/Linux Shell 脚本名称</th><th>描述</th></tr><tr><td><strong>pre_project_step.bat</strong></td><td><strong>pre_project_step.sh</strong></td><td>This is executed before the asset compiler has loaded the project files</td></tr><tr><td><strong>post_project_step.bat</strong></td><td><strong>post_project_step.sh</strong></td><td>This is executed after the asset compiler has loaded the project files</td></tr><tr><td><strong>pre_run_step.bat</strong></td><td><strong>pre_run_step.sh</strong></td><td><em>Only runs when testing the game ("Run" or F5 in the IDE), not run when creating a package</em><br><br>This is executed before the game deployment is about to start</td></tr><tr><td><strong>pre_build_step.bat</strong></td><td><strong>pre_build_step.sh</strong></td><td>This is executed before the asset compiler is asked to build the game</td></tr><tr><td><strong>post_textures.bat</strong></td><td><strong>post_textures.sh</strong></td><td>这是在游戏的纹理生成之后执行的。您可以使用此步骤手动优化游戏纹理。<br><br>这个脚本接收一个名为 <span class="inline2">TexturesDir</span> 的环境变量,它存储到生成的纹理的路径。</td></tr><tr><td><strong>post_build_step.bat</strong></td><td><strong>post_build_step.sh</strong></td><td>这是在资源编译器已经开始构建游戏之后执行的</td></tr><tr><td><strong>remote_build_step.bat</strong></td><td><strong>remote_build_step.sh</strong></td><td>当您在Windows机器上并为macOS/iOS/tvOS或Ubuntu远程编译时,这将在远程机器上执行。</td></tr><tr><td><strong>pre_package_step.bat</strong></td><td><strong>pre_package_step.sh</strong></td><td>这在最终打包步骤之前执行,最终打包步骤是所有文件都准备就绪但即将创建最终 ZIP 文件或存储包的时候</td></tr><tr><td><strong>post_package_step.bat</strong></td><td><strong>post_package_step.sh</strong></td><td><em>Only runs when creating a package/executable</em><br><br>This is executed after the final packaging step has completed and the final ZIP file or store package has been prepared</td></tr><tr><td><strong>post_run_step.bat</strong></td><td><strong>post_run_step.sh</strong></td><td><em>Only runs when testing the game ("Run" or F5 in the IDE), not run when creating a package</em><br><br>This is executed when the game is prepared and ready to run; after the script's execution the game is started</td></tr><tr><th colspan="3">Platform-Specific Steps</th></tr><tr><td><strong>pre_gradle_step.bat</strong></td><td><strong>pre_gradle_step.sh</strong></td><td><span class="important">Android</span> This is executed when the files necessary for the Android tools have been created, but before Gradle is called. You can use this step to access and modify the Android files yourself, before the Android tools compile it into a final executable.</td></tr></tbody></table><p>在所有目标平台上构建时都支持这些脚本文件。</p><h2>扩展模块版本和选项环境变量</h2><p>您可以在批处理文件/外壳脚本中检索扩展版本和任何扩展选项:</p><ul class="colour"><li>扩展选项:&nbsp;<span class="inline2">YYEXTOPT_&lt;ExtensionName&gt;_&lt;OptionName&gt;</span></li><li>版本号:&nbsp;<span class="inline2">GMEXT_&lt;ExtensionName&gt;_version</span></li></ul><p>将此处的 <span class="inline2">&lt;ExtensionName&gt;</span> 替换为您正在使用的扩展的名称。</p><h2>禁用扩展脚本</h2><p>如果您使用多个运行脚本的扩展,例如 Steamworks 和 GDK,那么在导出到 GDK 时,您将希望禁用 Steamworks,反之亦然。</p><p>有关这一点,请参见: <a href="../../The_Asset_Editors/Extension_Creation/Disabling_Extensions.htm">如何禁用扩展?</a></p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><div class="footer"><div class="buttons"><div class="clear"><div>Back:&nbsp;<a href="Runner_Details.htm">运行器和编译器</a></div><div>Next:&nbsp;<a href="../Command_Line_Parameters.htm">命令行参数</a></div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></div></body></html>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><script type="text/javascript" language="JavaScript">function reDo(){innerWidth==origWidth&&innerHeight==origHeight||location.reload()}4==parseInt(navigator.appVersion)&&"Netscape"==navigator.appName&&(origWidth=innerWidth,origHeight=innerHeight,onresize=reDo),onerror=null</script><style type="text/css">p.WebHelpNavBar{text-align:right}</style><script type="text/javascript">gCommonRootRelPath=gRootRelPath="../..",gTopicId="5.4.0_2"</script><script type="text/javascript" src="../../template/scripts/rh.min.js"></script><script type="text/javascript" src="../../template/scripts/common.min.js"></script><script type="text/javascript" src="../../template/scripts/topic.min.js"></script><script type="text/javascript" src="../../template/scripts/topicwidgets.min.js"></script><script type="text/javascript" src="../../whxdata/projectsettings.js"></script><link rel="stylesheet" type="text/css" href="../../template/styles/topic.min.css"><link rel="stylesheet" type="text/css" href="../../template/Charcoal_Grey/topicheader.css"><meta name="topic-status" content="Draft"><link rel="stylesheet" type="text/css" href="../../assets/css/default.css"><script src="../../../assets/scripts/main_script.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="Adobe RoboHelp 2022"><title>Compiler Batch Files / Scripts</title><meta name="topic-status" content="Draft"><link rel="stylesheet" type="text/css" href="../../assets/css/default.css"><meta name="template" content="../../assets/masterpages/Manual_Page.htt"><meta name="rh-authors" content="Gurpreet S. Matharoo"><meta name="topic-comment" content="Page explaining the batch files that can be used with the compiler"><meta name="rh-index-keywords" content="Compiler Batch Files Scripts"><meta name="search-keywords" content="compiler, batch, files, shell, scripts, asset compiler, run, build"><meta name="brsnext" value="Settings/Command_Line_Parameters.htm"><meta name="brsprev" value="Settings/Building_via_Command_Line.htm"></head><body><div class="topic-header rh-hide" id="rh-topic-header"><div class="logo"></div><div class="nav"><div class="title" title="Compiler Batch Files / Scripts"><span>Compiler Batch Files / Scripts</span></div><div class="gotohome" title="Click here to see this page in full context"><a href="#" onclick="rh._.goToFullLayout()">Click here to see this page in full context</a></div></div></div><div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div><div></div><div><h1>编译器批处理文件/脚本</h1><p><span data-keyref="GameMaker Name">GameMaker</span> 编译器允许您将批处理文件(Windows)或 Shell 脚本(在 macOS 和 Linux 上)放在项目目录中,并放在项目中每个扩展的目录中。</p><h2>安置</h2><p>脚本文件可以放置在项目目录的根目录中,与项目的<span class="inline2">.yyp</span>文件放在一起。</p><p>脚本文件也可以放置在扩展名的目录中,这个目录可能像下面这样:<span class="inline2">project_directory/extensions/extension_folder/</span>.</p><p>脚本文件的扩展版本将首先执行,其根目录版本将最后执行。扩展的执行顺序无法控制,因此扩展开发人员必须确保一个扩展的脚本不依赖于另一个扩展的脚本。</p><h2>执行</h2><p>具有特定名称的脚本文件,放置在上面描述的任何目录中,在编译过程的不同点执行:</p><p class="note"><span data-conref="../../assets/snippets/Tag_note.hts"><span class="note">注意</span></span> 这些步骤按运行顺序列出,但"<strong>平台特定步骤</strong>"下的除外。</p><table border="1" cellpadding="1" cellspacing="1"><colgroup><col style="width:33.33%"><col style="width:33.33%"><col style="width:33.33%"></colgroup><tbody><tr><th>Windows 批处理文件名</th><th>MacOS/Linux Shell 脚本名称</th><th>描述</th></tr><tr><td><strong>pre_project_step.bat</strong></td><td><strong>pre_project_step.sh</strong></td><td>这在资源编译器加载项目文件之前执行</td></tr><tr><td><strong>post_project_step.bat</strong></td><td><strong>post_project_step.sh</strong></td><td>这是在资源编译器加载了项目文件之后执行的</td></tr><tr><td><strong>pre_run_step.bat</strong></td><td><strong>pre_run_step.sh</strong></td><td><em>仅在测试游戏时运行 (IDE 中的"运行"或 F5 键),在创建软件包时不运行</em><br><br>此操作在游戏部署即将开始之前执行</td></tr><tr><td><strong>pre_build_step.bat</strong></td><td><strong>pre_build_step.sh</strong></td><td>这是在要求资源编译器构建游戏之前执行的</td></tr><tr><td><strong>post_textures.bat</strong></td><td><strong>post_textures.sh</strong></td><td>这是在游戏的纹理生成之后执行的。您可以使用此步骤手动优化游戏纹理。<br><br>这个脚本接收一个名为 <span class="inline2">TexturesDir</span> 的环境变量,它存储到生成的纹理的路径。</td></tr><tr><td><strong>post_build_step.bat</strong></td><td><strong>post_build_step.sh</strong></td><td>这是在资源编译器已经开始构建游戏之后执行的</td></tr><tr><td><strong>remote_build_step.bat</strong></td><td><strong>remote_build_step.sh</strong></td><td>当您在Windows机器上并为macOS/iOS/tvOS或Ubuntu远程编译时,这将在远程机器上执行。</td></tr><tr><td><strong>pre_package_step.bat</strong></td><td><strong>pre_package_step.sh</strong></td><td>这在最终打包步骤之前执行,最终打包步骤是所有文件都准备就绪但即将创建最终 ZIP 文件或存储包的时候</td></tr><tr><td><strong>post_package_step.bat</strong></td><td><strong>post_package_step.sh</strong></td><td><em>仅在创建包/可执行文件时运行</em><br><br>这在完成最终打包步骤并准备好最终ZIP文件或存储包后执行</td></tr><tr><td><strong>post_run_step.bat</strong></td><td><strong>post_run_step.sh</strong></td><td><em>仅在测试游戏时运行(IDE中的"运行"或 F5 键),而不是在创建软件包时运行</em><br><br>这在游戏准备就绪并准备运行时执行脚本执行后,游戏将启动</td></tr><tr><th colspan="3">平台特定步骤</th></tr><tr><td><strong>pre_gradle_step.bat</strong></td><td><strong>pre_gradle_step.sh</strong></td><td><span class="important">Android</span> 这是在创建 Android 工具所需的文件时执行的,但在调用 Gradle 之前。您可以使用此步骤在 Android 工具将其编译为最终可执行文件之前自行访问和修改 Android 文件。</td></tr></tbody></table><p>在所有目标平台上构建时都支持这些脚本文件。</p><h2>扩展模块版本和选项环境变量</h2><p>您可以在批处理文件/外壳脚本中检索扩展版本和任何扩展选项:</p><ul class="colour"><li>扩展选项:&nbsp;<span class="inline2">YYEXTOPT_&lt;ExtensionName&gt;_&lt;OptionName&gt;</span></li><li>版本号:&nbsp;<span class="inline2">GMEXT_&lt;ExtensionName&gt;_version</span></li></ul><p>将此处的 <span class="inline2">&lt;ExtensionName&gt;</span> 替换为您正在使用的扩展的名称。</p><h2>禁用扩展脚本</h2><p>如果您使用多个运行脚本的扩展,例如 Steamworks 和 GDK,那么在导出到 GDK 时,您将希望禁用 Steamworks,反之亦然。</p><p>有关这一点,请参见: <a href="../../The_Asset_Editors/Extension_Creation/Disabling_Extensions.htm">如何禁用扩展?</a></p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><div class="footer"><div class="buttons"><div class="clear"><div>Back:&nbsp;<a href="Runner_Details.htm">运行器和编译器</a></div><div>Next:&nbsp;<a href="../Command_Line_Parameters.htm">命令行参数</a></div></div></div><h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5></div></div></body></html>
Loading

0 comments on commit ccf4b68

Please sign in to comment.