{"id":20366,"date":"2024-04-02T15:41:45","date_gmt":"2024-04-02T07:41:45","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=20366"},"modified":"2024-04-02T15:41:45","modified_gmt":"2024-04-02T07:41:45","slug":"windows%e6%89%93%e5%8c%85%e6%88%90%e4%b8%80%e4%b8%aaexe%e6%80%8e%e4%b9%88%e5%ae%9e%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/20366\/","title":{"rendered":"windows\u6253\u5305\u6210\u4e00\u4e2aexe\u600e\u4e48\u5b9e\u73b0?"},"content":{"rendered":"

\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0cexe\u662f\u53ef\u6267\u884c\u6587\u4ef6\u7684\u540e\u7f00\u540d\uff0c\u901a\u5e38\u7528\u4e8e\u5b89\u88c5\u7a0b\u5e8f\u3001\u6e38\u620f\u7b49\u3002\u800c\u5c06\u591a\u4e2a\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aexe\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u7a0b\u5e8f\u3001\u8d44\u6e90\u7b49\u6253\u5305\u6210\u4e00\u4e2a\u6574\u4f53\uff0c\u65b9\u4fbf\u7528\u6237\u4f7f\u7528\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u5982\u4f55\u5c06\u591a\u4e2a\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aexe\u6587\u4ef6\u3002<\/p>\n

\u4e00\u3001\u6253\u5305\u5de5\u5177\u7684\u9009\u62e9<\/p>\n

\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u6709\u5f88\u591a\u6253\u5305\u5de5\u5177\u53ef\u4ee5\u4f7f\u7528\uff0c\u5176\u4e2d\u6bd4\u8f83\u5e38\u7528\u7684\u6709Inno Setup\u3001NSIS\u3001InstallShield\u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u90fd\u53ef\u4ee5\u5c06\u591a\u4e2a\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aexe\u6587\u4ef6\uff0c\u5e76\u4e14\u53ef\u4ee5\u8bbe\u7f6e\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u7684\u5404\u79cd\u9009\u9879\uff0c\u5305\u62ec\u5b89\u88c5\u8def\u5f84\u3001\u5feb\u6377\u65b9\u5f0f\u7b49\u7b49\u3002\u8fd9\u91cc\u4ee5Inno Setup\u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u6253\u5305\u8fc7\u7a0b\u3002<\/p>\n

\u4e8c\u3001\u5b89\u88c5Inno Setup<\/p>\n

\u9996\u5148\u9700\u8981\u4e0b\u8f7d\u5e76\u5b89\u88c5Inno Setup\uff0c\u53ef\u4ee5\u4ece\u5b98\u7f51http:\/\/www.jrsoftware.org\/isinfo.php\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00Inno Setup Compilewindows\u5f00\u53d1\u8f6f\u4ef6<\/a>r\uff0c\u5f00\u59cb\u6253\u5305\u3002<\/p>\n

\u4e09\u3001\u521b\u5efa\u811a\u672c\u6587\u4ef6<\/p>\n

\u5728Inno Setup Compiler\u4e2d\uff0c\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\uff0c\u7528\u4e8e\u63cf\u8ff0\u6253\u5305\u8fc7\u7a0b\u4e2d\u7684\u5404\u79cd\u8bbe\u7f6e\u3002\u53ef\u4ee5\u5728<\/p>\n

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

\u83dc\u5355\u680f\u4e2d\u9009\u62e9\u201c\u6587\u4ef6\u201d->\u201c\u65b0\u5efa\u201d\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e\u201cCtrl+N\u201d\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u811a\u672c\u6587\u4ef6\u3002\u811a\u672c\u6587\u4ef6\u662f\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u6587\u672c\u7f16\u8f91\u5668\u6765\u7f16\u8f91\u3002<\/p>\n

\u56db\u3001\u7f16\u8f91\u811a\u672c\u6587\u4ef6<\/p>\n

\u5728\u811a\u672c\u6587\u4ef6\u4e2d\uff0c\u9700\u8981\u8bbe\u7f6e\u4e00\u4e9b\u57fa\u672c\u4fe1\u606f\uff0c\u5982\u7a0b\u5e8f\u540d\u79f0\u3001\u7248\u672c\u53f7\u3001\u5b89\u88c5\u8def\u5f84\u7b49\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u811a\u672c\u6587\u4ef6\u793a\u4f8b\uff1a<\/p>\n

“`<\/p>\n

[Setup]<\/p>\n

AppName=My Program<\/p>\n

AppVersion=1.5<\/p>\n

DefaultDirName={pf}\\My Program<\/p>\n

DefaultGroupName=My Program<\/p>\n

UninstallDisplayIcon={app}\\MyProg.exe<\/p>\n

OutputDir=userdocs:Inno Setup Examples Output<\/p>\n

OutputBaseFilename=Setup<\/p>\n

Compression=lzma<\/p>\n

SolidCompression=yes<\/p>\n

[Files]<\/p>\n

Source: “D:\\My Program\\*”; DestDir: “{app}”; Flags: recursesubdirs<\/p>\n

“`<\/p>\n

\u5176\u4e2d\uff0c[Setup]\u6bb5\u7528\u4e8e\u8bbe\u7f6e\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u7684\u5404\u79cd\u9009\u9879\uff0c\u5982\u7a0b\u5e8f\u540d\u79f0\u3001\u7248\u672c\u53f7\u3001\u5b89\u88c5\u8def\u5f84\u7b49\u7b49\uff1b[Files]\u6bb5\u7528\u4e8e\u6307\u5b9a\u9700\u8981\u6253\u5305\u7684\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3002\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u5c06D:\\My Program\u6587\u4ef6\u5939\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u90fd\u6253\u5305\u5230\u5b89\u88c5\u76ee\u5f55\u4e0b\u3002<\/p>\n

\u4e94\u3001\u7f16\u8bd1\u811a\u672c\u6587\u4ef6<\/p>\n

\u7f16\u8f91\u5b8c\u6210\u811a\u672c\u6587\u4ef6\u540e\uff0c\u9700\u8981\u8fdb\u884c\u7f16\u8bd1\uff0c\u751f\u6210exe\u6587\u4ef6\u3002\u5728\u83dc\u5355\u680f\u4e2d\u9009\u62e9\u201c\u7f16\u8bd1\u201d->\u201c\u7f16\u8bd1\u201d\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e\u201cF9\u201d\u6765\u8fdb\u884c\u7f16\u8bd1\u3002\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4f1a\u63d0\u793a\u9009\u62e9\u8f93\u51fa\u76ee\u5f55\u548c\u8f93\u51fa\u6587\u4ef6\u540d\uff0c\u9009\u62e9\u5b8c\u6210\u540e\uff0c\u5373\u53ef\u5f00\u59cb\u7f16\u8bd1\u3002<\/p>\n

\u516d\u3001\u4f7f\u7528exe\u6587\u4ef6<\/p>\n

\u7f16\u8bd1\u5b8c\u6210\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2aexe\u6587\u4ef6\uff0c\u53ef\u4ee5\u76f4\u63a5\u53cc\u51fb\u8fd0\u884c\u3002\u5728\u8fd0\u884c\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u63d0\u793a\u7528\u6237\u8fdb\u884c\u5b89\u88c5\uff0c\u53ef\u4ee5\u9009\u62e9\u5b89\u88c5\u8def\u5f84\u3001\u521b\u5efa\u5feb\u6377\u65b9\u5f0f\u7b49\u7b49\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5373\u53ef\u4f7f\u7528\u7a0b\u5e8f\u3002<\/p>\n

\u603b\u7ed3\uff1a<\/p>\n

\u5c06\u591a\u4e2a\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aexe\u6587\u4ef6\uff0c\u5728Windows\u7cfb\u7edf\u4e2d\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\uff0c\u5982Inno Setup\u3001NSIS\u3001InstallShield\u7b49\u7b49\u3002\u5176\u4e2dthonny\u6253\u5305exe<\/a>\uff0cInno Setup\u662f\u4e00\u4e2a\u514d\u8d39\u4e14\u529f\u80fd\u5f3a\u5927\u7684\u6253\u5305\u5de5\u5177\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bbe\u7f6e\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u7684\u5404\u79cd\u9009\u9879\u3002\u6253\u5305\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u7f16\u8f91\u811a\u672c\u6587\u4ef6\uff0c\u8bbe\u7f6e\u57fa\u672c\u4fe1\u606f\u548c\u9700\u8981\u6253\u5305\u7684\u6587\u4ef6\u548c\u6587\u4ef6\u5939\u3002\u6700\u540e\uff0c\u8fdb\u884c\u7f16\u8bd1\uff0c\u751f\u6210exe\u6587\u4ef6\uff0c\u5373\u53ef\u65b9\u4fbf\u5730\u4f7f\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0cexe\u662f\u53ef\u6267\u884c\u6587\u4ef6\u7684\u540e\u7f00\u540d\uff0c\u901a\u5e38\u7528\u4e8e\u5b89\u88c5\u7a0b\u5e8f\u3001\u6e38\u620f\u7b49\u3002\u800c\u5c06\u591a\u4e2a\u6587\u4ef6\u6253\u5305\u6210\u4e00\u4e2aexe\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u7a0b\u5e8f\u3001\u8d44\u6e90\u7b49\u6253\u5305\u6210\u4e00\u4e2a\u6574\u4f53\uff0c\u65b9\u4fbf\u7528\u6237\u4f7f\u7528\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5728Windows<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[22490,16,408,780,810],"topic":[],"class_list":["post-20366","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-22490","tag-16","tag-408","tag-app","tag-810"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/20366","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\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=20366"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/20366\/revisions"}],"predecessor-version":[{"id":20493,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/20366\/revisions\/20493"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=20366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=20366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=20366"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=20366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}