简体   繁体   English

如何使用Inno Setup制作安装程序?

[英]How can I make an installer using Inno Setup?

I have a new application jar file. 我有一个新的应用程序jar文件。 It works perfect in my dist folder in the project folder. 它在项目文件夹中的dist文件夹中工作得很好。 When I am trying to move this to another place it does not work for me. 当我试图将它移动到另一个地方时,它对我不起作用。

For the solution of this problem I have created exe file using Launch4j in the dist folder and it also works in that folder only. 为了解决这个问题,我在dist文件夹中使用Launch4j创建了exe文件,它也只在该文件夹中工作。 I cannot move it to another folder. 我无法将其移动到另一个文件夹。

For installer creation I am using Inno Setup builder. 对于安装程序创建,我使用的是Inno Setup构建器。 I create and install the application. 我创建并安装了该应用程序。 But it also does not work for me. 但它也不适合我。 How can I make an installer using Inno Setup? 如何使用Inno Setup制作安装程序?

The pretty good way is to use JNLP (Java Network Launch Protocol), all sources go to JVM. 非常好的方法是使用JNLP (Java网络启动协议),所有源都转到JVM。 By this way you don't need any installation process. 通过这种方式,您不需要任何安装过程。

About your question "How can I make an installer using Inno Setup?" 关于您的问题 “如何使用Inno Setup创建安装程序?”

See below: 见下文:

There is a lot of information how to create it. 有很多信息如何创建它。

All examples you can find in documentation that helped me to sort things out. 您可以在帮助我解决问题的文档中找到所有示例。

Here I'll give you example what I used and it worked for me: 在这里,我将举例说明我使用的内容,它对我有用:

[Setup]
AppName=MyApplicationName-O
AppVerName=MyApplicationName-O version 1.5.3.0
AppPublisher=myApplicationSite.com
AppPublisherURL=http://www.myApplicationSite.com
AppSupportURL=http://www.myApplicationSite.com
AppUpdatesURL=http://www.myApplicationSite.com
DefaultDirName={pf}\MyApplicationName-O
DefaultGroupName=MyApplicationName-O
LicenseFile=COPYING
;InfoBeforeFile=README
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
ShowLanguageDialog=yes

UninstallDisplayIcon=C:\workspacePrototype\App\sources\myApplicationName\pixmaps\icon.ico
SetupIconFile=C:\workspacePrototype\App\sources\myApplicationName\pixmaps\icon.ico


[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"



[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
;;#include "myApplicationName-win32.filelist"
; DLL used to check if the target program is running at install time
Source: psvince.dll; flags: dontcopy
; psvince is installed in {app} folder, so it will be loaded at 
; uninstall time to check if the target program is running
Source: psvince.dll; DestDir: {app}
Source: ./bin/avcodec-53.dll; Destdir: {app}; Flags: ignoreversion
Source: ./share/themes/Outcrop/gtk-2.0/Tabs/button_prelight.png; Destdir:    {app}\./share/themes/Outcrop/gtk-2.0/Tabs; Flags: ignoreversion
Source: ./share/themes/Outcrop/gtk-2.0/tooltip.png; Destdir:    {app}\./share/themes/Outcrop/gtk-2.0; Flags: ignoreversion
Source: ./share/themes/Outcrop/gtk-2.0/trans.png; Destdir:    {app}\./share/themes/Outcrop/gtk-2.0; Flags: ignoreversion
Source: ./share/themes/Outcrop/gtk-2.0/trough.png; Destdir:    {app}\./share/themes/Outcrop/gtk-2.0; Flags: ignoreversion
;Source: ./share/themes/Raleigh/gtk-2.0/gtkrc; Destdir: {app}\./share/themes/Raleigh/gtk-2.0; Flags: ignoreversion



[Icons]
Name: "{group}\MyApplicationName-O"; Filename: "{app}\MyApplicationName-O.exe" ; WorkingDir: "{app}"
Name: "{userdesktop}\MyApplicationName-O"; Filename: "{app}\MyApplicationName-O.exe"; WorkingDir: "{app}" ; Tasks: desktopicon

[Registry]
Root: HKCR; Subkey: "sip";
Root: HKCR; Subkey: "sip"; ValueData: "URL: SIP protocol" ; ValueType:string
Root: HKCR; Subkey: "sip"; ValueName: "EditFlags"; ValueData: "02 00 00 00" ; ValueType:binary
Root: HKCR; Subkey: "sip"; ValueName: "URL Protocol" ;  ValueType:string
Root: HKCR; Subkey: "sip\DefaultIcon"; ValueData: "{app}\MyApplicationName-O.exe"; ValueType:string ; Flags:uninsdeletekey
Root: HKCR; Subkey: "sip\shell"
Root: HKCR; Subkey: "sip\shell\open"
Root: HKCR; Subkey: "sip\shell\open\command"; ValueType:string ; ValueData: "{app}\MyApplicationName-O.exe --workdir {app} --call %1"; Flags:uninsdeletekey

[Run]
Filename: "{app}\MyApplicationName-O.exe"; Description: "{cm:LaunchProgram,MyApplicationName-O}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent

; Comment out the following two lines if you don't want a Start Menu program group
; to be created. (You'll need to run the uninstaller's EXE directly from its 
; folder (e.g. "C:\Program Files\Prompt to Close the Program") if you do.)

[Icons]
Name: "{group}\Uninstall this application"; Filename: "{uninstallexe}"

;-------------------------------------------------------------------------------

You can run this script from Inno sSetup 5 or from command-line: 您可以从Inno sSetup 5或命令行运行此脚本:

ISCC.exe myApplication.iss
Inno Setup 5 Command-Line Compiler
Copyright (C) 1997-2012 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2012 Martijn Laan
Inno Setup Preprocessor
Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.

Compiler engine version: Inno Setup 5.5.2 (a)

[ISPP] Preprocessing.
[ISPP] Preprocessed.

Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line 10

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以使用 Inno Setup 为 Java 应用程序创建独立的 .exe 安装程序吗? - Can I create a standalone .exe installer for a Java application with Inno Setup? 如何使用Netbeans 11中的Maven和Inno Setup为JavaFX应用程序创建可执行安装程序 - How to create an executable installer for JavaFX aplication using Maven and Inno Setup in Netbeans 11 如何在同一个安装程序中包含 2 个 exe 文件(在 INNO 安装程序中) - How to include 2 exe files in the same installer(in INNO setup) 使用INNO安装程序安装程序安装JRE时,现有的JRE将被卸载。 我不想卸载 - When installing JRE using INNO setup Installer, The existing JRE is getting uninstalled. I don't want to uninstall Maven:使用 Inno Setup 脚本构建 javaFX 应用程序的本机安装程序 - Maven : Build native installer of javaFX application with Inno Setup script 带有Inno Setup的JavaFX Self Installer 5-将.iss文件放在哪里? - JavaFX Self Installer With Inno Setup 5 - Where put the modify .iss file? 如何从 Inno Setup 安装 JRE? - How do I install a JRE from an Inno Setup? 如何在 NetBeans 中设置 Inno Setup 插件 - How to setup Inno Setup plugin in NetBeans Inno Setup:安装后如何安装文件? - Inno Setup: How to install a file after install? Inno Setup:如何启动带参数的可执行文件 - Inno Setup : how to launch an executable with parameters
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM