diff --git a/.travis.yml b/.travis.yml index d0ca4015..bebc987d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,12 +62,12 @@ install: script: # Build Meshlite - git clone https://github.com/huxingyi/meshlite.git || travis_terminate 1 - - cd meshlite + - cd meshlite/ffi - cargo build --release - - cd ../ - - cp meshlite/include/meshlite.h thirdparty/meshlite/meshlite.h || travis_terminate 1 - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp meshlite/target/release/libmeshlite.dylib thirdparty/meshlite/libmeshlite.dylib || travis_terminate 1; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp meshlite/target/release/libmeshlite.so thirdparty/meshlite/libmeshlite.so || travis_terminate 1; fi + - cd ../../ + - cp meshlite/ffi/include/meshlite.h thirdparty/meshlite/meshlite.h || travis_terminate 1 + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp meshlite/ffi/target/release/libmeshlite_ffi.dylib thirdparty/meshlite/libmeshlite_ffi.dylib || travis_terminate 1; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp meshlite/ffi/target/release/libmeshlite_ffi.so thirdparty/meshlite/libmeshlite_ffi.so || travis_terminate 1; fi # Build Dust3D - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then qmake -config release || travis_terminate 1; fi diff --git a/appveyor.yml b/appveyor.yml index acf2a51a..67f29499 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,15 +6,15 @@ environment: # target: x86_64-pc-windows-msvc # qtdir: C:\Qt\5.10.1\msvc2015_64 # sysdirname: SysWOW64 - + - platform: x86 target: i686-pc-windows-msvc qtdir: C:\Qt\5.10.1\msvc2015 sysdirname: system32 - + cache: CGAL-4.11.1-Setup.exe -> appveyor.yml - + install: - if "%PLATFORM%" == "x86" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 @@ -34,19 +34,19 @@ install: cmake -G "Visual Studio 14 2015 Win64" ../ -DBOOST_INCLUDEDIR=C:\Libraries\boost_1_66_0 - msbuild /p:Configuration=Release ALL_BUILD.vcxproj - cd %APPVEYOR_BUILD_FOLDER% - + build: false test_script: - set PATH=%PATH%;%QTDIR%\bin - qmake "BOOST_INCLUDEDIR=C:\Libraries\boost_1_66_0" "CGAL_DIR=%APPVEYOR_BUILD_FOLDER%\CGAL-4.11.1" - nmake -f Makefile.Release - + after_test: # Check deps by Dependency Walker # Check Qt plugins by following https://wiki.qt.io/Deploy_an_Application_on_Windows - 7z a dust3d_unstable_%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\release\dust3d.exe - - 7z a dust3d_unstable_%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\thirdparty\meshlite\meshlite_unstable_vc14_%PLATFORM%\meshlite.dll + - 7z a dust3d_unstable_%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\thirdparty\meshlite\meshlite_unstable_vc14_%PLATFORM%\meshlite_ffi.dll - 7z a dust3d_unstable_%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\CGAL-4.11.1\build\bin\Release\CGAL-vc140-mt-4.11.1.dll - 7z a dust3d_unstable_%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\CGAL-4.11.1\auxiliary\gmp\lib\libgmp-10.dll - 7z a dust3d_unstable_%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\CGAL-4.11.1\auxiliary\gmp\lib\libmpfr-4.dll @@ -59,11 +59,11 @@ after_test: - mkdir platforms - copy %QTDIR%\plugins\platforms\qwindows.dll %APPVEYOR_BUILD_FOLDER%\platforms\qwindows.dll - 7z a dust3d_unstable_%PLATFORM%.zip -r %APPVEYOR_BUILD_FOLDER%\platforms\ - + artifacts: - path: '*.zip' name: platform_zips - + deploy: release: unstable description: 'Unstable release for test purpose only. The source code is attached when this release first created, and it is not get updated while the binary been replaced.' @@ -75,4 +75,4 @@ deploy: draft: false prerelease: false on: - branch: master # release from master branch only \ No newline at end of file + branch: master # release from master branch only diff --git a/docs/builds.rst b/docs/builds.rst index 3cf87c84..28481b5d 100644 --- a/docs/builds.rst +++ b/docs/builds.rst @@ -42,10 +42,10 @@ Here is the snapshot of the command line of one build, you may use different def $ cd /Users/jeremy/Desktop $ git clone https://github.com/huxingyi/meshlite.git - $ cd meshlite + $ cd meshlite/ffi $ cargo build --release $ cp include/meshlite.h /Users/jeremy/Repositories/dust3d/thirdparty/meshlite/meshlite.h - $ cp target/release/libmeshlite.dylib /Users/jeremy/Repositories/dust3d/thirdparty/meshlite/libmeshlite.dylib + $ cp target/release/libmeshlite_ffi.dylib /Users/jeremy/Repositories/dust3d/thirdparty/meshlite/libmeshlite_ffi.dylib $ cd /Users/jeremy/Repositories/dust3d $ qmake -spec macx-xcode @@ -83,10 +83,10 @@ Here is the snapshot of the command line of one build, you may use different def ;Compile the internal dependency $ cd ~/Desktop $ git clone https://github.com/huxingyi/meshlite.git - $ cd meshlite + $ cd meshlite/ffi $ cargo build --release - $ cp ~/Desktop/meshlite/include/meshlite.h ~/Documents/dust3d/thirdparty/meshlite/meshlite.h - $ cp ~/Desktop/meshlite/target/release/libmeshlite.so ~/Documents/dust3d/thirdparty/meshlite/libmeshlite.so + $ cp ~/Desktop/meshlite/ffi/include/meshlite.h ~/Documents/dust3d/thirdparty/meshlite/meshlite.h + $ cp ~/Desktop/meshlite/ffi/target/release/libmeshlite_ffi.so ~/Documents/dust3d/thirdparty/meshlite/libmeshlite_ffi.so ;Compile Dust3D $ cd ~/Documents/dust3d diff --git a/dust3d.pro b/dust3d.pro index f0c20d94..76b4015c 100644 --- a/dust3d.pro +++ b/dust3d.pro @@ -388,14 +388,14 @@ QMAKE_CXXFLAGS += -std=c++11 win32 { LIBS += -luser32 LIBS += -lopengl32 - + isEmpty(BOOST_INCLUDEDIR) { BOOST_INCLUDEDIR = $$(BOOST_INCLUDEDIR) } isEmpty(CGAL_DIR) { CGAL_DIR = $$(CGAL_DIR) } - + isEmpty(BOOST_INCLUDEDIR) { error("No BOOST_INCLUDEDIR define found in enviroment variables") } @@ -409,7 +409,7 @@ win32 { } else { MESHLITE_DIR = thirdparty/meshlite/meshlite_unstable_vc14_x86 } - MESHLITE_LIBNAME = meshlite.dll + MESHLITE_LIBNAME = meshlite_ffi.dll GMP_LIBNAME = libgmp-10 MPFR_LIBNAME = libmpfr-4 CGAL_LIBNAME = CGAL-vc140-mt-4.11.1 @@ -424,7 +424,7 @@ win32 { macx { MESHLITE_DIR = thirdparty/meshlite - MESHLITE_LIBNAME = meshlite + MESHLITE_LIBNAME = meshlite_ffi GMP_LIBNAME = gmp MPFR_LIBNAME = mpfr CGAL_LIBNAME = cgal @@ -440,14 +440,14 @@ macx { exists(/usr/local/opt/opencv) { INCLUDEPATH += /usr/local/opt/opencv/include LIBS += -L/usr/local/opt/opencv/lib -lopencv_core -lopencv_videoio -lopencv_imgproc - + DEFINES += "USE_OPENCV=1" } } unix:!macx { MESHLITE_DIR = thirdparty/meshlite - MESHLITE_LIBNAME = meshlite + MESHLITE_LIBNAME = meshlite_ffi GMP_LIBNAME = gmp MPFR_LIBNAME = mpfr CGAL_LIBNAME = CGAL diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite.dll b/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite.dll deleted file mode 100644 index 8713069b..00000000 Binary files a/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite.dll and /dev/null differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite.dll.lib b/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite.dll.lib deleted file mode 100644 index 0cd8d14b..00000000 Binary files a/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite.dll.lib and /dev/null differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite_ffi.dll b/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite_ffi.dll new file mode 100644 index 00000000..36a54529 Binary files /dev/null and b/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite_ffi.dll differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite_ffi.dll.lib b/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite_ffi.dll.lib new file mode 100644 index 00000000..38a1871c Binary files /dev/null and b/thirdparty/meshlite/meshlite_unstable_vc14_x64/meshlite_ffi.dll.lib differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite.dll b/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite.dll deleted file mode 100644 index b596e8b7..00000000 Binary files a/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite.dll and /dev/null differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite.dll.lib b/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite.dll.lib deleted file mode 100644 index 572ebc23..00000000 Binary files a/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite.dll.lib and /dev/null differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite_ffi.dll b/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite_ffi.dll new file mode 100644 index 00000000..530591cd Binary files /dev/null and b/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite_ffi.dll differ diff --git a/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite_ffi.dll.lib b/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite_ffi.dll.lib new file mode 100644 index 00000000..b211e81f Binary files /dev/null and b/thirdparty/meshlite/meshlite_unstable_vc14_x86/meshlite_ffi.dll.lib differ