New parameter for gs:init

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

New parameter for gs:init

Post by HPW »

For the early hidden loading of java I would suggest a third parameter in gs:init

Code: Select all

(define (init portIn host javafirst)
	(if (not portIn) (set 'portIn 47011))
	(if (not host) (set 'host "localhost"))

	; check for server portIn and if this was started by java
	; note: when this was started from inside the new console 
	; starting a GUI script in the console then main-args
	; will contain ("newlisp" "-c" "-p" "64003"). But the
	; following lines will still work because the int conversion
	; doesn't fail on "-p" but takes the portIn as default
	(if (main-args 2) (set 'portIn (int (main-args 2) portIn)))
	(if (and(not (= (main-args 3) "javastart"))(not javafirst))
		(process (string "java -jar " server-path " " portIn))
	)
...
...
So when the third parameter javafirst is true is will use the running java.
Hans-Peter

Locked