Fixes loading sparkle library.

cusax-fix
Damian Minkov 15 years ago
parent af636cf336
commit d4e1dd8a52

@ -742,12 +742,17 @@
</cc>
</target>
<!-- compile sparkle library for Mac OS X (32-bit/64-bit/ppc) -->
<!-- compile sparkle library for Mac OS X (32-bit/64-bit/ppc)
make sure you do export MACOSX_DEPLOYMENT_TARGET=10.5
and also:
install_name_tool -change "@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" "@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" libsparkle_init.dylib
-->
<target name="sparkle" description="Build sparkle shared library for Mac OS X" if="is.running.macos"
depends="init-native">
<cc outtype="shared" name="gcc" outfile="${native_install_dir}/sparkle_init" objdir="${obj}">
<compilerarg value="-Wall" />
<compilerarg value="-O2" />
<compilerarg value="-mmacosx-version-min=10.5" if="is.running.macos"/>
<compilerarg value="-arch" />
<compilerarg value="x86_64" />
<compilerarg value="-arch" />

@ -1,11 +1,12 @@
# Author: Romain KUNTZ
# Requires the Sparkle.framework installed in /Library/Frameworks
# The Framework is available at http://sparkle.andymatuschak.org/
# export MACOSX_DEPLOYMENT_TARGET=10.5
CC=gcc -arch x86_64 -arch i386 -arch ppc
CC=gcc -arch x86_64 -arch i386 -arch ppc -mmacosx-version-min=10.5
TARGET=libsparkle_init.dylib
JNI_INCLUDE_PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers/
CFLAGS=-I$(JNI_INCLUDE_PATH)
CFLAGS=-I$(JNI_INCLUDE_PATH) -I/System/Library/Frameworks/Sparkle.framework/Versions/A/Headers/
LIBS=-framework AppKit -framework Foundation -framework Sparkle
OBJS=net_java_sip_communicator_impl_sparkle_SparkleActivator.o
@ -19,5 +20,5 @@ install:$(TARGET)
libsparkle_init.dylib:$(OBJS)
$(CC) -dynamiclib -o $(TARGET) $(LIBS) $(CFLAGS) $<
install_name_tool -change "@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" "@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" libsparkle_init.dylib
install_name_tool -change "@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" "@executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle" libsparkle_init.dylib

@ -73,8 +73,8 @@ Java_net_java_sip_communicator_impl_sparkle_SparkleActivator_initSparkle
else
{
const char* menuTitleChars =
(*env)->GetStringUTFChars(env, menuItemTitle, 0);
menuTitle = [NSString stringWithCString: menuTitleChars length: strlen(menuTitleChars)];
(const char *)(*env)->GetStringUTFChars(env, menuItemTitle, 0);
menuTitle = [NSString stringWithUTF8String: menuTitleChars];
}
NSMenu* menu = [[NSApplication sharedApplication] mainMenu];

Loading…
Cancel
Save