• 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; 
    
    编译即可。

  • 相关阅读:
    网管必备网站地址
    数组是否包含某个元素
    Thinking in java(八)
    Thinking in java(八)
    Java8系列之重新认识HashMap
    Java8系列之重新认识HashMap
    MarkdownPad2.5/2 注册码
    MarkdownPad2.5/2 注册码
    java8函数式编程(2)
    java8函数式编程(2)
  • 原文地址:https://www.cnblogs.com/liubo6/p/4491119.html
Copyright © 2020-2023  润新知