Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom start-script for MacOS #146

Open
ywuliu opened this issue Dec 19, 2019 · 5 comments
Open

Custom start-script for MacOS #146

ywuliu opened this issue Dec 19, 2019 · 5 comments

Comments

@ywuliu
Copy link

ywuliu commented Dec 19, 2019

I am aware that Installation on Mac is not fully implement yet.
I have a little solution, I tried it in mac for http and local file, both works
it only support one instance at a time in this case

#!/bin/bash

##NEED CHANGED
jnlpFile=XXX
openWebStartRoot="/Applications/OpenWebStart"
##NEED CHANGED DONE

##start.sh location
scriptsDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

##logFile
logFile="${scriptsDir}/log.txt"

echo "start at `date`" > "$logFile"
echo "JNLP FILE is $jnlpFile" >> "$logFile"

tempJnlpFile="`echo ${jnlpFile}`"

STARTHTTP="${jnlpFile%%:*}"
echo "start with $STARTHTTP" >> "$logFile"

if [[ $STARTHTTP = "http" ]] || [[ $STARTHTTP = "https" ]]
then
 
  ff="${jnlpFile##*/}"
  echo "web case, file name is: $ff ">> "$logFile"
  tempJnlpFile="$scriptsDir/$ff"
  curl $jnlpFile > "$tempJnlpFile"
fi

echo "TEMP JNLP FILE $tempJnlpFile" >> "$logFile"

cd "$openWebStartRoot"
open -a "OpenWebStart javaws" "$tempJnlpFile"

ret=$?

echo "return from OpenWebStart javaws is: $ret"
@ywuliu
Copy link
Author

ywuliu commented Dec 19, 2019

start.sh.txt

@ywuliu
Copy link
Author

ywuliu commented Dec 19, 2019

Actually, it seems that when we use:

open -a "OpenWebStart javaws" "$tempJnlpFile"

it will call: PhaseTwoWebStartLauncher everything works.
If we use:

"/Applications/OpenWebStart/OpenWebStart javaws.app/Contents/MacOS/JavaApplicationStub" "launch.jnlp"

It will:
[MESSAGE_ALL][Thu Dec 19 16:44:27 EST 2019] Starting OpenWebStart MacLauncher 1.1.1
Then, it will fail.

This is why I used a lot of time to developer start.sh

My Mac's Current Java Version is: java 11

@ywuliu
Copy link
Author

ywuliu commented Dec 20, 2019

openWebStartRoot="/Applications/OpenWebStart"
cd "$openWebStartRoot"
can be removed

@hendrikebbers hendrikebbers changed the title start.sh in Mac does not work and solution --maybe Custom start-script for MacOS Dec 30, 2019
@janakmulani
Copy link
Contributor

Will be fixed in OWS 1.2.

@Jamila891
Copy link

@ywuliu new version 1.2.0 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants