source: release-kits/shared/launch4j/src/net/sf/launch4j/Main.java@ 15024

Last change on this file since 15024 was 15024, checked in by oranfry, 16 years ago

putting launch4j in the shared area

File size: 2.3 KB
Line 
1/*
2 Launch4j (http://launch4j.sourceforge.net/)
3 Cross-platform Java application wrapper for creating Windows native executables.
4
5 Copyright (C) 2004, 2006 Grzegorz Kowal
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21
22/*
23 * Created on Apr 21, 2005
24 */
25package net.sf.launch4j;
26
27import java.io.File;
28
29import net.sf.launch4j.config.ConfigPersister;
30import net.sf.launch4j.config.ConfigPersisterException;
31import net.sf.launch4j.formimpl.MainFrame;
32
33/**
34 * @author Copyright (C) 2005 Grzegorz Kowal
35 */
36public class Main {
37
38 public static final String PROGRAM_NAME = "Launch4j 2.1.5";
39 public static final String PROGRAM_DESCRIPTION = PROGRAM_NAME +
40 " (http://launch4j.sourceforge.net/)\n" +
41 "Cross-platform Java application wrapper for creating Windows native executables.\n\n" +
42 "Copyright (C) 2004, 2006 Grzegorz Kowal\n\n" +
43 "Launch4j comes with ABSOLUTELY NO WARRANTY.\n" +
44 "This is free software, licensed under the GNU General Public License.\n" +
45 "This product includes software developed by the Apache Software Foundation (http://www.apache.org/).\n\n";
46
47 public static void main(String[] args) {
48 try {
49 if (args.length == 0) {
50 ConfigPersister.getInstance().createBlank();
51 MainFrame.createInstance();
52 } else if (args.length == 1 && !args[0].startsWith("-")) {
53 ConfigPersister.getInstance().load(new File(args[0]));
54 Builder b = new Builder(Log.getConsoleLog());
55 b.build();
56 } else {
57 System.out.println(PROGRAM_DESCRIPTION
58 + Messages.getString("Main.usage")
59 + ": launch4j config.xml");
60 }
61 } catch (ConfigPersisterException e) {
62 Log.getConsoleLog().append(e.getMessage());
63 } catch (BuilderException e) {
64 Log.getConsoleLog().append(e.getMessage());
65 }
66 }
67}
Note: See TracBrowser for help on using the repository browser.