cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r429234 - in /incubator/cayenne/sandbox/nsis-test: .classpath .project CayenneModeler.ico cayenne-modeler.nsi jar/ jar/test.jar src/ src/test/ src/test/Main.java
Date Mon, 07 Aug 2006 03:31:26 GMT
Author: aadamchik
Date: Sun Aug  6 20:31:25 2006
New Revision: 429234

URL: http://svn.apache.org/viewvc?rev=429234&view=rev
Log:
checking Java launcher prototype using NSIS

Added:
    incubator/cayenne/sandbox/nsis-test/.classpath
    incubator/cayenne/sandbox/nsis-test/.project
    incubator/cayenne/sandbox/nsis-test/CayenneModeler.ico   (with props)
    incubator/cayenne/sandbox/nsis-test/cayenne-modeler.nsi
    incubator/cayenne/sandbox/nsis-test/jar/
    incubator/cayenne/sandbox/nsis-test/jar/test.jar   (with props)
    incubator/cayenne/sandbox/nsis-test/src/
    incubator/cayenne/sandbox/nsis-test/src/test/
    incubator/cayenne/sandbox/nsis-test/src/test/Main.java

Added: incubator/cayenne/sandbox/nsis-test/.classpath
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/nsis-test/.classpath?rev=429234&view=auto
==============================================================================
--- incubator/cayenne/sandbox/nsis-test/.classpath (added)
+++ incubator/cayenne/sandbox/nsis-test/.classpath Sun Aug  6 20:31:25 2006
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: incubator/cayenne/sandbox/nsis-test/.project
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/nsis-test/.project?rev=429234&view=auto
==============================================================================
--- incubator/cayenne/sandbox/nsis-test/.project (added)
+++ incubator/cayenne/sandbox/nsis-test/.project Sun Aug  6 20:31:25 2006
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>nsis-test</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: incubator/cayenne/sandbox/nsis-test/CayenneModeler.ico
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/nsis-test/CayenneModeler.ico?rev=429234&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/sandbox/nsis-test/CayenneModeler.ico
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/sandbox/nsis-test/cayenne-modeler.nsi
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/nsis-test/cayenne-modeler.nsi?rev=429234&view=auto
==============================================================================
--- incubator/cayenne/sandbox/nsis-test/cayenne-modeler.nsi (added)
+++ incubator/cayenne/sandbox/nsis-test/cayenne-modeler.nsi Sun Aug  6 20:31:25 2006
@@ -0,0 +1,63 @@
+; Java Launcher
+; per http://nsis.sourceforge.net/A_slightly_better_Java_Launcher
+;--------------
+ 
+;You want to change the next four lines
+Name "Cayenne Modeler"
+Caption "Cayenne Modeler"
+Icon "CayenneModeler.ico"
+OutFile "CayenneModelerTest.exe"
+ 
+SilentInstall silent
+AutoCloseWindow true
+ShowInstDetails nevershow
+ 
+;You want to change the next two lines too
+!define CLASSPATH ".;jar\test.jar"
+!define CLASS "test.Main"
+ 
+Section ""
+  Call GetJRE
+  Pop $R0
+ 
+  ; change for your purpose (-jar etc.)
+  StrCpy $0 '"$R0" -classpath "${CLASSPATH}" ${CLASS}'
+  
+ 
+  SetOutPath $EXEDIR
+  Exec $0
+SectionEnd
+ 
+Function GetJRE
+;
+;  Find JRE (javaw.exe)
+;  1 - in .\jre directory (JRE Installed with application)
+;  2 - in JAVA_HOME environment variable
+;  3 - in the registry
+;  4 - assume javaw.exe in current dir or PATH
+ 
+  Push $R0
+  Push $R1
+ 
+  ClearErrors
+  StrCpy $R0 "$EXEDIR\jre\bin\javaw.exe"
+  IfFileExists $R0 JreFound
+  StrCpy $R0 ""
+ 
+  ClearErrors
+  ReadEnvStr $R0 "JAVA_HOME"
+  StrCpy $R0 "$R0\bin\javaw.exe"
+  IfErrors 0 JreFound
+ 
+  ClearErrors
+  ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
+  ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
+  StrCpy $R0 "$R0\bin\javaw.exe"
+ 
+  IfErrors 0 JreFound
+  StrCpy $R0 "javaw.exe"
+        
+ JreFound:
+  Pop $R1
+  Exch $R0
+FunctionEnd
\ No newline at end of file

Added: incubator/cayenne/sandbox/nsis-test/jar/test.jar
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/nsis-test/jar/test.jar?rev=429234&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/cayenne/sandbox/nsis-test/jar/test.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/cayenne/sandbox/nsis-test/src/test/Main.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/nsis-test/src/test/Main.java?rev=429234&view=auto
==============================================================================
--- incubator/cayenne/sandbox/nsis-test/src/test/Main.java (added)
+++ incubator/cayenne/sandbox/nsis-test/src/test/Main.java Sun Aug  6 20:31:25 2006
@@ -0,0 +1,13 @@
+package test;
+
+import javax.swing.JFrame;
+import javax.swing.WindowConstants;
+
+public class Main {
+	public static void main(String[] args) {
+		JFrame frame = new JFrame();
+		frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+		frame.setSize(500, 400);
+		frame.setVisible(true);
+	}
+}



Mime
View raw message