[sip-comm-dev] [PATCH] Multiple .sip-communicator directories lead to account loss on Mac OS X


#1

I first reported the issue at
https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=427 so
please refer to it for details. In summary, accounts registered during
the first run of SIP Communicator on Mac OS X will not be loaded on
subsequent runs because it looks for different configuration
directories.

The attached patch attempts the following:

- Modifies the SIP Communicator launcher to use ~/Library/Application
Support/SIP Communicator on Mac OS X not only on the first run but
also on subsequent runs. The directory ~/.sip-communicator isn't
created. Of course, if ~/.sip-communicator already exists, it's picked
up and ~/Libarary/Application Support/SIP Communicator isn't created
in order to allow compatibility with earlier releases of the
application. Thus the account loss described in the bug report is
prevented.

- Does the same thing on Windows with the only difference that the
used directory is %APPDATA%\SIP Communicator (obviously,
~/Library/Application Support is specific to Mac OS X) because
%APPDATA% is the standard directory for application data. While the
change isn't considered important on pre-Vista Windows because the
user hardly ever visits %USERPROFILE% (i.e. ${user.home} in Ant), I
think it's good to follow the OS conventions. Anyway, the change is
relatively important on Windows Vista because the home directory which
Windows Explorer opens for the user is exactly %USERPROFILE% (which
has a Mac OS X-like layout) and the .sip-communicator directory
created by SIP Communicator is always visible.

- Builds sc-launcher.jar during "ant rebuild" in a fashion similar to
the other bundles in order to make it easy to modify the launcher and
build it afterwords. The bundle in question is specifically built for
1.4 compatibility. And it's placed next to the other bundles in
sc-bundles instead of lib. Please note that the currently existing
lib\sc-launcher.jar should be deleted from the repository if this
patch is accepted.

The attached run.rename2exe should be renamed to run.exe and should be
placed in resources\install\windows. It's rebuilt from the modified
run.exe.jsmooth because it contains a reference to lib\sc-launcher.jar
(which should no longer exist if this patch is accepted).

Best regards,
Lubo

sc-launcher.patch (12.3 KB)

run.rename2exe (601 KB)


#2

Hey Lubo,

Just tested it and it works great. It appears that the problems that I
mentioned in our offline discussions were related to the server that I
was testing with.

Applied, committed and ack-ed.

Thanks!
Emil

Lubomir Marinov написа:

···

I first reported the issue at
https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=427 so
please refer to it for details. In summary, accounts registered during
the first run of SIP Communicator on Mac OS X will not be loaded on
subsequent runs because it looks for different configuration
directories.

The attached patch attempts the following:

- Modifies the SIP Communicator launcher to use ~/Library/Application
Support/SIP Communicator on Mac OS X not only on the first run but
also on subsequent runs. The directory ~/.sip-communicator isn't
created. Of course, if ~/.sip-communicator already exists, it's picked
up and ~/Libarary/Application Support/SIP Communicator isn't created
in order to allow compatibility with earlier releases of the
application. Thus the account loss described in the bug report is
prevented.

- Does the same thing on Windows with the only difference that the
used directory is %APPDATA%\SIP Communicator (obviously,
~/Library/Application Support is specific to Mac OS X) because
%APPDATA% is the standard directory for application data. While the
change isn't considered important on pre-Vista Windows because the
user hardly ever visits %USERPROFILE% (i.e. ${user.home} in Ant), I
think it's good to follow the OS conventions. Anyway, the change is
relatively important on Windows Vista because the home directory which
Windows Explorer opens for the user is exactly %USERPROFILE% (which
has a Mac OS X-like layout) and the .sip-communicator directory
created by SIP Communicator is always visible.

- Builds sc-launcher.jar during "ant rebuild" in a fashion similar to
the other bundles in order to make it easy to modify the launcher and
build it afterwords. The bundle in question is specifically built for
1.4 compatibility. And it's placed next to the other bundles in
sc-bundles instead of lib. Please note that the currently existing
lib\sc-launcher.jar should be deleted from the repository if this
patch is accepted.

The attached run.rename2exe should be renamed to run.exe and should be
placed in resources\install\windows. It's rebuilt from the modified
run.exe.jsmooth because it contains a reference to lib\sc-launcher.jar
(which should no longer exist if this patch is accepted).

Best regards,
Lubo

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Oops, that reply was of course about your call hold patch. I haven't
been looking into this one yet.

Emil Ivov написа:

···

Hey Lubo,

Just tested it and it works great. It appears that the problems that I
mentioned in our offline discussions were related to the server that I
was testing with.

Applied, committed and ack-ed.

Thanks!
Emil

Lubomir Marinov написа:

I first reported the issue at
https://sip-communicator.dev.java.net/issues/show_bug.cgi?id=427 so
please refer to it for details. In summary, accounts registered during
the first run of SIP Communicator on Mac OS X will not be loaded on
subsequent runs because it looks for different configuration
directories.

The attached patch attempts the following:

- Modifies the SIP Communicator launcher to use ~/Library/Application
Support/SIP Communicator on Mac OS X not only on the first run but
also on subsequent runs. The directory ~/.sip-communicator isn't
created. Of course, if ~/.sip-communicator already exists, it's picked
up and ~/Libarary/Application Support/SIP Communicator isn't created
in order to allow compatibility with earlier releases of the
application. Thus the account loss described in the bug report is
prevented.

- Does the same thing on Windows with the only difference that the
used directory is %APPDATA%\SIP Communicator (obviously,
~/Library/Application Support is specific to Mac OS X) because
%APPDATA% is the standard directory for application data. While the
change isn't considered important on pre-Vista Windows because the
user hardly ever visits %USERPROFILE% (i.e. ${user.home} in Ant), I
think it's good to follow the OS conventions. Anyway, the change is
relatively important on Windows Vista because the home directory which
Windows Explorer opens for the user is exactly %USERPROFILE% (which
has a Mac OS X-like layout) and the .sip-communicator directory
created by SIP Communicator is always visible.

- Builds sc-launcher.jar during "ant rebuild" in a fashion similar to
the other bundles in order to make it easy to modify the launcher and
build it afterwords. The bundle in question is specifically built for
1.4 compatibility. And it's placed next to the other bundles in
sc-bundles instead of lib. Please note that the currently existing
lib\sc-launcher.jar should be deleted from the repository if this
patch is accepted.

The attached run.rename2exe should be renamed to run.exe and should be
placed in resources\install\windows. It's rebuilt from the modified
run.exe.jsmooth because it contains a reference to lib\sc-launcher.jar
(which should no longer exist if this patch is accepted).

Best regards,
Lubo

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net