OSDN Git Service

first commit
[japandigitalstudio/build-jds.git] / all-in-one.installer.installer_project_template.xml
1 <project>
2     <shortName>@product.short.name@</shortName>
3     <fullName>@product.full.name@</fullName>
4     <version>@branding.version@</version>
5     <outputDirectory>@bitrock.output@</outputDirectory>
6     <installerFilename>@installer.name@</installerFilename>
7     <licenseFile>@license@</licenseFile>
8     <licenseFileEncoding>utf-8</licenseFileEncoding>
9     <logoImage>@logo@</logoImage>
10     <leftImage>@leftImage@</leftImage>
11     <splashImage>@splash@</splashImage>
12     <allowLanguageSelection>1</allowLanguageSelection>
13     <wmImage>@titlebar.image@</wmImage>
14     <windowsExecutableIcon>@windows.ico@</windowsExecutableIcon>
15     <osxApplicationBundleIcon>@mac.installer.icns@</osxApplicationBundleIcon>
16     <osxPlatforms>osx-intel osx-x86_64</osxPlatforms>
17     <createOsxBundleZip>1</createOsxBundleZip>
18     <createUninstaller>@enable.uninstaller@</createUninstaller>
19     <slideShowLoop>1</slideShowLoop>
20     <slideShowTiming>8</slideShowTiming>
21     <slideShowImageList>
22         <slideShowImage>
23             <path>@slide1@</path>
24         </slideShowImage>
25         <slideShowImage>
26             <path>@slide2@</path>
27         </slideShowImage>
28         <slideShowImage>
29             <path>@slide3@</path>
30         </slideShowImage>
31     </slideShowImageList>
32     <singleInstanceCheck>1</singleInstanceCheck>
33     <overrideGtkButtonText>1</overrideGtkButtonText>
34     <compressionAlgorithm>zip</compressionAlgorithm>
35     <allowedLanguages>en es fr ja pt_BR</allowedLanguages>
36     <customLanguageFileList>
37         <language>
38             <code>en</code>
39             <file>i18n/messages.properties</file>
40             <encoding>iso8859-1</encoding>
41             <resolveUCN>1</resolveUCN>
42         </language>
43         <language>
44             <code>fr</code>
45             <file>i18n/messages_fr.properties</file>
46             <encoding>iso8859-1</encoding>
47             <resolveUCN>1</resolveUCN>
48         </language>
49         <language>
50             <code>es</code>
51             <file>i18n/messages_es.properties</file>
52             <encoding>iso8859-1</encoding>
53             <resolveUCN>1</resolveUCN>
54         </language>
55         <language>
56             <code>ja</code>
57             <file>i18n/messages_ja.properties</file>
58             <encoding>iso8859-1</encoding>
59             <resolveUCN>1</resolveUCN>
60         </language>
61         <language>
62             <code>pt_BR</code>
63             <file>i18n/messages_pt_BR.properties</file>
64             <encoding>iso8859-1</encoding>
65             <resolveUCN>1</resolveUCN>
66         </language>
67     </customLanguageFileList>
68     <preBuildActionList>
69         <substitute>
70             <encoding>iso8859-1</encoding>
71             <files>${build_project_directory}/i18n/*.properties</files>
72             <type>regexp</type>
73             <substitutionList>
74                 <substitution>
75                     <pattern>\\:</pattern>
76                     <value>:</value>
77                 </substitution>
78                 <substitution>
79                     <pattern>\\!</pattern>
80                     <value>!</value>
81                 </substitution>
82             </substitutionList>
83         </substitute>
84     </preBuildActionList>
85     <preInstallationActionList>
86         <setInstallerVariable>
87             <!-- Set default path to C: on Windows -->
88             <name>installdir</name>
89             <value>${env(SYSTEMDRIVE)}/@product.short.name@-${product_version}</value>
90             <ruleList>
91                 <platformTest type="windows" />
92             </ruleList>
93         </setInstallerVariable>
94          <setInstallerVariable>
95             <!-- Set default path to /Applications on OSX -->
96             <name>installdir</name>
97             <value>${platform_install_prefix}</value>
98             <ruleList>
99                 <platformTest type="osx" />
100             </ruleList>
101         </setInstallerVariable>
102         <setInstallerVariable>
103             <!-- 32 bits -->
104             <name>windowsExecName</name>
105             <value>@windows.shortcut.name@</value>
106             <ruleList>
107                 <platformTest type="windows" />
108             </ruleList>
109         </setInstallerVariable>
110     </preInstallationActionList>
111     <postInstallationActionList>
112             <!--        <runProgram>
113             <program>cmd</program>
114             <programArguments>/C netsh advfirewall firewall add rule name="${windowsExecName}" dir=in action=allow program="${installdir}\${windowsExecName}"</programArguments>
115             <progressText>Configuring Windows Firewall...</progressText>
116             <ruleList>
117                 <firewallTest>
118                     <type>enabled</type>
119                 </firewallTest>
120                 <platformTest type="windows" />
121             </ruleList>-->
122         </runProgram>
123         <!--        <runProgram>
124             <program>cmd</program>
125             <programArguments>/C netsh advfirewall firewall add rule name="OpenJDK Platform binary" dir=in action=allow program="${installdir}\jre\bin\javaw.exe"</programArguments>
126             <progressText>Configuring Windows Firewall...</progressText>
127             <ruleList>
128                 <firewallTest>
129                     <type>enabled</type>
130                 </firewallTest>
131                 <platformTest type="windows" />
132             </ruleList>
133         </runProgram>-->
134         <setInstallerVariable persist="1">
135           <name>ini_file</name>
136           <value>${installdir}/configuration/config.ini</value>
137             <ruleList>
138                 <platformTest>
139                 <negate>1</negate>
140                  <type>osx</type>
141                  </platformTest>
142             </ruleList>
143         </setInstallerVariable>
144          <setInstallerVariable persist="1">
145           <name>ini_file</name>
146           <value>${installdir}/@mac.shortcut.name@/Contents/Eclipse/configuration/config.ini</value>
147             <ruleList>
148                 <platformTest type="osx" />
149             </ruleList>
150         </setInstallerVariable>
151         <iniFileSet>
152             <file>${ini_file}</file>
153             <section>Language</section>
154             <key>osgi.nl</key>
155             <value>${installation_language_code}</value>
156         </iniFileSet>
157         <createSymLink>
158             <explanation>@shortcut.comment@</explanation>
159             <linkName>~/Desktop/@product.short.name@-${product_version}</linkName>
160             <target>${installdir}/@mac.shortcut.name@</target>
161             <ruleList>
162                 <platformTest>
163                     <type>osx</type>
164                 </platformTest>
165             </ruleList>
166         </createSymLink>
167         <setInstallerVariableFromScriptOutput>
168             <exec>xdg-user-dir</exec>
169             <execArgs>DESKTOP</execArgs>
170             <name>desktop_path</name>
171             <abortOnError>0</abortOnError>
172             <showMessageOnError>0</showMessageOnError>
173             <ruleList>
174                 <platformTest>
175                     <type>linux</type>
176                 </platformTest>
177                 <programTest>
178                     <condition>is_in_path</condition>
179                     <name>xdg-user-dir</name>
180                 </programTest>
181             </ruleList>
182         </setInstallerVariableFromScriptOutput>
183         <if>
184             <actionList>
185                 <setInstallerVariableFromScriptOutput>
186                     <exec>xdg-user-dir</exec>
187                     <execArgs>DESKTOP</execArgs>
188                     <name>desktop_path</name>
189                     <abortOnError>0</abortOnError>
190                     <showMessageOnError>0</showMessageOnError>
191                 </setInstallerVariableFromScriptOutput>
192             </actionList>
193             <conditionRuleList>
194                 <platformTest>
195                     <type>linux</type>
196                 </platformTest>
197                 <programTest>
198                     <condition>is_in_path</condition>
199                     <name>xdg-user-dir</name>
200                 </programTest>
201             </conditionRuleList>
202             <elseActionList>
203                 <setInstallerVariable name="desktop_path" value="${installdir}" />
204             </elseActionList>
205         </if>
206
207         <if>
208             <actionList>
209                 <writeFile>
210                     <path>${desktop_path}/@product.short.name@-${product_version}.desktop</path>
211                     <encoding>utf-8</encoding>
212                     <text>
213                         [Desktop Entry]
214                         Version=1.0
215                         Encoding=UTF-8
216                         Name=@product.short.name@-${product_version}
217                         GenericName=@product.short.name@-${product_version}
218                         Comment=@shortcut.comment@
219                         Exec=${installdir}/@linux.shortcut.name@
220                         Icon=${installdir}/bonitasoft-icon-128-128-transparent.png
221                         Terminal=false
222                         Type=Application
223                     </text>
224                 </writeFile>
225                 <changePermissions permissions="0755"
226                     files="${desktop_path}/@product.short.name@-${product_version}.desktop" />
227                 <addFilesToUninstaller files="${desktop_path}/@product.short.name@-${product_version}.desktop" />
228             </actionList>
229             <conditionRuleList>
230                 <platformTest>
231                     <type>linux</type>
232                 </platformTest>
233             </conditionRuleList>
234         </if>
235         <if>
236             <actionList>
237                 <changePermissions permissions="0755" files="${installdir}/jre/bin/java" />
238             </actionList>
239             <conditionRuleList>
240                 <platformTest>
241                     <negate>1</negate>
242                     <type>windows</type>
243                 </platformTest>
244             </conditionRuleList>
245         </if>
246         <substitute>
247             <encoding>utf-8</encoding>
248             <files>${installdir}/@mac.shortcut.name@/Contents/Eclipse/@product.short.name@.ini</files>
249             <type>exact</type>
250             <substitutionList>
251                 <substitution>
252                     <pattern>-startup</pattern>
253                     <value>-vm
254 ${installdir}/@mac.shortcut.name@/Contents/Eclipse/jre/Contents/Home/bin/java
255 -startup</value>
256                 </substitution>
257             </substitutionList>
258             <ruleList>
259                 <platformTest>
260                     <type>osx</type>
261                 </platformTest>
262             </ruleList>
263         </substitute>
264         <changePermissions permissions="0755" files="${installdir}/@mac.shortcut.name@/Contents/Eclipse/jre/Contents/Home/{lib/*,bin/*}"> 
265             <ruleList>
266                 <platformTest>
267                     <type>osx</type>
268                 </platformTest>
269             </ruleList>
270         </changePermissions>
271     </postInstallationActionList>
272     <finalPageActionList>
273         <runProgram>
274             <ruleList>
275                 <platformTest>
276                     <type>osx</type>
277                 </platformTest>
278             </ruleList>
279             <program>open</program>
280             <programArguments>"${installdir}/@mac.shortcut.name@" &amp;</programArguments>
281             <progressText>${msg(launch)} ${product_fullname}</progressText>
282         </runProgram>
283         <runProgram>
284             <ruleList>
285                 <platformTest>
286                     <type>linux</type>
287                 </platformTest>
288             </ruleList>
289             <program>${installdir}/@linux.shortcut.name@</program>
290             <programArguments>&amp;</programArguments>
291             <progressText>${msg(launch)} ${product_fullname}</progressText>
292         </runProgram>
293         <runProgram>
294             <ruleList>
295                 <platformTest>
296                     <type>windows</type>
297                 </platformTest>
298             </ruleList>
299             <program>${installdir}\${windowsExecName}</program>
300             <programArguments>&amp;</programArguments>
301             <progressText>${msg(launch)} ${product_fullname}</progressText>
302         </runProgram>
303         <!--        <launchBrowser>
304             <show>0</show>
305             <url>http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=126&amp;bos_redirect_product=bos&amp;bos_version=${product_version}&amp;os=${platform_name}&amp;arch=@os_arch@&amp;edition=community&amp;lang=${installation_language_code}&amp;utm_source=bonita_wizard&amp;utm_medium=referral&amp;utm_campaign=bonita_install</url>
306         </launchBrowser>-->
307     </finalPageActionList>
308
309     <enableRollback>0</enableRollback>
310     <enableTimestamp>1</enableTimestamp>
311     <vendor>@vendor@</vendor>
312     <componentList>
313         <component>
314             <name>install</name>
315             <description>Install distribution component</description>
316             <canBeEdited>1</canBeEdited>
317             <selected>1</selected>
318             <show>1</show>
319             <desktopShortcutList>
320                 <shortcut>
321                     <comment>@shortcut.comment@</comment>
322                     <exec></exec>
323                     <icon></icon>
324                     <name>@shortcut.name@</name>
325                     <path></path>
326                     <platforms>windows</platforms>
327                     <runInTerminal>0</runInTerminal>
328                     <windowsExec>"${installdir}/${windowsExecName}"</windowsExec>
329                     <windowsExecArgs></windowsExecArgs>
330                     <windowsIcon></windowsIcon>
331                     <windowsPath>${installdir}/</windowsPath>
332                 </shortcut>
333                 <shortcut>
334                     <comment>@shortcut.comment@</comment>
335                     <exec>${installdir}/@linux.shortcut.name@</exec>
336                     <icon>${installdir}/@linux.icon@</icon>
337                     <name>@shortcut.name@</name>
338                     <path>${installdir}</path>
339                     <platforms>linux</platforms>
340                     <runInTerminal>0</runInTerminal>
341                     <windowsExec></windowsExec>
342                     <windowsExecArgs></windowsExecArgs>
343                     <windowsIcon></windowsIcon>
344                     <windowsPath></windowsPath>
345                 </shortcut>
346             </desktopShortcutList>
347             <folderList>
348                 <folder>
349                     <description>Linux Program Files</description>
350                     <destination>${installdir}</destination>
351                     <name>linux_programfiles</name>
352                     <platforms>linux</platforms>
353                     <distributionFileList>
354                         <distributionDirectory allowWildcards="1">
355                             <origin>@studio.dir@/**</origin>
356                         </distributionDirectory>
357                     </distributionFileList>
358                 </folder>
359                 <folder>
360                     <description>Linux Program Files x64</description>
361                     <destination>${installdir}</destination>
362                     <name>linux_programfiles_64</name>
363                     <platforms>linux-x64</platforms>
364                     <distributionFileList>
365                         <distributionDirectory allowWildcards="1">
366                             <origin>@studio.dir@/**</origin>
367                         </distributionDirectory>
368                     </distributionFileList>
369                 </folder>
370                  <folder>
371                     <description>Windows Program Files</description>
372                     <destination>${installdir}</destination>
373                     <name>win_programfiles</name>
374                     <platforms>windows</platforms>
375                     <distributionFileList>
376                         <distributionDirectory allowWildcards="1">
377                             <origin>@studio.dir@/**</origin>
378                         </distributionDirectory>
379                     </distributionFileList>
380                 </folder>
381                 <folder>
382                     <description>OSX Program Files</description>
383                     <destination>${installdir}</destination>
384                     <name>osx_programfiles</name>
385                     <platforms>osx</platforms>
386                     <distributionFileList>
387                         <distributionDirectory allowWildcards="1">
388                             <origin>@mac.studio.dir@/**</origin>
389                         </distributionDirectory>
390                     </distributionFileList>
391                 </folder>
392             </folderList>
393             <startMenuShortcutList>
394                 <startMenuShortcut>
395                     <comment>@shortcut.comment@</comment>
396                     <name>@shortcut.name@</name>
397                     <runInTerminal>0</runInTerminal>
398                     <windowsExec>${installdir}/${windowsExecName}</windowsExec>
399                     <windowsExecArgs></windowsExecArgs>
400                     <windowsIcon></windowsIcon>
401                     <windowsPath>${installdir}/</windowsPath>
402                 </startMenuShortcut>
403                 <startMenuShortcut>
404                     <comment>Uninstall ${product_fullname}</comment>
405                     <name>Uninstall ${product_fullname}</name>
406                     <runInTerminal>0</runInTerminal>
407                     <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
408                     <windowsExecArgs></windowsExecArgs>
409                     <windowsIcon></windowsIcon>
410                     <windowsPath>${installdir}/</windowsPath>
411                 </startMenuShortcut>
412             </startMenuShortcutList>
413         </component>
414     </componentList>
415     <parameterList>
416         <directoryParameter>
417             <name>installdir</name>
418             <description>Installer.Parameter.installdir.description</description>
419             <explanation>Installer.Parameter.installdir.explanation</explanation>
420             <value></value>
421             <default>${platform_install_prefix}/@product.short.name@-${product_version}</default>
422             <allowEmptyValue>0</allowEmptyValue>
423             <ask>yes</ask>
424             <cliOptionName>prefix</cliOptionName>
425             <mustBeWritable>yes</mustBeWritable>
426             <mustExist>0</mustExist>
427             <validationActionList>
428                         <throwError>
429                             <text>${msg(installdir.must.be.empty.folder)}</text>
430                             <ruleList>
431                                  <platformTest>
432                                               <negate>1</negate>
433                                               <type>osx</type>
434                                 </platformTest>
435                                 <fileTest path="${installdir}" condition="is_not_empty"/>
436                             </ruleList>
437                         </throwError>
438                         <throwError>
439                             <text>${msg(installdir.must.be.empty.folder)}</text>
440                             <ruleList>
441                                 <platformTest type="osx" /> 
442                                 <fileTest path="${installdir}/@mac.shortcut.name@" condition="is_not_empty"/>
443                             </ruleList>
444                         </throwError>
445                         <throwError>
446                             <text>${msg(not.enough.diskspace)}</text>
447                             <ruleList>
448                                <checkFreeDiskSpace>
449                                   <logic>less</logic>
450                                   <path>${installdir}</path>
451                                   <!-- ${required_diskspace} is automatically calculated by
452                                   InstallBuilder with all the files packed -->
453                                   <size>${required_diskspace}</size>
454                                </checkFreeDiskSpace>
455                             </ruleList>
456                         </throwError>
457                </validationActionList>
458         </directoryParameter>
459         <parameterGroup>
460           <name>antivirusPage</name>
461           <title>${msg(antivirus.detected.title)}</title>
462           <explanation></explanation>
463           <insertAfter>installation</insertAfter>
464           <parameterList>
465             <linkParameter>
466               <name>visitMicrosoftSuuport</name>
467               <description>${msg(visit.microsoft.website)}</description>
468               <explanation>${msg(antivirus.detected.message)}</explanation>
469               <clickedActionList>
470                 <launchBrowser>
471                   <url>http://www.bonitasoft.com/bos_redirect.php?bos_redirect_id=714&amp;bos_redirect_product=bos&amp;bos_version=@product.version@</url>
472                 </launchBrowser>
473               </clickedActionList>
474             </linkParameter>
475          </parameterList>
476           <ruleList>
477             <antivirusTest type="disabled" />
478           </ruleList>
479         </parameterGroup>
480     </parameterList>
481     <preUninstallationActionList>
482         <deleteFile>
483             <path>${desktop_path}/@product.short.name@-${product_version}.desktop</path>
484         </deleteFile>
485         <showQuestion>
486             <default>yes</default>
487             <text>${msg(keep.workspace.msg)}</text>
488             <title>${msg(keep.workspace.title)}</title>
489             <variable>saveWorkspace</variable>
490         </showQuestion>
491     </preUninstallationActionList>
492     <postUninstallationActionList>
493         <deleteFile>
494             <path>${installdir}</path>
495             <ruleList>
496                 <isFalse>
497                     <value>${saveWorkspace}</value>
498                 </isFalse>
499             </ruleList>
500         </deleteFile>
501     </postUninstallationActionList>
502 </project>