{"id":3339,"date":"2023-08-21T15:47:01","date_gmt":"2023-08-21T07:47:01","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=3339"},"modified":"2023-08-21T15:47:01","modified_gmt":"2023-08-21T07:47:01","slug":"html%e7%94%9f%e6%88%90exe%e5%b8%b8%e7%94%a8%e5%b7%a5%e5%85%b7%e6%8e%a8%e8%8d%90%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/3339\/","title":{"rendered":"html\u751f\u6210exe\u5e38\u7528\u5de5\u5177\u63a8\u8350\uff1f"},"content":{"rendered":"

HTML\u751f\u6210exe\u6307\u7684\u662f\u5c06HTML\u6587\u4ef6\u8f6c\u5316\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff08.exe\uff09\u7684\u8fc7\u7a0b\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u8f6f\u4ef6\u5de5\u5177\u6765\u5b9e\u73b0\uff0c\u5176\u4e2d\u6bd4\u8f83\u5e38\u7528\u7684\u5de5\u5177\u5305\u62ecElectron\u3001NW.js\u3001AppJS\u7b49\u3002<\/p>\n

\u8fd9\u4e9b\u5de5\u5177\u7684\u57fa\u672c\u539f\u7406\u662f\u5c06HTML\u6587\u4ef6\u548cJavaScript\u4ee3\u7801\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u7136\u540e\u901a\u8fc7\u8fd0\u884c\u8fd9\u4e2a\u6587\u4ef6\u6765\u5c55\u793aHTML\u9875\u9762\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\uff0c\u5de5\u5177\u4f1a\u5c06HTML\u6587\u4ef6\u548cJavaScript\u4ee3\u7801\u6253\u5305\u8fdb\u4e00\u4e2a\u6846\u67b6\u4e2d\uff0c\u8fd9\u4e2a\u6846\u67b6\u53ef\u4ee5\u63d0\u4f9b\u4e00\u4e9b\u57fa\u672c\u7684\u754c\u9762\u7ec4\u4ef6\u548cAPI\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u8c03\u7528\u7cfb\u7edf\u7ea7\u522b\u7684\u64cd\u4f5c\u6765\u5b9e\u73b0\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n

\u5176\u4e2d\uff0cElectron\u662f\u6bd4\u8f83\u5e38\u7528\u6253\u5305exe\u4e3a\u5b89\u88c5\u7a0b\u5e8f<\/a>\u7684\u4e00\u79cd\u5de5\u5177\uff0c\u5b83\u662f\u7531GitHub\u5f00\u53d1\u7684\u4e00\u4e2a\u5f00\u6e90\u6846\u67b6\uff0c\u53ef\u4ee5\u5c06HTML\u3001CSS\u548cJavaScript\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u540c\u65f6\u8fd8\u53ef\u4ee5\u4f7f\u7528Nod<\/p>\n

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

e.js\u7684API\u6765\u5b9e\u73b0\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\u3002\u4e0b\u9762\u662fElectron\u751f\u6210exe\u7684\u57fa\u672c\u6d41\u7a0b\uff1a<\/p>\n

1. \u521b\u5efa\u4e00\u4e2aElectr\u600e\u4e48\u6253\u5305deb<\/a>on\u9879\u76ee\uff0c\u5305\u542b\u4e00\u4e2amain.js\u6587\u4ef6\u548c\u4e00\u4e2aindex.html\u6587\u4ef6\u3002<\/p>\n

2. \u5728main.js\u6587\u4ef6\u4e2d\uff0c\u4f7f\u7528Electron\u7684API\u521b\u5efa\u4e00\u4e2a\u7a97\u53e3\uff0c\u7136\u540e\u52a0\u8f7dindex.html\u6587\u4ef6\u3002<\/p>\n

3. \u5728index.html\u6587\u4ef6\u4e2d\uff0c\u7f16\u5199HTML\u548cJavaScript\u4ee3\u7801\uff0c\u5b9e\u73b0\u9875\u9762\u7684\u529f\u80fd\u3002<\/p>\n

4. \u4f7f\u7528Electron\u7684\u6253\u5305\u5de5\u5177\u5c06\u9879\u76ee\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u751f\u6210exe\u6587\u4ef6\u3002<\/p>\n

5. \u8fd0\u884cexe\u6587\u4ef6\uff0c\u5373\u53ef\u5c55\u793aHTML\u9875\u9762\u3002<\/p>\n

\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u751f\u6210exe\u6587\u4ef6\u5e76\u4e0d\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u8fc7\u7a0b\uff0c\u9700\u8981\u4e00\u5b9a\u7684\u6280\u672f\u548c\u7ecf\u9a8c\u3002\u540c\u65f6\uff0c\u751f\u6210\u7684exe\u6587\u4ef6\u4e5f\u53ef\u80fd\u5b58\u5728\u4e00\u4e9b\u5b89\u5168\u9690\u60a3\uff0c\u9700\u8981\u6ce8\u610f\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u548c\u5b89\u5168\u3002\u56e0\u6b64\uff0c\u5728\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u65f6\uff0c\u9700\u8981\u8c28\u614e\u64cd\u4f5c\uff0c\u9075\u5faa\u76f8\u5173\u7684\u89c4\u8303\u548c\u5b89\u5168\u8981\u6c42\u3002<\/p>\n

\u603b\u4e4b\uff0cHTML\u751f\u6210exe\u662f\u4e00\u79cd\u6bd4\u8f83\u5e38\u7528\u7684\u6280\u672f\uff0c\u53ef\u4ee5\u5c06HTML\u9875\u9762\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u7528\u6237\u7684\u4f7f\u7528\u548c\u7ba1\u7406\u3002\u901a\u8fc7\u4e00\u4e9b\u8f6f\u4ef6\u5de5\u5177\uff0c\u53ef\u4ee5\u5b9e\u73b0\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u540c\u65f6\u4e5f\u9700\u8981\u6ce8\u610f\u4fdd\u62a4\u7528\u6237\u7684\u9690\u79c1\u548c\u5b89\u5168\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

HTML\u751f\u6210exe\u6307\u7684\u662f\u5c06HTML\u6587\u4ef6\u8f6c\u5316\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff08.exe\uff09\u7684\u8fc7\u7a0b\u3002\u8fd9\u4e2a\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u8f6f\u4ef6\u5de5\u5177\u6765\u5b9e\u73b0\uff0c\u5176\u4e2d\u6bd4\u8f83\u5e38\u7528\u7684\u5de5\u5177\u5305\u62ecElectron\u3001NW.js\u3001AppJS\u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u7684\u57fa\u672c\u539f\u7406\u662f\u5c06<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[6713,6712,256,52,16],"topic":[],"class_list":["post-3339","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-debdebian","tag-exehtml","tag-256","tag-52","tag-16"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=3339"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/3339\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=3339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=3339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=3339"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=3339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}