{"id":6959,"date":"2023-09-04T12:18:52","date_gmt":"2023-09-04T04:18:52","guid":{"rendered":"https:\/\/h5app.yimenapp.cn\/h5app\/?p=6959"},"modified":"2023-09-04T12:18:52","modified_gmt":"2023-09-04T04:18:52","slug":"html%e6%80%8e%e4%b9%88%e6%89%93%e5%8c%85exe%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/h5app.yimenapp.cn\/h5app\/2023\/ruanjiankf\/6959\/","title":{"rendered":"html\u600e\u4e48\u6253\u5305exe\uff1f"},"content":{"rendered":"<p>\u5c06HTML\u6253\u5305\u6210EXE\u6587\u4ef6<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/17\/15\/10722786419.jpg\" \/><\/figure>\n<\/p>\n<p>\u4e3b\u8981\u662f\u5c06\u7f51\u9875\u5e94\u7528<a href=\"https:\/\/www.yimenexe.com\/ruanjian-kaifa-1427.html\">mx\u751f\u6210\u7684exe<\/a>\u7a0b\u5e8f\u5c01\u88c5\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8ba9\u7528\u6237\u65e0\u9700\u6253\u5f00\u6d4f\u89c8\u5668\u5c31\u53ef\u4ee5\u8fd0\u884c\u3002\u5b9e\u9645\u4e0a\uff0c\u6253\u5305\u540e<a href=\"https:\/\/www.yimenexe.com\/ruanjian-kaifa-830.html\">js\u811a\u672c\u6253\u5305exe<\/a>\u7684EXE\u6587\u4ef6\u5185\u90e8\u5d4c\u6709\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u7f51\u9875\u6d4f\u89c8\u5668\uff0c\u7528\u4e8e\u89e3\u6790\u5e76\u5c55\u793aHTML\u6587\u4ef6\u3002\u5728\u6253\u5305\u524d\u8fd8\u53ef\u80fd\u8fdb\u884c\u4ee3\u7801\u538b\u7f29\u3001\u4f18\u5316\u7b49\u64cd\u4f5c\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u6253\u5305HTML\u5230EXE\u7684\u6982\u8ff0\uff1a<\/p>\n<p>1. \u9009\u62e9\u4e00\u4e2a\u6253\u5305\u5de5\u5177\uff1a<\/p>\n<p>\u6709\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5\u5c06HTML\u5c01\u88c5\u6210EXE\u6587\u4ef6\uff0c\u6bd4\u5982\u5229\u7528\u5f00\u6e90\u5de5\u5177NW.js\u3001Electron\u548cNativefier\u3002\u8fd9\u4e9b\u5de5\u5177\u57fa\u4e8eChromium\u6d4f\u89c8\u5668\uff0c\u521b\u5efa\u4e00\u4e2a\u8de8\u5e73\u53f0\u7684\u684c\u9762\u5e94\u7528\uff0c\u53ef\u4ee5\u7528\u4e8eWindows\u3001macOS\u548cLinux\u3002<\/p>\n<p>2. \u5b89\u88c5Node.js\uff1a<\/p>\n<p>\u4f7f\u7528\u8fd9\u4e9b\u6253\u5305\u5de5\u5177\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Node.js\u73af\u5883\u3002\u53ef\u4ee5\u4ece\u5b98\u7f51(https:\/\/nodejs.org\/)\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/p>\n<p>3. \u793a\u4f8b\uff1a\u4f7f\u7528Nativefier\u5c06HTML\u6253\u5305\u6210EXE\uff1a<\/p>\n<p>\u9996\u5148\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u5de5\u5177\u5b89\u88c5Nativefier\uff0c\u5168\u5c40\u5b89\u88c5\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>npm install nativefier -g<\/p>\n<p>&#8220;`<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6253\u5f00\u547d\u4ee4\u884c\uff0c\u5b9a\u4f4d\u5230\u4f60\u8981\u6253\u5305\u7684HTML\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u4f60\u6709\u4e00\u4e2a\u540d\u4e3a&#8221;index.html&#8221;\u7684\u6587\u4ef6\uff0c\u4f60\u5e0c\u671b\u6253\u5305\u5b83\u3002\u5728\u547d\u4ee4\u884c\u7a97\u53e3\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>nativefier &#8211;name &#8220;MyApp&#8221; &#8211;single-instance &#8220;file:\/\/\/[path-to-your-file]\/index.html&#8221;<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d`[path-to-your-file]`\u9700\u66ff\u6362\u4e3a\u5b9e\u9645\u5b58\u653e&#8221;index.html&#8221;\u7684\u6587\u4ef6\u5939\u8def\u5f84\uff0c`&#8221;MyApp&#8221;`\u4e3a\u4f60\u7684\u5e94\u7528\u7a0b\u5e8f\u540d\u79f0\uff0c\u5c06\u540c\u6837\u4f5c\u4e3a\u751f\u6210\u7684EXE\u6587\u4ef6\u540d\u3002<\/p>\n<p>\u5b8c\u6210\u540e\uff0c\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u5939\uff0c\u540d\u4e3a&#8221;MyApp-win32-x64&#8243;\uff08\u9488\u5bf9Windows 64\u4f4d\u7528\u6237\uff1b32\u4f4d\u7cfb\u7edf\u4e3a&#8221;MyApp-win32-ia32&#8243;\uff09\uff0c\u7528\u6765\u5b58\u653e\u751f\u6210\u7684EXE\u6587\u4ef6\u3002<\/p>\n<p>4. \u81ea\u5b9a\u4e49\u56fe\u6807\u548c\u5176\u5b83\u5c5e\u6027\uff1a<\/p>\n<p>Nativefier\u4e5f\u5141\u8bb8\u81ea\u5b9a\u4e49\u5e94\u7528\u7a0b\u5e8f\u7684\u5176\u5b83\u5c5e\u6027\uff0c\u5982\u56fe\u6807\u3001\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u7b49\u3002\u4f8b\u5982\uff0c\u8bbe\u7f6e\u56fe\u6807\uff08Requires &#8216;.ico&#8217; file format for Windows\uff09\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>nativefier &#8211;name &#8220;MyApp&#8221; &#8211;single-instance &#8211;icon &#8220;path-to-your-icon\/myicon.ico&#8221; &#8220;file:\/\/\/[path-to-your-file]\/index.html&#8221;<\/p>\n<p>&#8220;`<\/p>\n<p>\u4ee5\u4e0a\u7b80\u8981\u4ecb\u7ecd\u4e86HTML\u6253\u5305\u4e3aEXE\u7684\u8fc7\u7a0b\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd8\u53ef\u4ee5\u4e3a\u4f60\u7684EXE\u5e94\u7528\u7a0b\u5e8f\u6dfb\u52a0\u66f4\u591a\u529f\u80fd\u6216\u8005\u4f18\u5316\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u53c2\u8003\u94fe\u63a5\uff0c\u4fbf\u4e8e\u4f60\u6df1\u5165\u4e86\u89e3\u548c\u63a2\u7d22\u8fd9\u4e2a\u8fc7\u7a0b\uff1a<\/p>\n<p>&#8211; NW.js: https:\/\/nwjs.io\/<\/p>\n<p>&#8211; Electron: https:\/\/www.electronjs.org\/<\/p>\n<p>&#8211; Nativefier: https:\/\/github.com\/nativefier\/nativefier<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5c06HTML\u6253\u5305\u6210EXE\u6587\u4ef6\u4e3b\u8981\u662f\u5c06\u7f51\u9875\u5e94\u7528\u7a0b\u5e8f\u5c01\u88c5\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8ba9\u7528\u6237\u65e0\u9700\u6253\u5f00\u6d4f\u89c8\u5668\u5c31\u53ef\u4ee5\u8fd0\u884c\u3002\u5b9e\u9645\u4e0a\uff0c\u6253\u5305\u540e\u7684EXE\u6587\u4ef6\u5185\u90e8\u5d4c\u6709\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u7f51\u9875\u6d4f\u89c8\u5668\uff0c\u7528\u4e8e\u89e3\u6790\u5e76\u5c55\u793aHTML\u6587\u4ef6\u3002\u5728\u6253\u5305<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[12500,87,11,81,12501],"topic":[],"class_list":["post-6959","post","type-post","status-publish","format-standard","hentry","category-ruanjiankf","tag-pythonexe","tag-87","tag-11","tag-81","tag-exe"],"_links":{"self":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/6959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/comments?post=6959"}],"version-history":[{"count":0,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/posts\/6959\/revisions"}],"wp:attachment":[{"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/media?parent=6959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/categories?post=6959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/tags?post=6959"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/h5app.yimenapp.cn\/h5app\/wp-json\/wp\/v2\/topic?post=6959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}