[Title] changed name of jni header & etc
authorgiwoong.kim <giwoong.kim@samsung.com>
Fri, 27 Jul 2012 08:46:42 +0000 (17:46 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Fri, 27 Jul 2012 08:46:42 +0000 (17:46 +0900)
[Type] feature
[Module] Emulator / jni
[Priority] major
[Jira#]
[Redmine#]
[Problem]
[Cause] support mac
[Solution]
[TestCase]

tizen/src/Makefile
tizen/src/skin/client/build.xml
tizen/src/skin/client/native_src/Share.c
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkinMain.java

index 0efc48e..f43b5ef 100755 (executable)
@@ -81,6 +81,7 @@ else
        cp -pPR ../../pc-bios/pxe-virtio.rom $(EMUL_DIR)/data/bios
        cp skin/client/lib/swt.jar $(EMUL_DIR)/bin/swt.jar
        cp -pPR skin/client/skins $(EMUL_DIR)
+       cp -pPR skin/client/native_src/libshare.dylib $(EMUL_DIR)/bin
 endif
 
 # for dibs system...
@@ -116,4 +117,5 @@ else
        cp -pPR ../../pc-bios/pxe-rtl8139.rom $(EMUL_DIR)/data/bios
        cp -pPR ../../pc-bios/pxe-virtio.rom $(EMUL_DIR)/data/bios
        cp -pPR skin/client/skins $(EMUL_DIR)
+       cp -pPR skin/client/native_src/libshare.dylib $(EMUL_DIR)/bin
 endif
index 8344cc7..e6846ef 100644 (file)
@@ -79,7 +79,7 @@
        <target name="create-native-linux" if="isLinux" unless="isMac">
                <echo message="create native shared library on linux..." />
                <javah classpath="build;lib/swt.jar" destdir="native_src">
-                       <class name="org.tizen.emulator.skin.EmulatorSkin" />
+                       <class name="org.tizen.emulator.skin.EmulatorShmSkin" />
                </javah>
                <exec dir="native_src" executable="gcc" failifexecutionfails="false">
                        <arg line="-shared" />
        <target name="create-native-mac" if="isMac">
                <echo message="create native shared library on mac..." />
                <javah classpath="build;lib/swt.jar" destdir="native_src">
-                       <class name="org.tizen.emulator.skin.EmulatorSkin" />
+                       <class name="org.tizen.emulator.skin.EmulatorShmSkin" />
                </javah>
                <exec dir="native_src" executable="gcc" failifexecutionfails="false">
                        <arg line="-dynamiclib" />
-                       <arg line="-c" />
                        <arg line="Share.c" />
                        <arg line="-o" />
                        <arg line="libshare.dylib" />
-                       <arg line="-I${env.JAVA_HOME}/Headers" />
+                       <arg line="-I${env.JAVA_HOME}/../Headers" />
                        <arg line="-fPIC" />
                </exec>
                <delete>
index 20a03e9..ac1d15e 100644 (file)
@@ -5,14 +5,14 @@
 #include <sys/types.h>
 #include <sys/ipc.h>
 #include <sys/shm.h>
-#include "org_tizen_emulator_skin_EmulatorSkin.h"
+#include "org_tizen_emulator_skin_EmulatorShmSkin.h"
 
 
 void *shared_memory = (void *)0;
 int shmid;
 
 
-JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_shmget
+JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorShmSkin_shmget
   (JNIEnv *env, jobject obj, jint vga_ram_size)
 {
     int mykey = getuid();
@@ -33,7 +33,7 @@ JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_shmget
     return 0;
 }
 
-JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_shmdt
+JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorShmSkin_shmdt
   (JNIEnv *env, jobject obj)
 {
     /* Lastly, the shared memory is detached */
@@ -44,7 +44,7 @@ JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_shmdt
     return 0;
 }
 
-JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorSkin_getPixels
+JNIEXPORT jint JNICALL Java_org_tizen_emulator_skin_EmulatorShmSkin_getPixels
   (JNIEnv *env, jobject obj, jintArray array)
 {
     int i = 0;
index b937e85..12ef426 100644 (file)
@@ -73,7 +73,7 @@ public class EmulatorSkinMain {
        static {
                /* shared memory */
                if (SwtUtil.isMacPlatform()) {
-                   System.loadLibrary("shared");
+                   System.loadLibrary("share");
                }
         }