簡體   English   中英

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

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

我有一個新的應用程序jar文件。 它在項目文件夾中的dist文件夾中工作得很好。 當我試圖將它移動到另一個地方時,它對我不起作用。

為了解決這個問題,我在dist文件夾中使用Launch4j創建了exe文件,它也只在該文件夾中工作。 我無法將其移動到另一個文件夾。

對於安裝程序創建,我使用的是Inno Setup構建器。 我創建並安裝了該應用程序。 但它也不適合我。 如何使用Inno Setup制作安裝程序?

非常好的方法是使用JNLP (Java網絡啟動協議),所有源都轉到JVM。 通過這種方式,您不需要任何安裝過程。

關於您的問題 “如何使用Inno Setup創建安裝程序?”

見下文:

有很多信息如何創建它。

您可以在幫助我解決問題的文檔中找到所有示例。

在這里,我將舉例說明我使用的內容,它對我有用:

[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}"

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

您可以從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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM