Fix do not include any svg files in resources. Change home dir setting or choosing behaviour. Move the place copying default resources to file for default language.

cusax-fix
Damian Minkov 17 years ago
parent d14e2b7d08
commit 906596471e

@ -325,10 +325,6 @@
dest="${resources}/languages"
encoding="UTF-8"
includes="**/*.properties"/>
<!-- Copy the default resources to english one, as our defualt
language is English and without the resource we cannot excplictly set it.-->
<copy file="${sc.basedir}/resources/languages/resources.properties"
tofile="${resources}/languages/resources_en.properties"/>
</target>
<!-- JAVADOC -->
@ -1865,6 +1861,10 @@ javax.swing.event, javax.swing.border"/>
<!--BUNDLE-DEFAULT-RESOURCES-->
<target name="bundle-resources-defaultpack">
<!-- Copy the default resources to english one, as our defualt
language is English and without the resource we cannot excplictly set it.-->
<copy file="${sc.basedir}/resources/languages/resources.properties"
tofile="${resources}/languages/resources_en.properties"/>
<!-- Creates a bundle for the default resource pack."-->
<jar
compress="false" destfile="${bundles.dest}/defaultresources.jar"
@ -1877,7 +1877,7 @@ javax.swing.event, javax.swing.border"/>
<zipfileset dir="${resources}/config"
prefix="resources/config"/>
<zipfileset dir="${resources}/images"
prefix="resources/images"/>
prefix="resources/images" excludes="**/*.svg"/>
<zipfileset dir="${resources}/languages"
prefix="resources/languages"/>
<zipfileset dir="${resources}/sounds"

@ -7,3 +7,4 @@ installer.welcome.wtext2=The homepage is at: http://sip-communicator.org/
installer.welcome.wtext3=
wix.product.id=ACD610AA-E7F1-4644-894D-D8A31894A241
wix.upgrade.code=B3854E66-BAE5-409F-B5EB-7649CB48F99A
#application.home.dirname=.sip-communicator

