{"id":38174,"date":"2025-08-07T15:39:50","date_gmt":"2025-08-07T07:39:50","guid":{"rendered":"https:\/\/app.60day.cn\/appday\/?p=38174"},"modified":"2025-08-07T15:39:50","modified_gmt":"2025-08-07T07:39:50","slug":"%e5%89%8d%e7%ab%af%e5%8f%af%e4%bb%a5%e6%89%93%e5%8c%85exe%e8%bd%af%e4%bb%b6%e5%98%9b%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/app.60day.cn\/appday\/kaifaexe\/38174\/","title":{"rendered":"\u524d\u7aef\u53ef\u4ee5\u6253\u5305exe\u8f6f\u4ef6\u561b\uff1f"},"content":{"rendered":"<p>\u524d\u7aef\u5f00\u53d1\u662f\u6307\u5728\u6d4f\u89c8\u5668\u7aef\u8fdb\u884c\u5f00\u53d1\uff0c\u901a\u5e38\u4f7f\u7528HTML\u3001CSS\u548cJavaScr<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/17\/18\/06723295965.jpg\" \/><\/figure>\n<\/p>\n<p>ipt\u8fdb\u884c\u5f00\u53d1\u3002\u800cexe\u8f6f\u4ef6\u662f\u6307\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u901a\u5e38\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u3002\u90a3\u4e48\u524d\u7aef\u80fd\u5426\u6253\u5305\u6210exe\u8f6f\u4ef6\u5462\uff1f<\/p>\n<p>\u7b54\u6848\u662f\u53ef\u4ee5\u7684\u3002\u76ee\u524d\u5e02\u9762\u4e0a\u6709\u5f88\u591a\u524d\u7aef\u6253\u5305\u6210exe\u8f6f\u4ef6\u7684\u5de5\u5177\uff0c\u4f8b\u5982Electron\u3001NW.js\u3001React Native\u7b49\u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8ba9\u524d\u7aef\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u684c\u9762\u7aef\u8fd0\u884c\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u4e0b\u9762\u6211\u4eec\u6765\u8be6\u7ec6\u4ecb\u7ecd\u4e00\u4e0b\u5176\u4e2d\u4e00\u79cd\u5de5\u5177\uff1aElectron\u3002<\/p>\n<p>Electron\u662f\u7531GitHub\u5f00\u53d1\u7684\u5f00\u6e90\u8de8\u5e73\u53f0\u6846\u67b6\uff0c\u53ef\u4ee5\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u6784\u5efa\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002Electron\u57fa\u4e8eNode.js\u548cChromium\u6784\u5efa\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u4f7f\u7528Web\u6280\u672f\u5f00\u53d1\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>Electron\u63d0\u4f9b\u4e86\u4e00\u4e2a\u540d\u4e3aElectron Forge\u7684\u5de5\u5177\u5305\uff0c\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u5de5\u5177\u5305\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210exe\u8f6f\u4ef6\u3002\u4e0b\u9762\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u5b89\u88c5Node.js\u548cElectron Forge<\/p>\n<p>\u9996\u5148\u9700\u8981\u5b89\u88c5Node.js\u548cEl<a href=\"https:\/\/exe.yimenapp.com\/tool-3501.html\">\u7f51\u9875\u6587\u4ef6\u751f\u6210exe<\/a>ectron Forge\uff0c\u53ef\u4ee5\u5728\u5b98\u7f51\u4e0a\u4e0b\u8f7d\u5b89\u88c5\u5305\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<p>2. \u521b\u5efaElectron\u5e94\u7528\u7a0b\u5e8f<\/p>\n<p>\u4f7f\u7528Electron Forge\u521b\u5efa\u4e00\u4e2aElectron\u5e94\u7528\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p><a href=\"https:\/\/exe.yimenapp.com\/tool-126.html\">\u628aphp\u7f51\u7ad9\u6253\u5305\u6210exe\u6587\u4ef6<\/a><\/p>\n<p>npx create-electron-app my-app<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3amy-app\u7684Electron\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>3. \u7f16\u5199\u524d\u7aef\u4ee3\u7801<\/p>\n<p>\u5728my-app\u76ee\u5f55\u4e0b\uff0c\u53ef\u4ee5\u627e\u5230src\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542b\u4e86\u524d\u7aef\u4ee3\u7801\u7684\u5165\u53e3\u6587\u4ef6index.html\u548c\u76f8\u5173\u7684JavaScript\u548cCSS\u6587\u4ef6\u3002\u5728\u8fd9\u91cc\u53ef\u4ee5\u7f16\u5199\u81ea\u5df1\u7684\u524d\u7aef\u4ee3\u7801\u3002<\/p>\n<p>4. \u6253\u5305\u6210exe\u8f6f\u4ef6<\/p>\n<p>\u5728my-app\u76ee\u5f55\u4e0b\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210exe\u8f6f\u4ef6\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>npm run make<\/p>\n<p>&#8220;`<\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u4f1a\u5c06\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210exe\u8f6f\u4ef6\uff0c\u5e76\u5c06\u751f\u6210\u7684\u6587\u4ef6\u653e\u5728out\u76ee\u5f55\u4e0b\u3002<\/p>\n<p>5. \u8fd0\u884cexe\u8f6f\u4ef6<\/p>\n<p>\u5728out\u76ee\u5f55\u4e0b\uff0c\u53ef\u4ee5\u627e\u5230\u751f\u6210\u7684exe\u8f6f\u4ef6\uff0c\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u3002<\/p>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u5c31\u53ef\u4ee5\u5c06\u524d\u7aef\u4ee3\u7801\u6253\u5305\u6210exe\u8f6f\u4ef6\u4e86\u3002\u5f53\u7136\uff0c\u8fd9\u53ea\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u5b9e\u9645\u5e94\u7528\u4e2d\u8fd8\u9700\u8981\u8003\u8651\u5f88\u591a\u95ee\u9898\uff0c\u4f8b\u5982\u5b89\u5168\u6027\u3001\u6027\u80fd\u4f18\u5316\u7b49\u7b49\u3002\u4f46\u662f\uff0c\u4f7f\u7528Electron Forge\u53ef\u4ee5\u8ba9\u524d\u7aef\u5f00\u53d1\u8005\u66f4\u52a0\u65b9\u4fbf\u5730\u5c06\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u6253\u5305\u6210exe\u8f6f\u4ef6\uff0c\u8ba9\u81ea\u5df1\u7684\u5e94\u7528\u7a0b\u5e8f\u66f4\u52a0\u6613\u4e8e\u4f7f\u7528\u548c\u4f20\u64ad\u3002<\/p>\n<p>\u603b\u4e4b\uff0c\u524d\u7aef\u53ef\u4ee5\u6253\u5305\u6210exe\u8f6f\u4ef6\uff0c\u4f7f\u7528\u5de5\u5177\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u7528\u6237\u4f53\u9a8c\uff0c\u8ba9\u524d\u7aef\u5f00\u53d1\u8005\u66f4\u52a0\u7075\u6d3b\u5730\u5e94\u5bf9\u5404\u79cd\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u7aef\u5f00\u53d1\u662f\u6307\u5728\u6d4f\u89c8\u5668\u7aef\u8fdb\u884c\u5f00\u53d1\uff0c\u901a\u5e38\u4f7f\u7528HTML\u3001CSS\u548cJavaScript\u8fdb\u884c\u5f00\u53d1\u3002\u800cexe\u8f6f\u4ef6\u662f\u6307\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u901a\u5e38\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884c\u3002\u90a3\u4e48\u524d\u7aef\u80fd\u5426\u6253\u5305\u6210exe\u8f6f\u4ef6\u5462\uff1f\u7b54\u6848\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[15921,8217,84,207,75],"topic":[],"class_list":["post-38174","post","type-post","status-publish","format-standard","hentry","category-kaifaexe","tag-exe","tag-rpm","tag-84","tag-207","tag-75"],"_links":{"self":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/38174","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\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/comments?post=38174"}],"version-history":[{"count":1,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/38174\/revisions"}],"predecessor-version":[{"id":38205,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/posts\/38174\/revisions\/38205"}],"wp:attachment":[{"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/media?parent=38174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/categories?post=38174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/tags?post=38174"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/app.60day.cn\/appday\/wp-json\/wp\/v2\/topic?post=38174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}