source: installer/install5.xml @ 307a68aa

Last change on this file since 307a68aa was 307a68aa, checked in by zzz <zzz@…>, 2 years ago

Installer: Add support for IzPack? 5 (ticket #1864)
fix typo in postinstall.sh

  • Property mode set to 100644
File size: 17.4 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
2<!--
3   This is for izpack 5.
4   See install.xml for izpack 4.
5-->
6<izpack:installation version="5.0"
7                     xmlns:izpack="http://izpack.org/schema/installation"
8                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9                     xsi:schemaLocation="http://izpack.org/schema/installation http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">
10
11    <info>
12        <appname>i2p</appname>
13        <appversion>0.9.35</appversion>
14        <authors>
15            <author name="I2P" email="https://geti2p.net/"/>
16        </authors>
17        <url>https://geti2p.net/</url>
18        <javaversion>1.7</javaversion>
19
20        <!-- adding this element will make the installer attempt to launch itself with administrator permissions,
21             but see http://www.nabble.com/Classpath-security-issues-on-Vista-td22456230.html
22             which says it isn't sufficient:
23
24                Just to let you know that I managed to identify and resolve the problem (in
25                case anyone else has it).  The default installation directory for Vista is
26                under "Program Files" which is a "special" directory which can only be
27                written to (create sub-directories) by administrators.  However, stupid
28                Vista downgrades an administrator to a normal user when the program is run
29                via the application shortcut menu.  As you suggested, I added a script which
30                runs ICACLS which resolved the problem, i.e.
31
32                icacls %1 /grant Users:F /T > priv.log
33
34                The command needs to be run as a Process rather than as an executable tag in
35                order to pass $INSTALL_PATH as a parameter.
36         -->
37        <run-privileged condition="izpack.windowsinstall.vista|izpack.windowsinstall.7"/>
38    </info>
39
40    <guiprefs width="590" height="356" resizable="yes">
41<!--
42Not in 5.1.2, pick another one
43https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491730/GUI+Preferences
44        <laf name="liquid">
45            <os family="unix"/>
46        </laf>
47-->
48        <!-- full names, not iso3 codes -->
49        <modifier key="langDisplayType" value="native" />
50    </guiprefs>
51
52    <locale>
53        <langpack iso3="eng"/>
54        <langpack iso3="bra"/>
55        <langpack iso3="cat"/>
56        <langpack iso3="ces"/>
57        <langpack iso3="chn"/>
58        <langpack iso3="dan"/>
59        <langpack iso3="deu"/>
60        <langpack iso3="ell"/>
61        <langpack iso3="fin"/>
62        <langpack iso3="fra"/>
63        <langpack iso3="hun"/>
64        <langpack iso3="idn"/>
65        <langpack iso3="ita"/>
66        <langpack iso3="jpn"/>
67        <langpack iso3="kor"/>
68        <langpack iso3="msa"/>
69        <langpack iso3="nld"/>
70        <langpack iso3="nor"/>
71        <langpack iso3="pol"/>
72        <langpack iso3="prt"/>
73        <langpack iso3="ron"/>
74        <langpack iso3="rus"/>
75        <langpack iso3="slk"/>
76        <langpack iso3="spa"/>
77        <langpack iso3="srp"/>
78        <langpack iso3="swe"/>
79        <langpack iso3="tur"/>
80        <langpack iso3="twn"/>
81        <langpack iso3="ukr"/>
82<!--
83"WARNING: No locale for:"
84        <langpack iso3="eus"/>
85        <langpack iso3="fa"/>
86        <langpack iso3="glg"/>
87-->
88    </locale>
89
90    <!--
91        The <os> tag can be used to restrict the inclusion into the uninstaller
92        to a specific operating system family, architecture or version.
93        The inclusion into the installer will be always done.
94        Here's a sample :
95
96        <native type="izpack" name="ShellLink.dll">
97            <os family="windows"/>
98        </native>
99
100        This doesn't appear to be necessary, the dlls don't get put in Uninstaller/uninstaller.jar on linux
101     -->
102    <natives>
103        <native type="izpack" name="ShellLink.dll" />
104        <native type="izpack" name="ShellLink_x64.dll" />
105      <!--
106        https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491532/Advanced+Features
107        <native type="izpack" name="WinSetupAPI.dll" />
108        <native type="izpack" name="WinSetupAPI_x64.dll" />
109        https://izpack.atlassian.net/wiki/spaces/IZPACK/pages/491676/RegistryInstallerListener+RegistryUninstallerListener
110        <native type="3rdparty" name="COIOSHelper.dll" />
111        <native type="3rdparty" name="COIOSHelper_x64.dll" />
112       -->
113    </natives>
114
115    <resources>
116        <res id="Installer.image" src="installer/resources/i2plogo.png" />
117        <res id="InfoPanel.info" src="installer/resources/readme.license.txt"/>
118        <!-- <res id="ProcessPanel.Spec.xml" src="installer/resources/ProcessPanel.Spec.xml"/> -->
119        <res id="shortcutSpec.xml" src="installer/resources/shortcutSpec.xml" />
120        <res id="XInfoPanel.info" src="installer/resources/start-i2p.txt" />
121    </resources>
122
123    <variables>
124        <!-- desktop shortcuts enabled by default in ShortcutPanel -->
125        <variable name="DesktopShortcutCheckboxEnabled" value="true" />
126    </variables>
127
128    <conditions>
129        <condition type="variable" id="is64bit">
130            <name>SYSTEM[sun.arch.data.model]</name>
131            <value>64</value>
132        </condition>
133    </conditions>
134
135    <panels>
136        <panel classname="HelloPanel"/>
137        <panel classname="InfoPanel"/>
138        <panel classname="TargetPanel"/>
139        <!-- In 5.1.2, PacksPanel will NPE at install time if before TargetPanel -->
140        <panel classname="PacksPanel"><os family="windows" /></panel>
141        <panel classname="InstallPanel"/>
142        <!-- In 5.1.2, ShortcutPanel must be after InstallPanel, so the .ico files will be there,
143             unless <lateShortcutInstall/> is set in shorcutSpec.xml.
144             If you don't do this right, the shortcuts won't have our icons.
145         -->
146        <panel classname="ShortcutPanel"><os family="windows" /></panel>
147        <!--
148         Using the condition this way, the panel is shown on everything *but* Windows.
149         Fails in console mode: Installer says:
150           No console mode helper found for class com.izforge.izpack.panels.xinfo.XInfoPanel, panel type will be skipped in console mode installation
151           No automation helper found for class com.izforge.izpack.panels.xinfo.XInfoPanel, panel type will be skipped in automated installation
152         But isn't actually skipped when installing with -console:
153           SEVERE: com.izforge.izpack.api.exception.IzPackException: Console implementation not found for panel: com.izforge.izpack.panels.xinfo.XInfoPanel
154         -->
155        <panel classname="XInfoPanel" condition="!izpack.windowsinstall" />
156        <panel classname="SimpleFinishPanel"/>
157    </panels>
158
159    <packs>
160        <pack name="Base" required="yes">
161            <description>Base installation files</description>
162            <!-- non-jars -->
163            <fileset dir="pkg-temp" excludes="**/*.jar" targetdir="$INSTALL_PATH"/>
164            <!-- pack200 jars -->
165            <fileset dir="pkg-temp" includes="**/*.jar"
166                     excludes="lib/commons-logging.jar lib/jasper-compiler.jar lib/jetty-java5-threadpool.jar lib/jetty-sslengine.jar lib/jbigi.jar"
167                     targetdir="$INSTALL_PATH">
168                <pack200/>
169            </fileset>
170            <!-- non-pack200 jars -->
171            <fileset dir="pkg-temp"
172                     includes="lib/commons-logging.jar lib/jasper-compiler.jar lib/jetty-java5-threadpool.jar lib/jetty-sslengine.jar lib/jbigi.jar"
173                     targetdir="$INSTALL_PATH">
174            </fileset>
175            <!--
176              Do variable substitution in these files. See:
177              http://www.javalobby.org/forums/thread.jspa?threadID=15967&tstart=0
178              and the izpack docs for some guidance.
179             -->
180            <parsable targetfile="$INSTALL_PATH/wrapper.config" type="plain" />
181            <parsable targetfile="$INSTALL_PATH/scripts/home.i2p.i2prouter" type="plain"> <os family="unix" /> </parsable>
182            <parsable targetfile="$INSTALL_PATH/i2prouter" type="shell"> <os family="unix" /> </parsable>
183            <parsable targetfile="$INSTALL_PATH/eepget" type="shell"> <os family="unix" /> </parsable>
184            <parsable targetfile="$INSTALL_PATH/eepget.bat" type="shell"><os family="windows" /></parsable>
185            <parsable targetfile="$INSTALL_PATH/runplain.sh" type="shell"> <os family="unix" /> </parsable>
186            <parsable targetfile="$INSTALL_PATH/Start I2P Router.app/Contents/MacOS/i2prouter" type="shell"><os family="mac" /></parsable>
187
188            <!-- postinstall stuff for windows -->
189            <!-- Wrapper for 32bit Windows JVM -->
190            <executable targetfile="$INSTALL_PATH/utility.jar"
191                type="jar"
192                class="net.i2p.installer.Main"
193                stage="postinstall"
194                keep="true"
195                failure="warn"
196                condition="!is64bit">
197                <os family="windows" />
198                <args>
199                    <arg value="copy" />
200                    <arg value="$INSTALL_PATH\lib\wrapper\win32\I2Psvc.exe" />
201                    <arg value="$INSTALL_PATH" />
202                </args>
203            </executable>
204
205            <executable targetfile="$INSTALL_PATH/utility.jar"
206                type="jar"
207                class="net.i2p.installer.Main"
208                stage="postinstall"
209                keep="true"
210                failure="warn"
211                condition="!is64bit">
212                <os family="windows" />
213                <args>
214                    <arg value="copy" />
215                    <arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.dll" />
216                    <arg value="$INSTALL_PATH\lib" />
217                </args>
218            </executable>
219
220            <!-- wrapper for 64bit Windows JVM -->
221            <executable targetfile="$INSTALL_PATH/utility.jar"
222                type="jar"
223                class="net.i2p.installer.Main"
224                stage="postinstall"
225                keep="true"
226                failure="warn"
227                condition="is64bit">
228                <os family="windows" />
229                <args>
230                    <arg value="copy" />
231                    <arg value="$INSTALL_PATH\lib\wrapper\win64\I2Psvc.exe" />
232                    <arg value="$INSTALL_PATH" />
233                </args>
234            </executable>
235
236            <executable targetfile="$INSTALL_PATH/utility.jar"
237                type="jar"
238                class="net.i2p.installer.Main"
239                stage="postinstall"
240                keep="true"
241                failure="warn"
242                condition="is64bit">
243                <os family="windows" />
244                <args>
245                    <arg value="copy" />
246                    <arg value="$INSTALL_PATH\lib\wrapper\win64\wrapper.dll" />
247                    <arg value="$INSTALL_PATH\lib" />
248                </args>
249            </executable>
250
251            <!--
252             We still copy the 32 bit version of wrapper.dll (even with a
253             64bit jvm) so that if a 32 bit jvm is installed in the future,
254             nothing breaks.
255            -->
256             <executable targetfile="$INSTALL_PATH/utility.jar"
257                 type="jar"
258                 class="net.i2p.installer.Main"
259                 stage="postinstall"
260                 keep="true"
261                 failure="warn"
262                 condition="is64bit">
263                 <os family="windows" />
264                 <args>
265                     <arg value="copy" />
266                     <arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.dll" />
267                     <arg value="$INSTALL_PATH\lib\wrapper-windows-x86-32.dll" />
268                 </args>
269             </executable>
270
271             <!-- workaround for bad default path for wrapper.log in Windows. -->
272             <executable targetfile="$INSTALL_PATH/utility.jar"
273                 type="jar"
274                 class="net.i2p.installer.Main"
275                 stage="postinstall" keep="true">
276                 <os family="windows" />
277                 <args>
278                     <arg value="fixwinpaths" />
279                     <arg value="$INSTALL_PATH\wrapper.config" />
280                 </args>
281             </executable>
282
283             <!-- Now we'll get rid of the UNIX-only stuff -->
284             <executable targetfile="$INSTALL_PATH/utility.jar"
285                 type="jar"
286                 class="net.i2p.installer.Main"
287                 stage="postinstall" keep="true" failure="warn">
288                 <os family="windows" />
289                 <args>
290                     <arg value="delete" />
291                     <arg value="$INSTALL_PATH\i2prouter" />
292                     <arg value="$INSTALL_PATH\install_i2p_service_unix" />
293                     <arg value="$INSTALL_PATH\install-headless.txt" />
294                     <arg value="$INSTALL_PATH\runplain.sh" />
295                     <arg value="$INSTALL_PATH\osid" />
296                     <arg value="$INSTALL_PATH\postinstall.sh" />
297                     <arg value="$INSTALL_PATH\uninstall_i2p_service_unix" />
298                     <arg value="$INSTALL_PATH\lib\wrapper" />
299                     <arg value="$INSTALL_PATH\eepget" />
300                     <arg value="$INSTALL_PATH/Start I2P Router.app" />
301                     <arg value="$INSTALL_PATH/net.i2p.router.plist.template" />
302                     <arg value="$INSTALL_PATH/install_i2p_service_osx.command" />
303                     <arg value="$INSTALL_PATH/uninstall_i2p_service_osx.command" />
304                     <arg value="$INSTALL_PATH/man" />
305                     <arg value="$INSTALL_PATH/locale" />
306             <!-- Placeholder for an OSX 'shortcut' to the router console
307                    <arg value="$INSTALL_PATH/I2P Router Console.webloc" />
308            -->
309                </args>
310            </executable>
311
312            <!-- workaround for vista permission problems - see comments above -->
313            <executable targetfile="$INSTALL_PATH/fixperms.bat" type="bin" stage="postinstall" keep="true" failure="warn"
314                condition="!izpack.windowsinstall.xp+!izpack.windowsinstall.2003" >
315                <os family="windows" />
316                <args>
317                    <arg value="$INSTALL_PATH" />
318                </args>
319            </executable>
320            <!-- else delete it -->
321            <executable targetfile="$INSTALL_PATH/utility.jar"
322                type="jar"
323                class="net.i2p.installer.Main"
324                stage="postinstall" keep="true" failure="warn" condition="izpack.windowsinstall.xp|izpack.windowsinstall.2003">
325                <os family="windows" />
326                <args>
327                    <arg value="delete" />
328                    <arg value="$INSTALL_PATH\fixperms.bat" />
329                </args>
330            </executable>
331
332            <!--
333            <executable targetfile="$INSTALL_PATH/utility.jar"
334                type="jar"
335                class="net.i2p.installer.Main"
336                stage="postinstall" keep="true" failure="warn">
337                <os family="windows" />
338                    <args>
339                        <arg value="exec" />
340                        <arg value="$INSTALL_PATH" />
341                        <arg value="$INSTALL_PATH\I2Psvc.exe" />
342                        <arg value="-c" />
343                        <arg value="$INSTALL_PATH\wrapper.config" />
344                    </args>
345            </executable>
346            -->
347
348             <!--
349                  and now we delete the installer utility jar.
350                  I moved this out of installer/ because the directory
351                  couldn't be deleted while the jar was active and would
352                  remain on the system.
353
354                  This, however, works fine.
355             -->
356             <executable targetfile="$INSTALL_PATH/utility.jar"
357                 type="jar"
358                 class="net.i2p.installer.Main"
359                 stage="postinstall" keep="false" failure="warn">
360                 <os family="windows" />
361                 <args>
362                     <arg value="delete" />
363                     <arg value="$INSTALL_PATH/utility.jar" />
364                 </args>
365             </executable>
366
367            <!-- postinstall stuff for *nix -->
368            <!-- stage=never means chmod a+x -->
369            <executable targetfile="$INSTALL_PATH/postinstall.sh" type="bin" stage="never" keep="true" failure="warn"><os family="unix" /></executable>
370            <executable targetfile="$INSTALL_PATH/postinstall.sh" type="bin" stage="postinstall" keep="true" failure="warn"><os family="unix" />
371                <args><arg value="$INSTALL_PATH" /></args></executable>
372            <!--
373             Removal of the I2P service in Windows should be done in the base pack
374             so that even if a user installed the service manually it will still be
375             removed when uninstalling.
376            -->
377            <executable targetfile="$INSTALL_PATH/uninstall_i2p_service_winnt.bat" stage="uninstall"><os family="windows" /></executable>
378        </pack>
379
380        <!-- to disable by default, add preselected="no" -->
381        <pack name="Windows Service" required="no" preselected="no">
382            <description>Automatically start I2P in the background</description>
383            <os family="windows" />
384            <executable targetfile="$INSTALL_PATH/set_config_dir_for_nt_service.bat" stage="postinstall" failure="warn" keep="true" />
385            <executable targetfile="$INSTALL_PATH/install_i2p_service_winnt.bat" stage="postinstall" failure="warn" keep="true" />
386            <executable targetfile="$INSTALL_PATH/I2Psvc.exe" stage="postinstall" failure="warn" keep="true">
387                <args>
388                    <arg value="-t" />
389                    <arg value="$INSTALL_PATH\wrapper.config" />
390                </args>
391            </executable>
392        </pack>
393    </packs>
394
395</izpack:installation>
Note: See TracBrowser for help on using the repository browser.