@ -44,6 +44,55 @@
classname="com.izforge.izpack.ant.IzPackTask"/>
</target>
<!-- if application.home.dirname is set we are going to change application
home directory so we will generate new exe file, so we must define
jmsooth task
-->
<target name="define-jsmooth-task" if="application.home.dirname">
<taskdef name="jsmoothgen"
classname="net.charabia.jsmoothgen.ant.JSmoothGen"
classpath="${inst.resrc}/windows/jsmoothgen-ant.jar"/>
</target>
<target name="windows-generate-exe" depends="define-jsmooth-task">
<copy file="${inst.resrc}/windows/run.exe.jsmooth"
tofile="${inst.resrc}/windows/tmp.run.exe.jsmooth"/>
<replace file="${inst.resrc}/windows/tmp.run.exe.jsmooth">
<replacetoken><![CDATA[<name>felix.config.properties</name>]]></replacetoken>
<replacevalue><![CDATA[<name>net.java.sip.communicator.SC_HOME_DIR_NAME</name>
<value>_APP_NAME_</value>
</javaProperties>
<javaProperties>
<name>felix.config.properties</name>]]></replacevalue>
</replace>
<replace file="${inst.resrc}/windows/tmp.run.exe.jsmooth"
token="_APP_NAME_" value="${application.name}"/>
<jsmoothgen project="${inst.resrc}/windows/run.exe.jsmooth"
skeletonroot="${inst.resrc}/windows/skeletons"/>
<delete file="${inst.resrc}/windows/tmp.run.exe.jsmooth"/>
</target>
<target name="-prepare-debian-sh"
depends="-prepare-debian-sh-copy,-prepare-debian-sh-homedir"/>
<target name="-prepare-debian-sh-copy">
<!-- Put correct version in the sip-communicator executable file -->
<copy file="${inst.resrc}/debian/sip-communicator.sh.tmpl"
tofile="${inst.resrc}/debian/sip-communicator.sh"
overwrite="true"/>
<replace file="${inst.resrc}/debian/sip-communicator.sh"
token="_SC_VERSION_"
value="${sip-communicator.version}"/>
</target>
<target name="-prepare-debian-sh-homedir" if="application.home.dirname">
<replace file="${inst.resrc}/debian/sip-communicator.sh"
token="net.java.sip.communicator.launcher.SIPCommunicator"
value="-Dnet.java.sip.communicator.SC_HOME_DIR_NAME=${application.home.dirname} net.java.sip.communicator.launcher.SIPCommunicator"/>
</target>
<!-- Put here the Windows release directory -->
<property name="windows.app.dir" value="${sc.basedir}/${release}/windows"/>
<!-- Put here the Linux release directory -->
@ -342,8 +391,7 @@
</target>
<target name="build-installation-wix"
depends="clean-install-windows,version">
depends="clean-install-windows,version,windows-generate-exe">
<!--
This versionupdate.properties file isn't of interest to the MSI but
is necessary for the site.
@ -683,6 +731,7 @@
<array>
<string>sip</string>
<string>feed</string>
<string>xmpp</string>
</array>
</dict>
</array>
@ -748,12 +797,12 @@
if="is.running.macos"
description="Create a .dmg package for MACOSX (only works on MACOSX)">
<propertyfile file="${macosx.app.dir}/versionupdate.properties"
<!--propertyfile file="${macosx.app.dir}/versionupdate.properties"
comment="Last Build Version">
<entry key="last_version" value="${sip-communicator.version}"/>
<entry key="download_link"
value="http://download.sip-communicator.org/nightly/macosx/${package.name}-${sip-communicator.version}.dmg"/>
</propertyfile>
</propertyfile-->
<property name="macosx.dmg.name"
value="${package.name}-${sip-communicator.version}.dmg"/>
@ -825,7 +874,7 @@
</target>
<!-- Create a Debian package - This needs dpkg utilities -->
<target name="deb" depends="version,dpkg-build-warning"
<target name="deb" depends="version,dpkg-build-warning,-prepare-debian-sh"
if="dpkg.build.present"
description="Create a .deb package for Debian (needs dpkg utilities)">
@ -867,14 +916,6 @@
token="_DATE_"
value="${date}"/>
<!-- Put correct version in the sip-communicator executable file -->
<copy file="${inst.resrc}/debian/sip-communicator.sh.tmpl"
tofile="${inst.resrc}/debian/sip-communicator.sh"
overwrite="true"/>
<replace file="${inst.resrc}/debian/sip-communicator.sh"
token="_SC_VERSION_"
value="${sip-communicator.version}"/>
<!-- Build i386 binary package -->
<exec executable="${dpkg-buildpackage}" dir="${inst.resrc}">
<arg value="-rfakeroot"/>

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<jsmoothskeleton>
<debug>false</debug>
<description>SKEL_AUTODOWNLOAD_PROPERTY_DESCRIPTION</description>
<executableName>autodownload.exe</executableName>
<resourceCategory>JAVA</resourceCategory>
<resourceJarId>102</resourceJarId>
<resourcePropsId>103</resourcePropsId>
<shortName>Autodownload Wrapper</shortName>
<skeletonProperties>
<description>SKEL_AUTODOWNLOAD_PROPERTY_MESSAGE_DESCRIPTION</description>
<idName>Message</idName>
<label>SKEL_AUTODOWNLOAD_PROPERTY_MESSAGE_LABEL</label>
<type>textarea</type>
<value>Java has not been found on your computer. Do you want to download it?</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_AUTODOWNLOAD_PROPERTY_DLURL_DESCRIPTION</description>
<idName>DownloadURL</idName>
<label>SKEL_AUTODOWNLOAD_PROPERTY_DLURL_LABEL</label>
<type>autodownloadurl</type>
<value>http://java.sun.com/update/1.5.0/jinstall-1_5_0_11-windows-i586.cab</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_PROPERTY_SINGLEPROCESS_DESCRIPTION</description>
<idName>SingleProcess</idName>
<label>SKEL_GENERIC_PROPERTY_SINGLEPROCESS_LABEL</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_SINGLEINSTANCE_DESCRIPTION</description>
<idName>SingleInstance</idName>
<label>SKEL_GENERIC_SINGLEINSTANCE</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_JNISMOOTH_DESCRIPTION</description>
<idName>JniSmooth</idName>
<label>SKEL_GENERIC_JNISMOOTH</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_PROPERTY_DEBUG_DESCRIPTION</description>
<idName>Debug</idName>
<label>SKEL_GENERIC_PROPERTY_DEBUG_LABEL</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
</jsmoothskeleton>

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<jsmoothskeleton>
<debug>false</debug>
<description>SKEL_CUSTOMDOWNLOAD_DESCRIPTION</description>
<executableName>autodownload.exe</executableName>
<resourceCategory>JAVA</resourceCategory>
<resourceJarId>102</resourceJarId>
<resourcePropsId>103</resourcePropsId>
<shortName>Custom Web Download Wrapper</shortName>
<skeletonProperties>
<description>SKEL_CUSTOMDOWNLOAD_PROPERTY_MESSAGE_DESCRIPTION</description>
<idName>Message</idName>
<label>SKEL_CUSTOMDOWNLOAD_PROPERTY_MESSAGE_LABEL</label>
<type>textarea</type>
<value>Java has not been found on your computer. Do you want to download it?</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_CUSTOMDOWNLOAD_PROPERTY_URL_DESCRIPTION</description>
<idName>DownloadURL</idName>
<label>SKEL_CUSTOMDOWNLOAD_PROPERTY_URL_LABEL</label>
<type>string</type>
<value>http://</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_PROPERTY_SINGLEPROCESS_DESCRIPTION</description>
<idName>SingleProcess</idName>
<label>SKEL_GENERIC_PROPERTY_SINGLEPROCESS_LABEL</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_SINGLEINSTANCE_DESCRIPTION</description>
<idName>SingleInstance</idName>
<label>SKEL_GENERIC_SINGLEINSTANCE</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_JNISMOOTH_DESCRIPTION</description>
<idName>JniSmooth</idName>
<label>SKEL_GENERIC_JNISMOOTH</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
<skeletonProperties>
<description>SKEL_GENERIC_PROPERTY_DEBUG_DESCRIPTION</description>
<idName>Debug</idName>
<label>SKEL_GENERIC_PROPERTY_DEBUG_LABEL</label>
<type>boolean</type>
<value>0</value>
</skeletonProperties>
</jsmoothskeleton>

@ -141,6 +141,8 @@ private static void setScHomeDir(String osName)
String location = System.getProperty(PNAME_SC_HOME_DIR_LOCATION);
String name = System.getProperty(PNAME_SC_HOME_DIR_NAME);
boolean isHomeDirnameForced = name != null;
if ((location == null) || (name == null))
{
String defaultLocation = System.getProperty("user.home");
@ -158,7 +160,6 @@ private static void setScHomeDir(String osName)
}
else if (osName.startsWith("Windows"))
{
/*
* Primarily important on Vista because Windows Explorer opens
* in %USERPROFILE% so .sip-communicator is always visible. But
@ -179,10 +180,12 @@ else if (osName.startsWith("Windows"))
/*
* As it was noted earlier, make sure we're compatible with previous
* releases.
* releases. If the home dir name is forced (set as system property)
* doesn't look for the default dir.
*/
if ((new File(location, name).isDirectory() == false)
&& new File(defaultLocation, defaultName).isDirectory())
if (!isHomeDirnameForced
&& (new File(location, name).isDirectory() == false)
&& new File(defaultLocation, defaultName).isDirectory())
{
location = defaultLocation;
name = defaultName;

Loading…
Cancel
Save