summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addon/YaCy.app/Contents/Info.plist2
-rwxr-xr-xaddon/YaCy.app/Contents/MacOS/startYACYMacOS.sh8
-rw-r--r--build.xml3
-rwxr-xr-xstartYACY.sh17
4 files changed, 26 insertions, 4 deletions
diff --git a/addon/YaCy.app/Contents/Info.plist b/addon/YaCy.app/Contents/Info.plist
index 69804aa9f..5f772f193 100644
--- a/addon/YaCy.app/Contents/Info.plist
+++ b/addon/YaCy.app/Contents/Info.plist
@@ -19,7 +19,7 @@
<key>CFBundleAllowMixedLocalizations</key>
<string>true</string>
<key>CFBundleExecutable</key>
-<string>startYACY.sh</string>
+<string>startYACYMacOS.sh</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>
diff --git a/addon/YaCy.app/Contents/MacOS/startYACYMacOS.sh b/addon/YaCy.app/Contents/MacOS/startYACYMacOS.sh
new file mode 100755
index 000000000..456ddea4e
--- /dev/null
+++ b/addon/YaCy.app/Contents/MacOS/startYACYMacOS.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env sh
+
+# Launcher for YaCy in a MacOS bundle :
+# rely on the generic startYACY.sh, but specifies the user home relative path for YaCy data
+# This data directory is set in conforming to OS X File System Programming Guide
+# see : https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html
+
+"`dirname $0`"/startYACY.sh -startup "'Library/Application Support/net.yacy.YaCy'"
diff --git a/build.xml b/build.xml
index 879296ef4..14acd7b66 100644
--- a/build.xml
+++ b/build.xml
@@ -764,7 +764,8 @@
</copy>
<copy file="${addon}/YaCy.app/Contents/Info.plist" tofile="${release_mac}/YaCy.app/Contents/Info.plist" filtering="true" overwrite="true" />
<move file="${release_main}" tofile="${release_mac}/YaCy.app/Contents/MacOS" verbose="false" />
- <!-- startYACY.sh will be the main entry point : we set permissions to make it an executable file -->
+ <!-- startYACY.sh and startYACYMacOS.sh will be the main entry points : we set permissions to make it executable files -->
+ <chmod file="${release_mac}/YaCy.app/Contents/MacOS/startYACYMacOS.sh" perm="755"/>
<chmod file="${release_mac}/YaCy.app/Contents/MacOS/startYACY.sh" perm="755"/>
<exec executable="hdiutil">
<arg line="create -srcfolder ${release_mac}/YaCy.app ${release}/yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.dmg"/>
diff --git a/startYACY.sh b/startYACY.sh
index 8763b9086..567cc5e89 100755
--- a/startYACY.sh
+++ b/startYACY.sh
@@ -40,6 +40,7 @@ Options
-l, --logging save the output of YaCy to yacy.log
-d, --debug show the output of YaCy on the console
-p, --print-out only print the command, which would be executed to start YaCy
+ -start, -startup [data-path] start YaCy using the specified data folder path, relative to the current user home
-g, --gui start a gui for YaCy
USAGE
}
@@ -101,6 +102,10 @@ for option in $options;do
-t|--tail-log)
TAILLOG=1
;;
+ -start|-startup)
+ STARTUP=1
+ isparameter=1
+ ;;
-g|--gui)
GUI=1
isparameter=1
@@ -111,7 +116,11 @@ for option in $options;do
isparameter=1;
continue
else
- parameter="$parameter $option"
+ if [ $parameter ];then
+ parameter="$parameter $option"
+ else
+ parameter="$option"
+ fi
fi
fi #parameter or option?
done
@@ -189,7 +198,11 @@ for N in lib/*.jar; do CLASSPATH="$CLASSPATH$N:"; done
CLASSPATH=".:$CLASSPATH"
cmdline="$JAVA $JAVA_ARGS -classpath $CLASSPATH net.yacy.yacy";
-if [ $GUI -eq 1 ] #gui
+
+if [ $STARTUP -eq 1 ] #startup
+then
+ cmdline="$cmdline -startup $parameter"
+elif [ $GUI -eq 1 ] #gui
then
cmdline="$cmdline -gui $parameter"
fi