{"id":10230,"date":"2023-11-27T15:44:32","date_gmt":"2023-11-27T07:44:32","guid":{"rendered":"https:\/\/www.zhidianwl.net\/zhidianwl\/?p=10230"},"modified":"2023-11-27T15:44:32","modified_gmt":"2023-11-27T07:44:32","slug":"pkg%e6%89%93%e5%8c%85exe%e7%bb%86%e8%8a%82%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.zhidianwl.net\/zhidianwl\/2023\/11\/27\/pkg%e6%89%93%e5%8c%85exe%e7%bb%86%e8%8a%82%e4%bb%8b%e7%bb%8d\/","title":{"rendered":"pkg\u6253\u5305exe\u7ec6\u8282\u4ecb\u7ecd"},"content":{"rendered":"

\u5728\u8ba1\u7b97\u673a\u9886\u57df\u4e2d\uff0cpkg \u662f\u4e00\u79cd\u7528\u4e8e\u6253\u5305\u548c\u5b89\u88c5\u8f6f\u4ef6\u7684\u6587\u4ef6\u683c\u5f0f\u3002\u5728 Windows \u7cfb\u7edf\u4e2d\uff0cexe \u662f\u4e00\u79cd\u53ef\u6267\u884c\u6587\u4ef6\u683c\u5f0f\uff0c\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u5728 Windows \u64cd\u4f5c\u7cfb\u7edf\u4e0a\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5c06 pkg \u683c\u5f0f\u7684\u8f6f\u4ef6\u6253\u5305\u6210 exe \u683c\u5f0f\u7684\u53ef\u6267\u884c\u6587\u4ef6\u5462\uff1f\u4e0b\u9762\u5c06\u4ecb\u7ecd\u6253\u5305 exe \u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n

1. \u539f\u7406<\/p>\n

\u5728\u6253\u5305 exe \u7684\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u5c06 pkg \u6587\u4ef6\u4e2d\u7684\u7a0b\u5e8f\u4ee3\u7801\u3001\u8d44\u6e90\u6587\u4ef6\u7b49\u6253\u5305\u6210\u4e00\u4e2a exe \u6587\u4ef6\uff0c\u540c\u65f6\u8fd8\u9700\u8981\u6dfb\u52a0\u4e00\u4e9b\u5b89\u88c5\u548c\u5378\u8f7d\u7684\u811a\u672c\u4ee3\u7801\uff0c\u4ee5\u65b9\u4fbf\u7528\u6237\u5b89\u88c5\u548c\u5378\u8f7d\u8f6f\u4ef6\u3002\u56e0\u6b64\uff0c\u6253\u5305 exe \u7684\u539f\u7406\u53ef\u4ee5\u6982\u62ec\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n

1\uff09\u5c06 pkg \u6587\u4ef6\u4e2d\u7684\u7a0b\u5e8f\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u8fdb\u884c\u63d0\u53d6\u548c\u6574\u5408\uff0c\u751f\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u7684 exe \u6587\u4ef6\u3002<\/p>\n

2\uff09\u6dfb\u52a0\u5b89\u88c5\u548c\u5378\u8f7d\u7684\u811a\u672c\u4ee3\u7801\uff0c\u4ee5\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u8f6f\u4ef6\u7684\u5b89\u88c5\u548c\u5378\u8f7d\u3002<\/p>\n

3\uff09\u5bf9 exe \u6587\u4ef6\u8fdb\u884c\u538b\u7f29\u548c\u52a0\u5bc6\uff0c\u4ee5\u4fdd\u8bc1\u8f6f\u4ef6\u7684\u5b89\u5168\u6027windows\u7684\u5e94\u7528<\/a>\u3002<\/p>\n

2. \u8be6\u7ec6\u6b65\u9aa4<\/p>\n

\u4e0b\u9762\u5c06\u4ecb\u7ecd\u5177\u4f53\u7684\u6253\u5305 exe \u7684\u6b65\u9aa4\uff1a<\/p>\n

1\uff09\u5b89\u88c5\u6253\u5305\u5de5\u5177<\/p>\n

\u9996\u5148\u9700\u8981\u5b89\u88c5\u4e00\u4e2a\u6253\u5305\u5de5\u5177\uff0c\u5982 Inno Setup \u6216\u8005 NSIS\u3002\u8fd9\u4e9b\u5de5\u5177\u90fd\u662f\u514d\u8d39\u7684\uff0c\u53ef\u4ee5\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002\u8fd9\u91cc\u4ee5 Inno Setup \u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u6253\u5305 exe \u7684\u6b65\u9aa4\u3002<\/p>\n

2\uff09\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5de5\u7a0b<\/p>\n

\u6253\u5f00 Inno Setup\uff0c\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cNew\u201d\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5de5\u7a0b\u3002\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u586b\u5199\u8f6f\u4ef6\u7684\u540d\u79f0\u3001\u7248\u672c\u53f7\u7b49\u4fe1\u606f\u3002<\/p>\n

3\uff09\u6dfb\u52a0\u6587\u4ef6<\/p>\n

\u5728 Inno Setup \u7684\u4e3b\u754c\u9762\u4e2d\uff0c\u70b9\u51fb\u201cFiles\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cAdd Files\u201d\uff0c\u5c06 pkg \u6587\u4ef6\u4e2d\u7684\u7a0b\u5e8f\u4ee3\u7801\u548c\u8d44\u6e90\u6587\u4ef6\u6dfb\u52a0\u5230\u5de5\u7a0b\u4e2d\u3002\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u6587\u4ef6\u76f4\u63a5\u62d6\u653e\u5230 Inno Setup \u7684\u4e3b\u754c\u9762\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u201cAdd Fi<\/p>\n

<\/figure>\n<\/p>\n

les\u201d\u6309\u94ae\u8fdb\u884c\u6dfb\u52a0\u3002<\/p>\n

4\uff09\u8bbe\u7f6e\u5b89\u88c5\u811a\u672c<\/p>\n

\u5728 Inno Setup \u7684\u4e3b\u754c\u9762\u4e2d\uff0c\u70b9\u51fb\u201cCode\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cEdit Script\u201d\uff0c\u6253\u5f00\u5b89\u88c5\u811a\u672c\u6587\u4ef6\u3002\u5728\u811a\u672c\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u8f6f\u4ef6\u7684\u5b89\u88c5\u8def\u5f84\u3001\u6ce8\u518c\u8868\u9879\u3001\u5feb\u6377\u65b9\u5f0f\u7b49\u4fe1\u606f\u3002<\/p>\n

5\uff09\u8bbe\u7f6e\u5378\u8f7d\u811a\u672c<\/p>\n

\u5728\u5b89\u88c5\u811a\u672c\u6587\u4ef6\u4e2d\uff0c\u8fd8\u53ef\u4ee5\u8bbe\u7f6e\u8f6f\u4ef6\u7684\u5378\u8f7d\u811a\u672c\u3002\u5728\u811a\u672c\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u5378\u8f7d\u65f6\u9700\u8981\u5220\u9664\u7684\u6587\u4ef6\u3001\u6ce8\u518c\u8868\u9879\u7b49\u4fe1\u606f\u3002<\/p>\n

6\uff09\u7f16\u8bd1\u5de5\u7a0b<\/p>\n

\u5728 Inno Setup \u7684\u4e3b\u754c\u9762\u4e2d\uff0c\u70b9\u51fb\u201cBuild\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cCompile\u201d\uff0c\u7f16\u8bd1\u5de5\u7a0b\u3002\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a exe \u6587\u4ef6\uff0c\u53ef\u4ee5\u7528\u4e8e\u8f6f\u4ef6\u7684\u5b89\u88c5\u3002<\/p>\n

7\uff09\u6d4b\u8bd5\u8f6f\u4ef6<\/p>\n

\u4f7f\u7528\u751f\u6210\u7684 exe \u6587\u4ef6\uff0c\u8fdb\u884c\u8f6f\u4ef6\u7684\u5b89\u88c5\u548c\u5378\u8f7d\u6d4b\u8bd5\u3002\u5982\u679c\u4e00ios\u4e00\u952e\u6253\u5305exe\u5de5\u5177<\/a>\u5207\u6b63\u5e38\uff0c\u5c31\u53ef\u4ee5\u5c06 exe \u6587\u4ef6\u53d1\u5e03\u7ed9\u7528\u6237\u4f7f\u7528\u4e86\u3002<\/p>\n

\u603b\u7ed3\uff1a<\/p>\n

\u4ee5\u4e0a\u5c31\u662f\u6253\u5305 exe \u7684\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002\u901a\u8fc7\u6253\u5305 exe\uff0c\u53ef\u4ee5\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u8f6f\u4ef6\u7684\u5b89\u88c5\u548c\u5378\u8f7d\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u4fdd\u8bc1\u8f6f\u4ef6\u7684\u5b89\u5168\u6027\u3002\u5982\u679c\u60a8\u662f\u4e00\u540d\u7f51\u7ad9\u535a\u4e3b\uff0c\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u77e5\u8bc6\u5e94\u7528\u5230\u81ea\u5df1\u7684\u7f51\u7ad9\u4e2d\uff0c\u4e3a\u8bfb\u8005\u63d0\u4f9b\u66f4\u52a0\u8be6\u7ec6\u548c\u5168\u9762\u7684\u6559\u7a0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u8ba1\u7b97\u673a\u9886\u57df\u4e2d\uff0cpkg \u662f\u4e00\u79cd\u7528\u4e8e\u6253\u5305\u548c\u5b89\u88c5\u8f6f\u4ef6\u7684\u6587\u4ef6\u683c\u5f0f\u3002\u5728 Windows \u7cfb\u7edf\u4e2d\uff0cexe \u662f\u4e00\u79cd\u53ef\u6267\u884c\u6587\u4ef6\u683c\u5f0f\uff0c\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u5728 Windows \u64cd\u4f5c\u7cfb\u7edf\u4e0a\u3002\u90a3\u4e48\uff0c\u5982\u4f55\u5c06 pkg \u683c\u5f0f\u7684\u8f6f\u4ef6\u6253\u5305<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[16347,308,12,2306,16],"topic":[],"class_list":["post-10230","post","type-post","status-publish","format-standard","hentry","category-zhuomianruanjian","tag-windowstar","tag-308","tag-12","tag-2306","tag-16"],"_links":{"self":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/10230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/comments?post=10230"}],"version-history":[{"count":1,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/10230\/revisions"}],"predecessor-version":[{"id":10276,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/posts\/10230\/revisions\/10276"}],"wp:attachment":[{"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/media?parent=10230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/categories?post=10230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/tags?post=10230"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.zhidianwl.net\/zhidianwl\/wp-json\/wp\/v2\/topic?post=10230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}