• inno setup打包应用程序


    使用创建向导

    生成脚本

    #define MyAppName "back"
    #define MyAppVersion "1.5"
    #define MyAppPublisher "我的公司"
    #define MyAppURL "http://www.example.com/"
    #define MyAppExeName "MyProg.exe"
    
    [Setup]
    ; 注: AppId的值为单独标识该应用程序。
    ; 不要为其他安装程序使用相同的AppId值。
    ; (生成新的GUID,点击 工具|在IDE中生成GUID。)
    AppId={{A30CC69D-E4F5-46D2-A4A2-58B557BC6ACA}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={pf}\{#MyAppName}
    DefaultGroupName={#MyAppName}
    
    OutputBaseFilename=bak
    Compression=lzma
    SolidCompression=yes
    
    [Languages]
    Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
    
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
    
    [Files]
    Source: "C:\Program Files\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
    Source: "D:\cron\back.bat"; DestDir: "{app}"; Flags: ignoreversion
    Source: "D:\cron\back_add.bat"; DestDir: "{app}"; Flags: ignoreversion
    ; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
    
    [Icons]
    Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
    Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
    ;自动运行加载
    [Run]
    Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
    ;自动运行bat脚本
    Filename:"{app}\back_add.bat"; Flags: nowait runhidden; 
    
    编译即可。

  • 相关阅读:
    SQL GUID和自增列做主键的优缺点
    python __future__ 的几种特性
    数据库中文乱码处理
    Android_Intent意图详解
    Windows Server 2012 R2超级虚拟化之六 Hyper-v Replica 2.0和Live migrations
    如今网站定位,需立足于用户
    Hibernate 数据的批量插入、更新和删除
    paip.提升用户体验---论文本编辑器的色彩方案
    时间管理方法学习
    网站优化:从搜索引擎到社交网络的艰难转变
  • 原文地址:https://www.cnblogs.com/liubo6/p/4491119.html
Copyright © 2020-2023  润新知