Neurogami-roir 1.3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (251) hide show
  1. data/History.txt +22 -0
  2. data/Manifest.txt +250 -0
  3. data/README.md +12 -0
  4. data/Rakefile +63 -0
  5. data/bin/roir +176 -0
  6. data/data/GenericJavaApp.icns +0 -0
  7. data/data/JavaApplicationStub +0 -0
  8. data/data/Rawr logo 1 large.png +0 -0
  9. data/data/Rawr logo 2 large.png +0 -0
  10. data/data/Rawr logo2.png +0 -0
  11. data/data/website/_notes/dwsync.xml +1 -0
  12. data/data/website/css/1.css +254 -0
  13. data/data/website/css/_notes/dwsync.xml +1 -0
  14. data/data/website/images/_notes/dwsync.xml +1 -0
  15. data/data/website/images/body_bg.jpg +0 -0
  16. data/data/website/images/bullet.gif +0 -0
  17. data/data/website/images/content.jpg +0 -0
  18. data/data/website/images/content_h2.gif +0 -0
  19. data/data/website/images/details.gif +0 -0
  20. data/data/website/images/details.jpg +0 -0
  21. data/data/website/images/header_bg.jpg +0 -0
  22. data/data/website/images/nav_a_hover.gif +0 -0
  23. data/data/website/images/rawr_logo.png +0 -0
  24. data/data/website/index.html +164 -0
  25. data/lib/app_bundler.rb +138 -0
  26. data/lib/bundler.rb +36 -0
  27. data/lib/command.rb +68 -0
  28. data/lib/exe_bundler.rb +106 -0
  29. data/lib/generator.rb +127 -0
  30. data/lib/jar_builder.rb +57 -0
  31. data/lib/jruby_batch_compiler.rb +127 -0
  32. data/lib/jruby_release.rb +104 -0
  33. data/lib/launch4j/LICENSE.txt +30 -0
  34. data/lib/launch4j/bin-linux/COPYING +340 -0
  35. data/lib/launch4j/bin-linux/ld +0 -0
  36. data/lib/launch4j/bin-linux/windres +0 -0
  37. data/lib/launch4j/bin-mac/COPYING +340 -0
  38. data/lib/launch4j/bin-mac/ld +0 -0
  39. data/lib/launch4j/bin-mac/readme.txt +1 -0
  40. data/lib/launch4j/bin-mac/windres +0 -0
  41. data/lib/launch4j/bin-win/COPYING +340 -0
  42. data/lib/launch4j/bin-win/ld.exe +0 -0
  43. data/lib/launch4j/bin-win/windres.exe +0 -0
  44. data/lib/launch4j/build.xml +62 -0
  45. data/lib/launch4j/demo/ConsoleApp/ConsoleApp.jar +0 -0
  46. data/lib/launch4j/demo/ConsoleApp/build.xml +57 -0
  47. data/lib/launch4j/demo/ConsoleApp/l4j/ConsoleApp.ico +0 -0
  48. data/lib/launch4j/demo/ConsoleApp/lib/readme.txt +8 -0
  49. data/lib/launch4j/demo/ConsoleApp/readme.txt +1 -0
  50. data/lib/launch4j/demo/ConsoleApp/src/net/sf/launch4j/example/ConsoleApp.java +72 -0
  51. data/lib/launch4j/demo/LICENSE.txt +30 -0
  52. data/lib/launch4j/demo/SimpleApp/SimpleApp.jar +0 -0
  53. data/lib/launch4j/demo/SimpleApp/build.xml +52 -0
  54. data/lib/launch4j/demo/SimpleApp/l4j/SimpleApp.ico +0 -0
  55. data/lib/launch4j/demo/SimpleApp/l4j/SimpleApp.xml +18 -0
  56. data/lib/launch4j/demo/SimpleApp/l4j/splash.bmp +0 -0
  57. data/lib/launch4j/demo/SimpleApp/lib/readme.txt +8 -0
  58. data/lib/launch4j/demo/SimpleApp/readme.txt +1 -0
  59. data/lib/launch4j/demo/SimpleApp/src/net/sf/launch4j/example/SimpleApp.java +104 -0
  60. data/lib/launch4j/demo/readme.txt +3 -0
  61. data/lib/launch4j/head/LICENSE.txt +23 -0
  62. data/lib/launch4j/head/consolehead.o +0 -0
  63. data/lib/launch4j/head/guihead.o +0 -0
  64. data/lib/launch4j/head/head.o +0 -0
  65. data/lib/launch4j/head_src/LICENSE.txt +23 -0
  66. data/lib/launch4j/head_src/consolehead/Makefile.win +33 -0
  67. data/lib/launch4j/head_src/consolehead/consolehead.c +65 -0
  68. data/lib/launch4j/head_src/consolehead/consolehead.dev +108 -0
  69. data/lib/launch4j/head_src/guihead/Makefile.win +33 -0
  70. data/lib/launch4j/head_src/guihead/guihead.c +185 -0
  71. data/lib/launch4j/head_src/guihead/guihead.dev +109 -0
  72. data/lib/launch4j/head_src/guihead/guihead.h +43 -0
  73. data/lib/launch4j/head_src/head.c +807 -0
  74. data/lib/launch4j/head_src/head.h +113 -0
  75. data/lib/launch4j/head_src/resource.h +71 -0
  76. data/lib/launch4j/launch4j +8 -0
  77. data/lib/launch4j/launch4j.jar +0 -0
  78. data/lib/launch4j/launch4j.jfpr +0 -0
  79. data/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt +31 -0
  80. data/lib/launch4j/lib/JGoodies.Looks.LICENSE.txt +31 -0
  81. data/lib/launch4j/lib/Nuvola.Icon.Theme.LICENSE.txt +504 -0
  82. data/lib/launch4j/lib/XStream.LICENSE.txt +27 -0
  83. data/lib/launch4j/lib/commons-beanutils.jar +0 -0
  84. data/lib/launch4j/lib/commons-logging.jar +0 -0
  85. data/lib/launch4j/lib/commons.LICENSE.txt +50 -0
  86. data/lib/launch4j/lib/forms.jar +0 -0
  87. data/lib/launch4j/lib/formsrt.jar +0 -0
  88. data/lib/launch4j/lib/foxtrot.LICENSE.txt +25 -0
  89. data/lib/launch4j/lib/foxtrot.jar +0 -0
  90. data/lib/launch4j/lib/looks.jar +0 -0
  91. data/lib/launch4j/lib/xstream.jar +0 -0
  92. data/lib/launch4j/manifest/uac.exe.manifest +12 -0
  93. data/lib/launch4j/manifest/xp-themes.exe.manifest +14 -0
  94. data/lib/launch4j/src/images/asterix-o.gif +0 -0
  95. data/lib/launch4j/src/images/asterix.gif +0 -0
  96. data/lib/launch4j/src/images/build.png +0 -0
  97. data/lib/launch4j/src/images/button_ok.png +0 -0
  98. data/lib/launch4j/src/images/cancel16.png +0 -0
  99. data/lib/launch4j/src/images/down16.png +0 -0
  100. data/lib/launch4j/src/images/edit_add16.png +0 -0
  101. data/lib/launch4j/src/images/info.png +0 -0
  102. data/lib/launch4j/src/images/new.png +0 -0
  103. data/lib/launch4j/src/images/new16.png +0 -0
  104. data/lib/launch4j/src/images/ok16.png +0 -0
  105. data/lib/launch4j/src/images/open.png +0 -0
  106. data/lib/launch4j/src/images/open16.png +0 -0
  107. data/lib/launch4j/src/images/run.png +0 -0
  108. data/lib/launch4j/src/images/save.png +0 -0
  109. data/lib/launch4j/src/images/up16.png +0 -0
  110. data/lib/launch4j/src/launch4j.properties +2 -0
  111. data/lib/launch4j/src/net/sf/launch4j/Builder.java +207 -0
  112. data/lib/launch4j/src/net/sf/launch4j/BuilderException.java +52 -0
  113. data/lib/launch4j/src/net/sf/launch4j/ExecException.java +66 -0
  114. data/lib/launch4j/src/net/sf/launch4j/FileChooserFilter.java +76 -0
  115. data/lib/launch4j/src/net/sf/launch4j/Log.java +105 -0
  116. data/lib/launch4j/src/net/sf/launch4j/Main.java +99 -0
  117. data/lib/launch4j/src/net/sf/launch4j/Messages.java +78 -0
  118. data/lib/launch4j/src/net/sf/launch4j/OptionParser.java +71 -0
  119. data/lib/launch4j/src/net/sf/launch4j/RcBuilder.java +340 -0
  120. data/lib/launch4j/src/net/sf/launch4j/Util.java +197 -0
  121. data/lib/launch4j/src/net/sf/launch4j/ant/AntClassPath.java +61 -0
  122. data/lib/launch4j/src/net/sf/launch4j/ant/AntConfig.java +129 -0
  123. data/lib/launch4j/src/net/sf/launch4j/ant/AntJre.java +69 -0
  124. data/lib/launch4j/src/net/sf/launch4j/ant/Launch4jTask.java +162 -0
  125. data/lib/launch4j/src/net/sf/launch4j/ant/Messages.java +55 -0
  126. data/lib/launch4j/src/net/sf/launch4j/ant/StringWrapper.java +67 -0
  127. data/lib/launch4j/src/net/sf/launch4j/ant/messages.properties +35 -0
  128. data/lib/launch4j/src/net/sf/launch4j/ant/messages_es.properties +35 -0
  129. data/lib/launch4j/src/net/sf/launch4j/binding/Binding.java +62 -0
  130. data/lib/launch4j/src/net/sf/launch4j/binding/BindingException.java +52 -0
  131. data/lib/launch4j/src/net/sf/launch4j/binding/Bindings.java +317 -0
  132. data/lib/launch4j/src/net/sf/launch4j/binding/IValidatable.java +44 -0
  133. data/lib/launch4j/src/net/sf/launch4j/binding/InvariantViolationException.java +67 -0
  134. data/lib/launch4j/src/net/sf/launch4j/binding/JComboBoxBinding.java +119 -0
  135. data/lib/launch4j/src/net/sf/launch4j/binding/JListBinding.java +118 -0
  136. data/lib/launch4j/src/net/sf/launch4j/binding/JRadioButtonBinding.java +146 -0
  137. data/lib/launch4j/src/net/sf/launch4j/binding/JTextAreaBinding.java +123 -0
  138. data/lib/launch4j/src/net/sf/launch4j/binding/JTextComponentBinding.java +108 -0
  139. data/lib/launch4j/src/net/sf/launch4j/binding/JToggleButtonBinding.java +108 -0
  140. data/lib/launch4j/src/net/sf/launch4j/binding/Messages.java +78 -0
  141. data/lib/launch4j/src/net/sf/launch4j/binding/OptComponentBinding.java +119 -0
  142. data/lib/launch4j/src/net/sf/launch4j/binding/OptJTextAreaBinding.java +141 -0
  143. data/lib/launch4j/src/net/sf/launch4j/binding/Validator.java +259 -0
  144. data/lib/launch4j/src/net/sf/launch4j/binding/messages.properties +52 -0
  145. data/lib/launch4j/src/net/sf/launch4j/binding/messages_es.properties +51 -0
  146. data/lib/launch4j/src/net/sf/launch4j/config/ClassPath.java +87 -0
  147. data/lib/launch4j/src/net/sf/launch4j/config/Config.java +396 -0
  148. data/lib/launch4j/src/net/sf/launch4j/config/ConfigPersister.java +249 -0
  149. data/lib/launch4j/src/net/sf/launch4j/config/ConfigPersisterException.java +51 -0
  150. data/lib/launch4j/src/net/sf/launch4j/config/Jre.java +235 -0
  151. data/lib/launch4j/src/net/sf/launch4j/config/LdDefaults.java +62 -0
  152. data/lib/launch4j/src/net/sf/launch4j/config/Messages.java +78 -0
  153. data/lib/launch4j/src/net/sf/launch4j/config/Msg.java +111 -0
  154. data/lib/launch4j/src/net/sf/launch4j/config/SingleInstance.java +74 -0
  155. data/lib/launch4j/src/net/sf/launch4j/config/Splash.java +103 -0
  156. data/lib/launch4j/src/net/sf/launch4j/config/VersionInfo.java +168 -0
  157. data/lib/launch4j/src/net/sf/launch4j/config/messages.properties +93 -0
  158. data/lib/launch4j/src/net/sf/launch4j/config/messages_es.properties +75 -0
  159. data/lib/launch4j/src/net/sf/launch4j/form/BasicForm.java +283 -0
  160. data/lib/launch4j/src/net/sf/launch4j/form/BasicForm.jfrm +0 -0
  161. data/lib/launch4j/src/net/sf/launch4j/form/ClassPathForm.java +193 -0
  162. data/lib/launch4j/src/net/sf/launch4j/form/ClassPathForm.jfrm +0 -0
  163. data/lib/launch4j/src/net/sf/launch4j/form/ConfigForm.java +132 -0
  164. data/lib/launch4j/src/net/sf/launch4j/form/ConfigForm.jfrm +0 -0
  165. data/lib/launch4j/src/net/sf/launch4j/form/EnvironmentVarsForm.java +127 -0
  166. data/lib/launch4j/src/net/sf/launch4j/form/EnvironmentVarsForm.jfrm +0 -0
  167. data/lib/launch4j/src/net/sf/launch4j/form/HeaderForm.java +171 -0
  168. data/lib/launch4j/src/net/sf/launch4j/form/HeaderForm.jfrm +0 -0
  169. data/lib/launch4j/src/net/sf/launch4j/form/JreForm.java +266 -0
  170. data/lib/launch4j/src/net/sf/launch4j/form/JreForm.jfrm +0 -0
  171. data/lib/launch4j/src/net/sf/launch4j/form/Messages.java +55 -0
  172. data/lib/launch4j/src/net/sf/launch4j/form/MessagesForm.java +183 -0
  173. data/lib/launch4j/src/net/sf/launch4j/form/MessagesForm.jfrm +0 -0
  174. data/lib/launch4j/src/net/sf/launch4j/form/SingleInstanceForm.java +141 -0
  175. data/lib/launch4j/src/net/sf/launch4j/form/SingleInstanceForm.jfrm +0 -0
  176. data/lib/launch4j/src/net/sf/launch4j/form/SplashForm.java +166 -0
  177. data/lib/launch4j/src/net/sf/launch4j/form/SplashForm.jfrm +0 -0
  178. data/lib/launch4j/src/net/sf/launch4j/form/VersionInfoForm.java +232 -0
  179. data/lib/launch4j/src/net/sf/launch4j/form/VersionInfoForm.jfrm +0 -0
  180. data/lib/launch4j/src/net/sf/launch4j/form/messages.properties +146 -0
  181. data/lib/launch4j/src/net/sf/launch4j/form/messages_es.properties +118 -0
  182. data/lib/launch4j/src/net/sf/launch4j/formimpl/AbstractAcceptListener.java +75 -0
  183. data/lib/launch4j/src/net/sf/launch4j/formimpl/BasicFormImpl.java +101 -0
  184. data/lib/launch4j/src/net/sf/launch4j/formimpl/BrowseActionListener.java +79 -0
  185. data/lib/launch4j/src/net/sf/launch4j/formimpl/ClassPathFormImpl.java +222 -0
  186. data/lib/launch4j/src/net/sf/launch4j/formimpl/ConfigFormImpl.java +100 -0
  187. data/lib/launch4j/src/net/sf/launch4j/formimpl/EnvironmentVarsFormImpl.java +50 -0
  188. data/lib/launch4j/src/net/sf/launch4j/formimpl/FileChooser.java +65 -0
  189. data/lib/launch4j/src/net/sf/launch4j/formimpl/GlassPane.java +67 -0
  190. data/lib/launch4j/src/net/sf/launch4j/formimpl/HeaderFormImpl.java +102 -0
  191. data/lib/launch4j/src/net/sf/launch4j/formimpl/JreFormImpl.java +166 -0
  192. data/lib/launch4j/src/net/sf/launch4j/formimpl/MainFrame.java +358 -0
  193. data/lib/launch4j/src/net/sf/launch4j/formimpl/Messages.java +55 -0
  194. data/lib/launch4j/src/net/sf/launch4j/formimpl/MessagesFormImpl.java +58 -0
  195. data/lib/launch4j/src/net/sf/launch4j/formimpl/SingleInstanceFormImpl.java +54 -0
  196. data/lib/launch4j/src/net/sf/launch4j/formimpl/SplashFormImpl.java +61 -0
  197. data/lib/launch4j/src/net/sf/launch4j/formimpl/VersionInfoFormImpl.java +63 -0
  198. data/lib/launch4j/src/net/sf/launch4j/formimpl/messages.properties +74 -0
  199. data/lib/launch4j/src/net/sf/launch4j/formimpl/messages_es.properties +56 -0
  200. data/lib/launch4j/src/net/sf/launch4j/messages.properties +45 -0
  201. data/lib/launch4j/src/net/sf/launch4j/messages_es.properties +45 -0
  202. data/lib/launch4j/w32api/MinGW.LICENSE.txt +25 -0
  203. data/lib/launch4j/w32api/crt2.o +0 -0
  204. data/lib/launch4j/w32api/libadvapi32.a +0 -0
  205. data/lib/launch4j/w32api/libgcc.a +0 -0
  206. data/lib/launch4j/w32api/libkernel32.a +0 -0
  207. data/lib/launch4j/w32api/libmingw32.a +0 -0
  208. data/lib/launch4j/w32api/libmsvcrt.a +0 -0
  209. data/lib/launch4j/w32api/libshell32.a +0 -0
  210. data/lib/launch4j/w32api/libuser32.a +0 -0
  211. data/lib/launch4j/web/bullet.gif +0 -0
  212. data/lib/launch4j/web/changelog.html +356 -0
  213. data/lib/launch4j/web/docs.html +585 -0
  214. data/lib/launch4j/web/index.html +128 -0
  215. data/lib/launch4j/web/launch4j-use.gif +0 -0
  216. data/lib/launch4j/web/launch4j.gif +0 -0
  217. data/lib/launch4j/web/links.html +73 -0
  218. data/lib/launch4j/web/style.css +159 -0
  219. data/lib/options.rb +101 -0
  220. data/lib/platform.rb +28 -0
  221. data/lib/rawr.rb +178 -0
  222. data/lib/rawr_bundle.rb +26 -0
  223. data/lib/rawr_version.rb +3 -0
  224. data/lib/web_bundler.rb +114 -0
  225. data/lib/zip/ioextras.rb +155 -0
  226. data/lib/zip/stdrubyext.rb +111 -0
  227. data/lib/zip/tempfile_bugfixed.rb +195 -0
  228. data/lib/zip/zip.rb +1848 -0
  229. data/lib/zip/zipfilesystem.rb +609 -0
  230. data/lib/zip/ziprequire.rb +90 -0
  231. data/tasks/ann.rake +81 -0
  232. data/tasks/bones.rake +21 -0
  233. data/tasks/gem.rake +121 -0
  234. data/tasks/manifest.rake +49 -0
  235. data/tasks/notes.rake +28 -0
  236. data/tasks/post_load.rake +39 -0
  237. data/tasks/rdoc.rake +51 -0
  238. data/tasks/rubyforge.rake +57 -0
  239. data/tasks/setup.rb +269 -0
  240. data/tasks/spec.rake +63 -0
  241. data/tasks/svn.rake +48 -0
  242. data/tasks/test.rake +38 -0
  243. data/test/unit/app_bundler_spec.rb +65 -0
  244. data/test/unit/bundler_spec.rb +27 -0
  245. data/test/unit/generator_spec.rb +49 -0
  246. data/test/unit/jar_builder_spec.rb +5 -0
  247. data/test/unit/options_spec.rb +97 -0
  248. data/test/unit/platform_spec.rb +29 -0
  249. data/test/unit/spec_helpers.rb +22 -0
  250. data/test/unit/web_bundler_spec.rb +83 -0
  251. metadata +501 -0
