📄 build.sh
字号:
#!/bin/sh#@echo off# Copyright 2003, 2004, Intel Corporation. All rights reserved.end(){ echo pasue.... exit 0}noJavaHome(){ echo . echo Warning: echo The build fails because JAVA_HOME could not be found. echo You will need to set the JAVA_HOME environment variable echo to the installation directory of java. end}noIntelMobileDLL(){ echo . echo Warning: echo Can\'t find libIntelMobile.so echo because the file does not exist. end}noIntelMobileLoggerDLL(){ echo. echo Warning: echo Can\'t find libIntelMobileLogger.so echo because the file does not exist. end}noIntelMobileJNIDLL(){ echo. echo Warning: echo Can\'t find libIntelMobileJNI.so echo because the file does not exist. end}checkJavaHome (){ if [ -z "$JAVA_HOME" ] then noJavaHome fi if ! [ -f "$JAVA_HOME"/bin/javac ] then noJavaHome echo no javac fi if ! [ -f "$JAVA_HOME/bin/jar" ] then noJavaHome echo no jar fi}defineJavaHome (){ if [ -d "/usr/java/j2sdk1.4.2_08" ] then set JAVA_HOME= /usr/java/j2sdk1.4.2_08 else echo please define JAVA_HOME first..... # goto defineJavaHome2 exit 0 fi checkJavaHome}if [ -z $JAVA_HOME ]; then defineJavaHomefi checkJavaHome#defineJavaHome2:#rem if not exist "C:/j2sdk1.4.1_02" goto defineJavaHome3#rem set JAVA_HOME=C:/j2sdk1.4.1_02#rem goto checkJavaHomecd ..if [ -d classes ]; then echo "classes is ok"else mkdir classesficd srcecho .echo Compiling the java source files to class files ..."$JAVA_HOME"/bin/javac -d ../classes *.java com/intel/mobile/base/*.java com/intel/mobile/processor/*.java com/intel/mobile/battery/*.java com/intel/mobile/network/*.java com/intel/mobile/context/*.java com/intel/mobile/platform/*.java com/intel/mobile/threshold/*.java com/intel/mobile/storage/*.java com/intel/mobile/display/*.java echo Done.cd ../classesecho .echo Packing up the class files into .jar files ...#"$JAVA_HOME"/bin/jar cf ../bin/IntelMobile.jar com/intel/mobile"$JAVA_HOME"/bin/jar cf ../bin/IntelMobile.jar com/intel/mobile/base com/intel/mobile/threshold"$JAVA_HOME"/bin/jar cf ../bin/IMBattery.jar com/intel/mobile/battery"$JAVA_HOME"/bin/jar cf ../bin/IMContext.jar com/intel/mobile/context"$JAVA_HOME"/bin/jar cf ../bin/IMNetwork.jar com/intel/mobile/network"$JAVA_HOME"/bin/jar cf ../bin/IMPlatform.jar com/intel/mobile/platform"$JAVA_HOME"/bin/jar cf ../bin/IMProcessor.jar com/intel/mobile/processor"$JAVA_HOME"/bin/jar cf ../bin/IMStorage.jar com/intel/mobile/storage"$JAVA_HOME"/bin/jar cf ../bin/IMDisplay.jar com/intel/mobile/display#"$JAVA_HOME"/bin/jar cf ../bin/IMBluetooth.jar com/intel/mobile/bluetooth"$JAVA_HOME"/bin/jar cmf ../bin/Mainfest.txt ../bin/ConsoleTest.jar *.classecho Done.#rem echo.#rem echo Copying jar files to delivery directory ...#rem if NOT EXIST "../../../../Docs/internal\release\delivery\java" mkdir "..\..\..\..\Docs\internal\release\delivery\java"#rem copy "../bin/IntelMobile.jar" "../../../..\Docs\internal\release\delivery\java"#rem if NOT EXIST "../../../../Docs/internal\release\delivery\bin" mkdir "..\..\..\..\Docs\internal\release\delivery\bin"#rem copy "../bin/ConsoleTest.jar" "../../../..\Docs\internal\release\delivery\bin"#rem copy "../bin/ConsoleTestJava.bat" "../../../..\Docs\internal\release\delivery\bin"#rem if NOT EXIST "../../../../Docs/internal\release\delivery\Samples\Java" mkdir "..\..\..\..\Docs\internal\release\delivery\Samples\Java"#rem xcopy "../Samples/*.java" "../../../..\Docs\internal\release\delivery\Samples\Java" /s /y#rem echo Done.cd ../bin#add by fbiecho "**************************************************************************************************"echo "******* Check library (But not be implemented now....only need you compile by hand firstly)*******"echo "******* Before run java binding, Please make sure you have compile IntelMobile SDK *******"echo "******* Make sure you have export LD_LIBRARY_PATH. *******"echo "******* (eg: export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$ADAPTON_ROOT/Framework/lib) *******"echo "**************************************************************************************************"#echo .#echo Copying IntelMobileErrorInfo.property ...#copy ../../../Framework/bin/IntelMobileErrorInfo.property#if not exist "../../../Framework/bin/IntelMobile.dll" ( \# if not exist "../../../Framework/bin/IntelMobile_d.dll" goto noIntelMobileDLL \#)#echo.#if exist "../../../Framework/bin/IntelMobile.dll" (#echo Copying IntelMobile.dll ...#copy ../../../Framework/bin/IntelMobile.dll#)#if exist "../../../Framework/bin/IntelMobile_d.dll" (#echo Copying IntelMobile_d.dll ...#copy ../../../Framework/bin/IntelMobile_d.dll#)#if not exist "../../../Framework/bin/IntelMobileLogger.dll" goto noIntelMobileLoggerDLL#echo.#echo Copying IntelMobileLogger.dll ...#copy ../../../Framework/bin/IntelMobileLogger.dll#rem if not exist "../IntelMobileJNI/Debug/IntelMobileJNI.dll" goto noIntelMobileJNIDLL#rem echo.#rem echo Copying IntelMobileJNI.dll ...#rem copy ../IntelMobileJNI/Debug/IntelMobileJNI.dll#goto end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -