{"id":38746,"date":"2025-08-29T15:39:40","date_gmt":"2025-08-29T07:39:40","guid":{"rendered":"https:\/\/app.60day.cn\/appday\/?p=38746"},"modified":"2025-08-29T15:39:40","modified_gmt":"2025-08-29T07:39:40","slug":"%e5%89%8d%e7%ab%af%e9%a1%b5%e9%9d%a2%e6%89%93%e5%8c%85exe%e6%9c%89%e5%93%aa%e4%ba%9b%e6%96%b9%e6%b3%95%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.60day.cn\/appday\/kaifaexe\/38746\/","title":{"rendered":"\u524d\u7aef\u9875\u9762\u6253\u5305exe\u6709\u54ea\u4e9b\u65b9\u6cd5\uff1f"},"content":{"rendered":"<p>\u524d\u7aef\u9875\u9762\u6253\u5305exe\u662f\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u672c\u5730\u8fd0\u884c\u548c\u90e8\u7f72\u5230\u5176\u4ed6\u673a\u5668\u4e0a\u3002\u5e38\u89c1\u7684\u524d\u7aef\u9875\u9762\u6253\u5305\u5de5\u5177\u6709Electron\u3001NW.js\u3001React Native\u7b49\u3002\u672c\u6587\u5c06\u4ecb\u7ecdElectron\u7684\u6253\u5305\u539f\u7406\u548c\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>## Electron\u6253\u5305\u539f\u7406<\/p>\n<p>Electron\u662f\u4e00\u4e2a\u57fa\u4e8eChromium\u548cNode.js\u7684\u6846\u67b6\uff0c\u53ef\u4ee5\u4f7f\u7528Web\u6280\u672f\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u7684\u6253\u5305\u539f\u7406\u662f\u5c06\u524d\u7aef\u4ee3\u7801\u548cNode.js\u8fd0\u884c\u65f6\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>\u5177\u4f53\u6765\u8bf4\uff0cElectron\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u4e00\u4e2aHTML\u6587\u4ef6\uff0c\u5e76\u5728\u5176\u4e2d\u5d4c\u5165Node.js\u8fd0\u884c\u65f6\u3002\u5728\u8fd0\u884c\u65f6\uff0cElectron\u4f1a\u542f\u52a8\u4e00\u4e2aChromium\u6d4f\u89c8\u5668\u7a97\u53e3\uff0c\u5e76\u5728\u5176\u4e2d\u52a0\u8f7d\u6253\u5305\u540e\u7684HTML\u6587\u4ef6\u3002\u6b64\u65f6\uff0cNode.js\u8fd0\u884c\u65f6\u4e5f\u4f1a\u88ab\u542f\u52a8\uff0c\u5e76\u4e0eChromium\u6d4f\u89c8\u5668\u7a97\u53e3\u8fdb\u884c\u901a\u4fe1\u3002\u8fd9\u6837\uff0c\u524d\u7aef<a href=\"https:\/\/exe.yimenapp.com\/tool-3860.html\">xml\u751f\u6210\u8f6f\u4ef6<\/a>\u4ee3\u7801\u5c31\u53ef\u4ee5\u901a\u8fc7Node.js\u8fd0\u884c\u65f6\u8bbf\u95ee\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u3001\u7f51\u7edc\u7b49\u8d44\u6e90\u3002<\/p>\n<p>## Electron\u6253\u5305\u6b65\u9aa4<\/p>\n<p>\u4e0b\u9762\u662fElectron\u6253\u5305\u7684\u8be6\u7ec6\u6b65\u9aa4\u3002<\/p>\n<p>### 1. \u5b89\u88c5Electron<\/p>\n<p>\u9996\u5148\u9700\u8981\u5b89\u88c5Electron\uff0c\u53ef\u4ee5\u4f7f\u7528npm\u5305\u7ba1\u7406\u5668\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>npm install electron &#8211;save-dev<\/p>\n<p>&#8220;`<\/p>\n<p>### 2. \u521b\u5efaElectron\u9879\u76ee<\/p>\n<p>\u521b\u5efa\u4e00\u4e2aElectron\u9879\u76ee\uff0c\u5e76\u5728\u5176\u4e2d\u6dfb\u52a0\u524d\u7aef\u4ee3\u7801\u3002\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u524d\u7aef\u6846\u67b6\uff0c\u6bd4\u5982React\u3001Vue\u7b49\u3002<\/p>\n<p>### 3. \u914d\u7f6eElectron\u9879\u76ee<\/p>\n<p>\u5728Electron\u9879\u76ee\u4e2d\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2amain.js\u6587\u4ef6\uff0c\u5e76\u5728\u5176\u4e2d\u5b9a\u4e49\u5e94\u7528\u7a0b\u5e8f\u7684\u884c\u4e3a\u3002\u53ef\u4ee5\u5728\u5176\u4e2d\u6dfb\u52a0\u83dc\u5355\u3001\u7a97\u53e3\u7b49\u529f\u80fd\u3002<\/p>\n<p>### 4. \u6253\u5305Electron\u9879\u76ee<\/p>\n<p>\u4f7f\u7528Electron-builder\u7b49\u6253\u5305\u5de5\u5177\uff0c\u5c06Electron\u9879\u76ee\u6253\u5305\u6210\u53ef<a href=\"https:\/\/exe.yimenapp.com\/tool-155.html\">\u7f51\u5740\u8f6cexe<\/a>\u6267\u884c\u6587\u4ef6\u3002\u6253\u5305\u65f6\u9700\u8981<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/20\/13\/28245446093.jpg\" \/><\/figure>\n<\/p>\n<p>\u6307\u5b9a\u5e73\u53f0\u3001\u67b6\u6784\u7b49\u53c2\u6570\uff0c\u5e76\u53ef\u4ee5\u9009\u62e9\u662f\u5426\u52a0\u5bc6\u7b49\u9009\u9879\u3002<\/p>\n<p>### 5. \u8fd0\u884cElectron\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u5c06\u6253\u5305\u540e\u7684\u53ef\u6267\u884c\u6587\u4ef6\u90e8\u7f72\u5230\u672c\u5730\u6216\u5176\u4ed6\u673a\u5668\u4e0a\uff0c\u5373\u53ef\u8fd0\u884cElectron\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u8fd0\u884c\u65f6\uff0cElectron\u4f1a\u542f\u52a8\u4e00\u4e2aChromium\u6d4f\u89c8\u5668\u7a97\u53e3\uff0c\u5e76\u5728\u5176\u4e2d\u52a0\u8f7d\u6253\u5305\u540e\u7684HTML\u6587\u4ef6\u3002\u6b64\u65f6\uff0c\u524d\u7aef\u4ee3\u7801\u5c31\u53ef\u4ee5\u901a\u8fc7Node.js\u8fd0\u884c\u65f6\u8bbf\u95ee\u672c\u5730\u8d44\u6e90\u3002<\/p>\n<p>## \u603b\u7ed3<\/p>\n<p>\u524d\u7aef\u9875\u9762\u6253\u5305exe\u662f\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u672c\u5730\u8fd0\u884c\u548c\u90e8\u7f72\u5230\u5176\u4ed6\u673a\u5668\u4e0a\u3002Electron\u662f\u4e00\u4e2a\u57fa\u4e8eChromium\u548cNode.js\u7684\u6846\u67b6\uff0c\u53ef\u4ee5\u4f7f\u7528Web\u6280\u672f\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002Electron\u7684\u6253\u5305\u539f\u7406\u662f\u5c06\u524d\u7aef\u4ee3\u7801\u548cNode.js\u8fd0\u884c\u65f6\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4f7f\u7528Electron-builder\u7b49\u6253\u5305\u5de5\u5177\uff0c\u5c06Electron\u9879\u76ee\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u5e76\u90e8\u7f72\u5230\u672c\u5730\u6216\u5176\u4ed6\u673a\u5668\u4e0a\u5373\u53ef\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u7aef\u9875\u9762\u6253\u5305exe\u662f\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u672c\u5730\u8fd0\u884c\u548c\u90e8\u7f72\u5230\u5176\u4ed6\u673a\u5668\u4e0a\u3002\u5e38\u89c1\u7684\u524d\u7aef\u9875\u9762\u6253\u5305\u5de5\u5177\u6709Electron\u3001NW.js\u3001React Native\u7b49\u3002\u672c\u6587\u5c06\u4ecb\u7ecdElectr<\/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":[298,674,1890,8378,5636],"topic":[],"class_list":["post-38746","post","type-post","status-publish","format-standard","hentry","category-kaifaexe","tag-298","tag-674","tag-1890","tag-exe"],"_links":{"self":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/38746","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=38746"}],"version-history":[{"count":1,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/38746\/revisions"}],"predecessor-version":[{"id":38753,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/38746\/revisions\/38753"}],"wp:attachment":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/media?parent=38746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/categories?post=38746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/tags?post=38746"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/topic?post=38746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}