@@ -0,0 +1,166 @@
1
+ /*
2
+ Launch4j (http://launch4j.sourceforge.net/)
3
+ Cross-platform Java application wrapper for creating Windows native executables.
4
+
5
+ Copyright (c) 2004, 2007 Grzegorz Kowal
6
+
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without modification,
10
+ are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice,
13
+ this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright notice,
15
+ this list of conditions and the following disclaimer in the documentation
16
+ and/or other materials provided with the distribution.
17
+ * Neither the name of the Launch4j nor the names of its contributors
18
+ may be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+ */
33
+
34
+ /*
35
+ * Created on May 1, 2006
36
+ */
37
+ package net.sf.launch4j.formimpl;
38
+
39
+ import java.awt.event.ActionEvent;
40
+ import java.awt.event.ActionListener;
41
+
42
+ import javax.swing.DefaultComboBoxModel;
43
+ import javax.swing.JFileChooser;
44
+ import javax.swing.JTextField;
45
+
46
+ import net.sf.launch4j.binding.Bindings;
47
+ import net.sf.launch4j.binding.Validator;
48
+ import net.sf.launch4j.form.JreForm;
49
+ import net.sf.launch4j.config.Jre;
50
+
51
+ /**
52
+ * @author Copyright (C) 2006 Grzegorz Kowal
53
+ */
54
+ public class JreFormImpl extends JreForm {
55
+
56
+ public JreFormImpl(Bindings bindings, JFileChooser fc) {
57
+ _jdkPreferenceCombo.setModel(new DefaultComboBoxModel(new String[] {
58
+ Messages.getString("jdkPreference.jre.only"),
59
+ Messages.getString("jdkPreference.prefer.jre"),
60
+ Messages.getString("jdkPreference.prefer.jdk"),
61
+ Messages.getString("jdkPreference.jdk.only")}));
62
+ bindings.add("jre.path", _jrePathField)
63
+ .add("jre.minVersion", _jreMinField)
64
+ .add("jre.maxVersion", _jreMaxField)
65
+ .add("jre.jdkPreferenceIndex", _jdkPreferenceCombo,
66
+ Jre.DEFAULT_JDK_PREFERENCE_INDEX)
67
+ .add("jre.initialHeapSize", _initialHeapSizeField)
68
+ .add("jre.initialHeapPercent", _initialHeapPercentField)
69
+ .add("jre.maxHeapSize", _maxHeapSizeField)
70
+ .add("jre.maxHeapPercent", _maxHeapPercentField)
71
+ .add("jre.options", _jvmOptionsTextArea);
72
+
73
+ _varCombo.setModel(new DefaultComboBoxModel(new String[] {
74
+ "EXEDIR", "EXEFILE", "PWD", "OLDPWD",
75
+ "HKEY_CLASSES_ROOT", "HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE",
76
+ "HKEY_USERS", "HKEY_CURRENT_CONFIG" }));
77
+
78
+ _varCombo.addActionListener(new VarComboActionListener());
79
+ _varCombo.setSelectedIndex(0);
80
+
81
+ _propertyButton.addActionListener(new PropertyActionListener());
82
+ _optionButton.addActionListener(new OptionActionListener());
83
+
84
+ _envPropertyButton.addActionListener(new EnvPropertyActionListener(_envVarField));
85
+ _envOptionButton.addActionListener(new EnvOptionActionListener(_envVarField));
86
+ }
87
+
88
+ private class VarComboActionListener implements ActionListener {
89
+ public void actionPerformed(ActionEvent e) {
90
+ _optionButton.setEnabled(((String) _varCombo.getSelectedItem())
91
+ .startsWith("HKEY_"));
92
+ }
93
+ }
94
+
95
+ private class PropertyActionListener implements ActionListener {
96
+ public void actionPerformed(ActionEvent e) {
97
+ final int pos = _jvmOptionsTextArea.getCaretPosition();
98
+ final String var = (String) _varCombo.getSelectedItem();
99
+ if (var.startsWith("HKEY_")) {
100
+ _jvmOptionsTextArea.insert("-Dreg.key=\"%"
101
+ + var + "\\\\...%\"\n", pos);
102
+ } else {
103
+ _jvmOptionsTextArea.insert("-Dlaunch4j." + var.toLowerCase()
104
+ + "=\"%" + var + "%\"\n", pos);
105
+ }
106
+ }
107
+ }
108
+
109
+ private class OptionActionListener implements ActionListener {
110
+ public void actionPerformed(ActionEvent e) {
111
+ final int pos = _jvmOptionsTextArea.getCaretPosition();
112
+ final String var = (String) _varCombo.getSelectedItem();
113
+ if (var.startsWith("HKEY_")) {
114
+ _jvmOptionsTextArea.insert("%" + var + "\\\\...%\n", pos);
115
+ } else {
116
+ _jvmOptionsTextArea.insert("%" + var + "%\n", pos);
117
+ }
118
+ }
119
+ }
120
+
121
+ private abstract class EnvActionListener extends AbstractAcceptListener {
122
+ public EnvActionListener(JTextField f, boolean listen) {
123
+ super(f, listen);
124
+ }
125
+
126
+ public void actionPerformed(ActionEvent e) {
127
+ final int pos = _jvmOptionsTextArea.getCaretPosition();
128
+ final String var = getText()
129
+ .replaceAll("\"", "")
130
+ .replaceAll("%", "");
131
+ if (Validator.isEmpty(var)) {
132
+ signalViolation(Messages.getString("specifyVar"));
133
+ return;
134
+ }
135
+ add(var, pos);
136
+ clear();
137
+ }
138
+
139
+ protected abstract void add(String var, int pos);
140
+ }
141
+
142
+ private class EnvPropertyActionListener extends EnvActionListener {
143
+ public EnvPropertyActionListener(JTextField f) {
144
+ super(f, true);
145
+ }
146
+
147
+ protected void add(String var, int pos) {
148
+ final String prop = var
149
+ .replaceAll(" ", ".")
150
+ .replaceAll("_", ".")
151
+ .toLowerCase();
152
+ _jvmOptionsTextArea.insert("-Denv." + prop + "=\"%" + var
153
+ + "%\"\n", pos);
154
+ }
155
+ }
156
+
157
+ private class EnvOptionActionListener extends EnvActionListener {
158
+ public EnvOptionActionListener(JTextField f) {
159
+ super(f, false);
160
+ }
161
+
162
+ protected void add(String var, int pos) {
163
+ _jvmOptionsTextArea.insert("%" + var + "%\n", pos);
164
+ }
165
+ }
166
+ }
@@ -0,0 +1,358 @@
1
+ /*
2
+ Launch4j (http://launch4j.sourceforge.net/)
3
+ Cross-platform Java application wrapper for creating Windows native executables.
4
+
5
+ Copyright (c) 2004, 2007 Grzegorz Kowal
6
+
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without modification,
10
+ are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice,
13
+ this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright notice,
15
+ this list of conditions and the following disclaimer in the documentation
16
+ and/or other materials provided with the distribution.
17
+ * Neither the name of the Launch4j nor the names of its contributors
18
+ may be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+ */
33
+
34
+ /*
35
+ * Created on 2005-05-09
36
+ */
37
+ package net.sf.launch4j.formimpl;
38
+
39
+ import java.awt.BorderLayout;
40
+ import java.awt.Dimension;
41
+ import java.awt.Toolkit;
42
+ import java.awt.event.ActionEvent;
43
+ import java.awt.event.ActionListener;
44
+ import java.awt.event.WindowAdapter;
45
+ import java.awt.event.WindowEvent;
46
+ import java.io.File;
47
+
48
+ import javax.swing.ImageIcon;
49
+ import javax.swing.JButton;
50
+ import javax.swing.JFileChooser;
51
+ import javax.swing.JFrame;
52
+ import javax.swing.JOptionPane;
53
+ import javax.swing.JToolBar;
54
+ import javax.swing.UIManager;
55
+
56
+ import com.jgoodies.looks.Options;
57
+ import com.jgoodies.looks.plastic.PlasticXPLookAndFeel;
58
+
59
+ import foxtrot.Task;
60
+ import foxtrot.Worker;
61
+
62
+ import net.sf.launch4j.Builder;
63
+ import net.sf.launch4j.BuilderException;
64
+ import net.sf.launch4j.ExecException;
65
+ import net.sf.launch4j.FileChooserFilter;
66
+ import net.sf.launch4j.Log;
67
+ import net.sf.launch4j.Main;
68
+ import net.sf.launch4j.Util;
69
+ import net.sf.launch4j.binding.Binding;
70
+ import net.sf.launch4j.binding.BindingException;
71
+ import net.sf.launch4j.binding.InvariantViolationException;
72
+ import net.sf.launch4j.config.Config;
73
+ import net.sf.launch4j.config.ConfigPersister;
74
+ import net.sf.launch4j.config.ConfigPersisterException;
75
+
76
+ /**
77
+ * @author Copyright (C) 2005 Grzegorz Kowal
78
+ */
79
+ public class MainFrame extends JFrame {
80
+ private static MainFrame _instance;
81
+
82
+ private final JToolBar _toolBar;
83
+ private final JButton _runButton;
84
+ private final ConfigFormImpl _configForm;
85
+ private final JFileChooser _fileChooser = new FileChooser(MainFrame.class);
86
+ private File _outfile;
87
+ private boolean _saved = false;
88
+
89
+ public static void createInstance() {
90
+ try {
91
+ Toolkit.getDefaultToolkit().setDynamicLayout(true);
92
+ System.setProperty("sun.awt.noerasebackground","true");
93
+
94
+ // JGoodies
95
+ Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
96
+ Options.setUseNarrowButtons(false);
97
+ Options.setPopupDropShadowEnabled(true);
98
+
99
+ UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
100
+ _instance = new MainFrame();
101
+ } catch (Exception e) {
102
+ System.err.println(e);
103
+ }
104
+ }
105
+
106
+ public static MainFrame getInstance() {
107
+ return _instance;
108
+ }
109
+
110
+ public MainFrame() {
111
+ showConfigName(null);
112
+ setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
113
+ addWindowListener(new MainFrameListener());
114
+ setGlassPane(new GlassPane(this));
115
+ _fileChooser.setFileFilter(new FileChooserFilter(
116
+ Messages.getString("MainFrame.config.files"),
117
+ new String[] {".xml", ".cfg"}));
118
+
119
+ _toolBar = new JToolBar();
120
+ _toolBar.setFloatable(false);
121
+ _toolBar.setRollover(true);
122
+ addButton("images/new.png", Messages.getString("MainFrame.new.config"),
123
+ new NewActionListener());
124
+ addButton("images/open.png", Messages.getString("MainFrame.open.config"),
125
+ new OpenActionListener());
126
+ addButton("images/save.png", Messages.getString("MainFrame.save.config"),
127
+ new SaveActionListener());
128
+ _toolBar.addSeparator();
129
+ addButton("images/build.png", Messages.getString("MainFrame.build.wrapper"),
130
+ new BuildActionListener());
131
+ _runButton = addButton("images/run.png",
132
+ Messages.getString("MainFrame.test.wrapper"),
133
+ new RunActionListener());
134
+ setRunEnabled(false);
135
+ _toolBar.addSeparator();
136
+ addButton("images/info.png", Messages.getString("MainFrame.about.launch4j"),
137
+ new AboutActionListener());
138
+
139
+ _configForm = new ConfigFormImpl();
140
+ getContentPane().setLayout(new BorderLayout());
141
+ getContentPane().add(_toolBar, BorderLayout.NORTH);
142
+ getContentPane().add(_configForm, BorderLayout.CENTER);
143
+ pack();
144
+ Dimension scr = Toolkit.getDefaultToolkit().getScreenSize();
145
+ Dimension fr = getSize();
146
+ fr.width += 25;
147
+ fr.height += 100;
148
+ setBounds((scr.width - fr.width) / 2, (scr.height - fr.height) / 2,
149
+ fr.width, fr.height);
150
+ setVisible(true);
151
+ }
152
+
153
+ private JButton addButton(String iconPath, String tooltip, ActionListener l) {
154
+ ImageIcon icon = new ImageIcon(MainFrame.class.getClassLoader()
155
+ .getResource(iconPath));
156
+ JButton b = new JButton(icon);
157
+ b.setToolTipText(tooltip);
158
+ b.addActionListener(l);
159
+ _toolBar.add(b);
160
+ return b;
161
+ }
162
+
163
+ public void info(String text) {
164
+ JOptionPane.showMessageDialog(this,
165
+ text,
166
+ Main.getName(),
167
+ JOptionPane.INFORMATION_MESSAGE);
168
+ }
169
+
170
+ public void warn(String text) {
171
+ JOptionPane.showMessageDialog(this,
172
+ text,
173
+ Main.getName(),
174
+ JOptionPane.WARNING_MESSAGE);
175
+ }
176
+
177
+ public void warn(InvariantViolationException e) {
178
+ Binding b = e.getBinding();
179
+ if (b != null) {
180
+ b.markInvalid();
181
+ }
182
+ warn(e.getMessage());
183
+ if (b != null) {
184
+ e.getBinding().markValid();
185
+ }
186
+ }
187
+
188
+ public boolean confirm(String text) {
189
+ return JOptionPane.showConfirmDialog(MainFrame.this,
190
+ text,
191
+ Messages.getString("MainFrame.confirm"),
192
+ JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
193
+ }
194
+
195
+ private boolean isModified() {
196
+ return (!_configForm.isModified())
197
+ || confirm(Messages.getString("MainFrame.discard.changes"));
198
+ }
199
+
200
+ private boolean save() {
201
+ // XXX
202
+ try {
203
+ _configForm.get(ConfigPersister.getInstance().getConfig());
204
+ if (_fileChooser.showSaveDialog(MainFrame.this) == JOptionPane.YES_OPTION) {
205
+ File f = _fileChooser.getSelectedFile();
206
+ if (!f.getPath().endsWith(".xml")) {
207
+ f = new File(f.getPath() + ".xml");
208
+ }
209
+ ConfigPersister.getInstance().save(f);
210
+ _saved = true;
211
+ showConfigName(f);
212
+ return true;
213
+ }
214
+ return false;
215
+ } catch (InvariantViolationException ex) {
216
+ warn(ex);
217
+ return false;
218
+ } catch (BindingException ex) {
219
+ warn(ex.getMessage());
220
+ return false;
221
+ } catch (ConfigPersisterException ex) {
222
+ warn(ex.getMessage());
223
+ return false;
224
+ }
225
+ }
226
+
227
+ private void showConfigName(File config) {
228
+ setTitle(Main.getName() + " - " + (config != null ? config.getName()
229
+ : Messages.getString("MainFrame.untitled")));
230
+ }
231
+
232
+ private void setRunEnabled(boolean enabled) {
233
+ if (!enabled) {
234
+ _outfile = null;
235
+ }
236
+ _runButton.setEnabled(enabled);
237
+ }
238
+
239
+ private void clearConfig() {
240
+ ConfigPersister.getInstance().createBlank();
241
+ _configForm.clear(ConfigPersister.getInstance().getConfig());
242
+ }
243
+
244
+ private class MainFrameListener extends WindowAdapter {
245
+ public void windowOpened(WindowEvent e) {
246
+ clearConfig();
247
+ }
248
+
249
+ public void windowClosing(WindowEvent e) {
250
+ if (isModified()) {
251
+ System.exit(0);
252
+ }
253
+ }
254
+ }
255
+
256
+ private class NewActionListener implements ActionListener {
257
+ public void actionPerformed(ActionEvent e) {
258
+ if (isModified()) {
259
+ clearConfig();
260
+ }
261
+ _saved = false;
262
+ showConfigName(null);
263
+ setRunEnabled(false);
264
+ }
265
+ }
266
+
267
+ private class OpenActionListener implements ActionListener {
268
+ public void actionPerformed(ActionEvent e) {
269
+ try {
270
+ if (isModified() && _fileChooser.showOpenDialog(MainFrame.this)
271
+ == JOptionPane.YES_OPTION) {
272
+ final File f = _fileChooser.getSelectedFile();
273
+ if (f.getPath().endsWith(".xml")) {
274
+ ConfigPersister.getInstance().load(f);
275
+ _saved = true;
276
+ } else {
277
+ ConfigPersister.getInstance().loadVersion1(f);
278
+ _saved = false;
279
+ }
280
+ _configForm.put(ConfigPersister.getInstance().getConfig());
281
+ showConfigName(f);
282
+ setRunEnabled(false);
283
+ }
284
+ } catch (ConfigPersisterException ex) {
285
+ warn(ex.getMessage());
286
+ } catch (BindingException ex) {
287
+ warn(ex.getMessage());
288
+ }
289
+ }
290
+ }
291
+
292
+ private class SaveActionListener implements ActionListener {
293
+ public void actionPerformed(ActionEvent e) {
294
+ save();
295
+ }
296
+ }
297
+
298
+ private class BuildActionListener implements ActionListener {
299
+ public void actionPerformed(ActionEvent e) {
300
+ final Log log = Log.getSwingLog(_configForm.getLogTextArea());
301
+ try {
302
+ if ((!_saved || _configForm.isModified())
303
+ && !save()) {
304
+ return;
305
+ }
306
+ log.clear();
307
+ ConfigPersister.getInstance().getConfig().checkInvariants();
308
+ Builder b = new Builder(log);
309
+ _outfile = b.build();
310
+ setRunEnabled(ConfigPersister.getInstance().getConfig()
311
+ .getHeaderType() == Config.GUI_HEADER // TODO fix console app test
312
+ && (Util.WINDOWS_OS || !ConfigPersister.getInstance()
313
+ .getConfig().isDontWrapJar()));
314
+ } catch (InvariantViolationException ex) {
315
+ setRunEnabled(false);
316
+ ex.setBinding(_configForm.getBinding(ex.getProperty()));
317
+ warn(ex);
318
+ } catch (BuilderException ex) {
319
+ setRunEnabled(false);
320
+ log.append(ex.getMessage());
321
+ }
322
+ }
323
+ }
324
+
325
+ private class RunActionListener implements ActionListener {
326
+ public void actionPerformed(ActionEvent e) {
327
+ try {
328
+ getGlassPane().setVisible(true);
329
+ Worker.post(new Task() {
330
+ public Object run() throws ExecException {
331
+ Log log = Log.getSwingLog(_configForm.getLogTextArea());
332
+ log.clear();
333
+ String path = _outfile.getPath();
334
+ if (Util.WINDOWS_OS) {
335
+ log.append(Messages.getString("MainFrame.executing") + path);
336
+ Util.exec(new String[] { path }, log);
337
+ } else {
338
+ log.append(Messages.getString("MainFrame.jar.integrity.test")
339
+ + path);
340
+ Util.exec(new String[] { "java", "-jar", path }, log);
341
+ }
342
+ return null;
343
+ }
344
+ });
345
+ } catch (Exception ex) {
346
+ // XXX errors logged by exec
347
+ } finally {
348
+ getGlassPane().setVisible(false);
349
+ }
350
+ };
351
+ }
352
+
353
+ private class AboutActionListener implements ActionListener {
354
+ public void actionPerformed(ActionEvent e) {
355
+ info(Main.getDescription());
356
+ }
357
+ }
358
+ }
@@ -0,0 +1,55 @@
1
+ /*
2
+ Launch4j (http://launch4j.sourceforge.net/)
3
+ Cross-platform Java application wrapper for creating Windows native executables.
4
+
5
+ Copyright (c) 2004, 2007 Grzegorz Kowal
6
+
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without modification,
10
+ are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice,
13
+ this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright notice,
15
+ this list of conditions and the following disclaimer in the documentation
16
+ and/or other materials provided with the distribution.
17
+ * Neither the name of the Launch4j nor the names of its contributors
18
+ may be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+ */
33
+
34
+ package net.sf.launch4j.formimpl;
35
+
36
+ import java.util.MissingResourceException;
37
+ import java.util.ResourceBundle;
38
+
39
+ public class Messages {
40
+ private static final String BUNDLE_NAME = "net.sf.launch4j.formimpl.messages";
41
+
42
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
43
+ .getBundle(BUNDLE_NAME);
44
+
45
+ private Messages() {
46
+ }
47
+
48
+ public static String getString(String key) {
49
+ try {
50
+ return RESOURCE_BUNDLE.getString(key);
51
+ } catch (MissingResourceException e) {
52
+ return '!' + key + '!';
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,58 @@
1
+ /*
2
+ Launch4j (http://launch4j.sourceforge.net/)
3
+ Cross-platform Java application wrapper for creating Windows native executables.
4
+
5
+ Copyright (c) 2004, 2007 Grzegorz Kowal
6
+
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without modification,
10
+ are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice,
13
+ this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright notice,
15
+ this list of conditions and the following disclaimer in the documentation
16
+ and/or other materials provided with the distribution.
17
+ * Neither the name of the Launch4j nor the names of its contributors
18
+ may be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+ */
33
+
34
+ /*
35
+ * Created on Oct 7, 2006
36
+ */
37
+ package net.sf.launch4j.formimpl;
38
+
39
+ import net.sf.launch4j.binding.Bindings;
40
+ import net.sf.launch4j.config.Msg;
41
+ import net.sf.launch4j.form.MessagesForm;
42
+
43
+ /**
44
+ * @author Copyright (C) 2006 Grzegorz Kowal
45
+ */
46
+ public class MessagesFormImpl extends MessagesForm {
47
+
48
+ public MessagesFormImpl(Bindings bindings) {
49
+ Msg m = new Msg();
50
+ bindings.addOptComponent("messages", Msg.class, _messagesCheck)
51
+ .add("messages.startupErr", _startupErrTextArea, m.getStartupErr())
52
+ .add("messages.bundledJreErr", _bundledJreErrTextArea, m.getBundledJreErr())
53
+ .add("messages.jreVersionErr", _jreVersionErrTextArea, m.getJreVersionErr())
54
+ .add("messages.launcherErr", _launcherErrTextArea, m.getLauncherErr())
55
+ .add("messages.instanceAlreadyExistsMsg", _instanceAlreadyExistsMsgTextArea,
56
+ m.getInstanceAlreadyExistsMsg());
57
+ }
58
+ }
@@ -0,0 +1,54 @@
1
+ /*
2
+ Launch4j (http://launch4j.sourceforge.net/)
3
+ Cross-platform Java application wrapper for creating Windows native executables.
4
+
5
+ Copyright (c) 2004, 2007 Grzegorz Kowal
6
+
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without modification,
10
+ are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice,
13
+ this list of conditions and the following disclaimer.
14
+ * Redistributions in binary form must reproduce the above copyright notice,
15
+ this list of conditions and the following disclaimer in the documentation
16
+ and/or other materials provided with the distribution.
17
+ * Neither the name of the Launch4j nor the names of its contributors
18
+ may be used to endorse or promote products derived from this software without
19
+ specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+ */
33
+
34
+ /**
35
+ * Created on 2007-09-22
36
+ */
37
+ package net.sf.launch4j.formimpl;
38
+
39
+ import net.sf.launch4j.binding.Bindings;
40
+ import net.sf.launch4j.config.SingleInstance;
41
+ import net.sf.launch4j.form.SingleInstanceForm;
42
+
43
+ /**
44
+ * @author Copyright (C) 2007 Grzegorz Kowal
45
+ */
46
+ public class SingleInstanceFormImpl extends SingleInstanceForm {
47
+
48
+ public SingleInstanceFormImpl(Bindings bindings) {
49
+ bindings.addOptComponent("singleInstance", SingleInstance.class,
50
+ _singleInstanceCheck)
51
+ .add("singleInstance.mutexName", _mutexNameField)
52
+ .add("singleInstance.windowTitle", _windowTitleField);
53
+ }
54
+ }