{"id":37725,"date":"2025-07-21T15:39:53","date_gmt":"2025-07-21T07:39:53","guid":{"rendered":"https:\/\/app.60day.cn\/appday\/?p=37725"},"modified":"2025-07-21T15:39:53","modified_gmt":"2025-07-21T07:39:53","slug":"%e5%89%8d%e5%90%8e%e7%ab%af%e5%88%86%e7%a6%bb%e6%89%93%e5%8c%85exe%e6%93%8d%e4%bd%9c%e5%8a%9e%e6%b3%95%e4%bb%8b%e7%bb%8d%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.60day.cn\/appday\/kaifaexe\/37725\/","title":{"rendered":"\u524d\u540e\u7aef\u5206\u79bb\u6253\u5305exe\u64cd\u4f5c\u529e\u6cd5\u4ecb\u7ecd\uff1f"},"content":{"rendered":"<p>\u524d\u540e\u7aef\u5206\u79bb\u662f\u73b0\u4ee3Web\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u7684\u4e00\u79cd\u6d41\u884c\u6a21\u5f0f\uff0c\u5b83\u5c06\u524d\u7aef\u548c\u540e\u7aef\u4ee3\u7801\u5206\u5f00\uff0c\u4f7f\u5f97\u5f00\u53d1\u56e2\u961f\u53ef\u4ee5\u72ec\u7acb\u5730\u5f00\u53d1\u548c\u7ef4\u62a4\u5404\u81ea\u7684\u4ee3\u7801\u3002\u8fd9\u79cd\u6a21\u5f0f\u6709\u5f88\u591a\u4f18\u70b9\uff0c\u6bd4\u5982\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3001\u964d\u4f4e\u7ef4\u62a4\u6210\u672c\u7b49\u3002\u7136\u800c\uff0c\u5728\u90e8\u7f72\u548c\u4ea4\u4ed8\u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u524d\u540e\u7aef\u5206\u79bb\u4e5f\u5e26\u6765\u4e86\u65b0\u7684\u6311\u6218\uff0c\u5176\u4e2d\u4e4b\u4e00\u5c31\u662f\u5982\u4f55\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff08exe\uff09\u3002<\/p>\n<p>\u6253\u5305\u524d\u7aef\u4ee3\u7801\u6210exe\u7684\u6838\u5fc3\u601d\u8def\u662f\u5c06\u6240\u6709\u7684<a href=\"https:\/\/exe.yimenapp.com\/tool-2470.html\">\u6253\u5305html<\/a>\u524d\u7aef\u4ee3\u7801\uff08HTML\u3001CSS\u3001JavaScript\u7b49\uff09\u6253\u5305\u5230\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\uff0c\u5e76\u4e14\u5c06\u8fd9\u4e2a\u6587\u4ef6\u53d1\u5e03\u7ed9\u7528\u6237\u3002\u8fd9\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u53ef\u4ee5\u662f\u4e00\u4e2a\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\uff08\u6bd4\u5982Electron\u3001NW.js\u7b49\uff09\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u5355\u72ec\u7684Web\u6d4f\u89c8\u5668\uff0c\u53ea\u9700\u8981\u8ba9\u7528\u6237\u53cc\u51fb\u8fd9\u4e2a\u6587\u4ef6\u5373\u53ef\u8fd0\u884c\u6574\u4e2a\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u4e0b\u9762\u4ecb\u7ecd\u4e00\u79cd\u57fa\u4e8eElectron\u7684\u524d\u540e\u7aef\u5206\u79bb\u6253\u5305exe\u7684\u65b9\u6cd5\uff1a<\/p>\n<p>1. \u51c6\u5907\u5de5\u4f5c<\/p>\n<p>\u9996\u5148\u9700\u8981\u5b89\u88c5Node.js\u548cElectron\u3002Node.js\u662f\u4e00\u4e2a\u57fa\u4e8eChrome V8\u5f15\u64ce\u7684JavaScript\u8fd0\u884c\u73af\u5883\uff0c\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u7aef\u8fd0\u884cJavaScript\u4ee3\u7801\u3002\u800cElectron\u662f\u4e00\u4e2a\u57fa\u4e8eNode.js\u548cChromium\u7684\u8de8\u5e73\u53f0\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u6846\u67b6\uff0c\u53ef\u4ee5\u5c06Web\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>2. \u6784\u5efa\u524d\u7aef\u4ee3\u7801<\/p>\n<p>\u4f7f\u7528\u524d\u7aef\u6846\u67b6\uff08\u6bd4\u5982React\u3001Angular\u3001Vue\u7b49\uff09\u6784\u5efa\u524d\u7aef\u4ee3\u7801\uff0c\u751f\u6210HTML\u3001CSS\u3001JavaScript\u7b49\u6587\u4ef6\u3002\u53ef\u4ee5\u4f7f\u7528Webpack\u7b49\u5de5\u5177\u5c06\u8fd9\u4e9b\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2a\u6216\u591a\u4e2aJavaScript\u6587\u4ef6\uff0c\u65b9\u4fbf\u540e\u7eed\u4f7f\u7528\u3002<\/p>\n<p>3. \u6784\u5efa\u540e\u7aef\u4ee3\u7801<\/p>\n<p>\u4f7f\u7528Node.js\u7f16\u5199\u540e\u7aef\u4ee3\u7801\uff0c\u5305\u62ec\u670d\u52a1\u5668\u7aef\u7684\u4e1a\u52a1\u903b\u8f91\u3001\u6570\u636e\u5904\u7406\u7b49\u3002\u53ef\u4ee5\u4f7f\u7528Express\u3001Koa\u7b49Web\u6846\u67b6\u6765\u7b80\u5316\u5f00\u53d1\u3002\u540e\u7aef\u4ee3\u7801\u9700\u8981\u63d0\u4f9bAPI\u63a5\u53e3\uff0c\u4f9b\u524d\u7aef\u4ee3\u7801\u8c03\u7528\u3002<\/p>\n<p>4. \u521b\u5efaElectron\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u4f7f\u7528Electron\u63d0\u4f9b\u7684API\uff0c\u521b\u5efa\u4e00\u4e2aElectron\u5e94\u7528\u7a0b\u5e8f\u3002\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u8fdb\u7a0b\uff08main process\uff09\u662f\u4e00\u4e2aNode.js\u8fdb\u7a0b\uff0c<a href=\"https:\/\/exe.yimenapp.com\/tool-2315.html\">\u5728\u7f51\u9875\u4e2d\u5185\u5d4cexe<\/a>\u8d1f\u8d23\u542f\u52a8\u548c\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u7a97\u53e3\u548c\u8fdb\u7a0b\u3002\u5e94\u7528\u7a0b\u5e8f\u7684\u6e32\u67d3\u8fdb\u7a0b\uff08renderer process\uff09\u662f\u4e00\u4e2aChromium\u8fdb\u7a0b\uff0c\u8d1f\u8d23\u6e32\u67d3\u548c\u663e\u793aUI\u754c\u9762\u3002<\/p>\n<p>5. \u914d\u7f6e\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u5728\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u8fdb\u7a0b\u4e2d\uff0c\u9700\u8981\u914d\u7f6e\u5e94\u7528\u7a0b\u5e8f\u7684\u7a97\u53e3\u3001\u83dc\u5355\u3001\u5feb\u6377\u952e\u7b49\u3002\u5728\u5e94\u7528\u7a0b\u5e8f\u7684\u6e32\u67d3\u8fdb\u7a0b\u4e2d\uff0c\u9700\u8981\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u7684JavaScript\u6587\u4ef6\u5f15\u5165\u5230HTML\u6587\u4ef6\u4e2d\uff0c\u5e76\u4e14\u4f7f\u7528\u524d\u7aef\u4ee3\u7801\u8c03\u7528\u540e\u7aefAPI\u63a5\u53e3\u3002<\/p>\n<p>6. \u6253\u5305\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u4f7f\u7528Electron\u63d0\u4f9b\u7684\u6253<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/24\/13\/20169472312.jpg\" \/><\/figure>\n<\/p>\n<p>\u5305\u5de5\u5177\uff0c\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u6253\u5305\u5de5\u5177\u4f1a\u5c06\u5e94\u7528\u7a0b\u5e8f\u7684\u6240\u6709\u4f9d\u8d56\uff08\u5305\u62ecNode.js\u3001Electron\u3001\u524d\u7aef\u4ee3\u7801\u7b49\uff09\u6253\u5305\u5230\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u5e76\u4e14\u751f\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u7528\u6237\u53ea\u9700\u8981\u53cc\u51fb\u8fd9\u4e2a\u6587\u4ef6\u5373\u53ef\u8fd0\u884c\u6574\u4e2a\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u57fa\u4e8eElectron\u7684\u524d\u540e\u7aef\u5206\u79bb\u6253\u5305exe\u7684\u65b9\u6cd5\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u79cd\u65b9\u6cd5\u53ea\u662f\u4e00\u79cd\u793a\u8303\uff0c\u5177\u4f53\u7684\u5b9e\u73b0\u65b9\u5f0f\u53ef\u80fd\u56e0\u4e3a\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u540c\u800c\u6709\u6240\u4e0d\u540c\u3002\u4f46\u662f\uff0c\u638c\u63e1\u4e86\u8fd9\u79cd\u57fa\u672c\u7684\u601d\u8def\u548c\u65b9\u6cd5\uff0c\u5c31\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8fdb\u884c\u8c03\u6574\u548c\u4f18\u5316\uff0c\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u7684\u6253\u5305\u548c\u4ea4\u4ed8\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u548c\u9ad8\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u540e\u7aef\u5206\u79bb\u662f\u73b0\u4ee3Web\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u7684\u4e00\u79cd\u6d41\u884c\u6a21\u5f0f\uff0c\u5b83\u5c06\u524d\u7aef\u548c\u540e\u7aef\u4ee3\u7801\u5206\u5f00\uff0c\u4f7f\u5f97\u5f00\u53d1\u56e2\u961f\u53ef\u4ee5\u72ec\u7acb\u5730\u5f00\u53d1\u548c\u7ef4\u62a4\u5404\u81ea\u7684\u4ee3\u7801\u3002\u8fd9\u79cd\u6a21\u5f0f\u6709\u5f88\u591a\u4f18\u70b9\uff0c\u6bd4\u5982\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3001\u964d\u4f4e\u7ef4\u62a4\u6210\u672c\u7b49\u3002\u7136\u800c\uff0c\u5728\u90e8\u7f72\u548c\u4ea4\u4ed8\u5e94\u7528<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[34245,7427,298,84,193],"topic":[],"class_list":["post-37725","post","type-post","status-publish","format-standard","hentry","category-kaifaexe","tag-halconexe","tag-windows","tag-298","tag-84","tag-193"],"_links":{"self":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/37725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/comments?post=37725"}],"version-history":[{"count":1,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/37725\/revisions"}],"predecessor-version":[{"id":37736,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/37725\/revisions\/37736"}],"wp:attachment":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/media?parent=37725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/categories?post=37725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/tags?post=37725"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/topic?post=37725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}