Moving folder for storing config on MacOS to user.home/Library......

cusax-fix
Damian Minkov 18 years ago
parent 2c111b0a89
commit 2fa4239487

@ -127,8 +127,8 @@ felix.auto.start.60= \
# file:lib/bundle/architectureviewer1.1.jar
#Specify the directory where oscar should deploy its bundles
felix.cache.profiledir=sip-communicator.bin
#felix.cache.profiledir=${user.home}/.sip-communicator/profiledir
#felix.cache.profiledir=sip-communicator.bin
felix.cache.profiledir=${user.home}/.sip-communicator/sip-communicator.bin
felix.startlevel.framework=100
felix.startlevel.bundle=100

Binary file not shown.

@ -352,6 +352,10 @@
<replace file="${macosx.resrc.dir}/felix.client.run.properties"
token="org.osgi.framework.system.packages="
value="org.osgi.framework.system.packages= com.growl;"/>
<replaceregexp file="${macosx.resrc.dir}/felix.client.run.properties"
match="^felix.cache.profiledir=\$\{user.home\}/.sip-communicator/sip-communicator.bin"
replace="felix.cache.profiledir=${user.home}/Library/Application Support/${application.name}/sip-communicator.bin"
flags="m"/>
<echo file="${macosx.resrc.dir}/felix.client.run.properties"
append="true">felix.auto.start.70= reference:file:sc-bundles/growlnotification.jar
</echo>
@ -398,6 +402,11 @@
<javaproperty name="java.library.path"
value="$JAVAROOT/lib/native/mac:${system.DYLD_LIBRARY_PATH}"/>
<javaproperty name="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
value="${user.home}/Library/Application Support"/>
<javaproperty name="net.java.sip.communicator.SC_HOME_DIR_NAME"
value="${application.name}"/>
<!-- Tell felix to run sip-communicator -->
<javaproperty name="felix.config.properties"
value="file:felix.client.run.properties"/>

@ -7,6 +7,7 @@
package net.java.sip.communicator.launcher;
import java.awt.*;
import java.io.*;
import org.apache.felix.main.*;
@ -29,6 +30,31 @@ public static void main(String[] args)
String vmVendor = System.getProperty("java.vendor");
String osName = System.getProperty("os.name");
/**
* Check whether default config folder exists.
* If it exists we use it. Otherwise use the settings coming
* from system properties.
* This is done cause moving the config folder and preventing
* not using existing data for users already using default folder.
*/
if (osName.startsWith("Mac"))
{
String scDefultDirName = ".sip-communicator";
String defaultAppDirName =
System.getProperty("user.home") +
File.separator +
scDefultDirName;
if(new File(defaultAppDirName).exists())
{
System.setProperty("net.java.sip.communicator.SC_HOME_DIR_LOCATION",
System.getProperty("user.home"));
System.setProperty("net.java.sip.communicator.SC_HOME_DIR_NAME",
scDefultDirName);
}
}
if (version.startsWith("1.4") || vmVendor.startsWith("Gnu"))
{
String os = "";

Loading…
Cancel
Save