Skip to content

Commit

Permalink
Fix javawrapper build scripts for Linux and Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
SaidFathelbab committed Oct 26, 2016
1 parent bc4c648 commit 3f779dd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
10 changes: 10 additions & 0 deletions javawrapper/build_all/linux/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@ echo compile javawrapper and samples
source ./javawrapper/build_all/linux/exportLibPath.sh

cd javawrapper/device/
mkdir ./samples/direct_call_of_wrapped_functions/target
cp ./../../c/cmake/iotsdk_linux/javawrapper/libiothub_client_java.so ./samples/direct_call_of_wrapped_functions/target

mkdir ./samples/send-receive-sample/target
cp ./../../c/cmake/iotsdk_linux/javawrapper/libiothub_client_java.so ./samples/send-receive-sample/target

mkdir ./samples/send-receive-sample-x509/target
cp ./../../c/cmake/iotsdk_linux/javawrapper/libiothub_client_java.so ./samples/send-receive-sample-x509/target

mkdir ./samples/send-event-sample/target
cp ./../../c/cmake/iotsdk_linux/javawrapper/libiothub_client_java.so ./samples/send-event-sample/target

mkdir ./samples/send-serialized-event/target
cp ./../../c/cmake/iotsdk_linux/javawrapper/libiothub_client_java.so ./samples/send-serialized-event/target

cp ./../../c/cmake/iotsdk_linux/javawrapper/libiothub_client_mock.so ./test

mvn install
Expand Down
12 changes: 6 additions & 6 deletions javawrapper/build_all/windows/build_client.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ set PATH=%PATH%;%userprofile%\cmake_%build-platform%\javawrapper\Debug

REM -- compile javawrapper --
cd ..\..\device
copy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\direct_call_of_wrapped_functions\target
copy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-receive-sample\target
copy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-receive-sample-x509\target
copy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-event-sample\target
copy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-serialized-event\target
copy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_mock.dll %cd%\test
xcopy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\direct_call_of_wrapped_functions\target\
xcopy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-receive-sample\target\
xcopy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-receive-sample-x509\target\
xcopy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-event-sample\target\
xcopy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_java.dll %cd%\samples\send-serialized-event\target\
xcopy %userprofile%\cmake_%build-platform%\javawrapper\Debug\iothub_client_mock.dll %cd%\test\

call mvn install
cd %build-root%
Expand Down
1 change: 0 additions & 1 deletion jenkins/linux_javawrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
build_root=$(cd "$(dirname "$0")/.." && pwd)

# -- Java Device Client --
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
cd $build_root/javawrapper/build_all/linux
./build.sh
[ $? -eq 0 ] || exit $?

0 comments on commit 3f779dd

Please sign in to comment.