Skip to content

Commit

Permalink
updated examples to CE SDK 1.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mistafunk committed Mar 31, 2015
2 parents 39275fb + c117077 commit c8dacc0
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 36 deletions.
10 changes: 5 additions & 5 deletions examples/prt4cmd/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Command Line Example for CityEngine SDK")
set(CPACK_PACKAGE_VERSION_MAJOR ${PRT4CMD_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PRT4CMD_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PRT4CMD_VERSION_MICRO})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}_${PRT4CMD_VERSION_MICRO}_${CESDK_VERSION}_${PACKAGE_SYSTEM}_${PACKAGE_ARCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}_${PACKAGE_SYSTEM}_${PACKAGE_ARCH}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_ZIP_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
endif()

Expand Down
6 changes: 4 additions & 2 deletions examples/prt4maya/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ if not "%~4"=="" (
set CLIENT_TARGET=package
)

IF "%CMAKE_EXECUTABLE%"=="" (set CMAKE_EXECUTABLE=cmake)

set BUILDTYPE=Release
set GENERATOR="NMake Makefiles"

Expand All @@ -32,7 +34,7 @@ call "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
rd /S /Q build install
mkdir build
cd build
cmake -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILDTYPE% ../src
"%CMAKE_EXECUTABLE%" -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILDTYPE% ../src
nmake install
popd
endlocal
Expand All @@ -53,7 +55,7 @@ call "%ProgramFiles(x86)%\Microsoft Visual Studio %CLIENTVC%\VC\vcvarsall.bat" a
rd /S /Q build install
mkdir build
cd build
cmake -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILDTYPE% -DPRT4MAYA_VERSION_MAJOR=%VER_MAJOR% -DPRT4MAYA_VERSION_MINOR=%VER_MINOR% -DPRT4MAYA_VERSION_MICRO=%VER_MICRO% -DMAYA_VERSION=%MAYA_VERSION% ../src
"%CMAKE_EXECUTABLE%" -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILDTYPE% -DPRT4MAYA_VERSION_MAJOR=%VER_MAJOR% -DPRT4MAYA_VERSION_MINOR=%VER_MINOR% -DPRT4MAYA_VERSION_MICRO=%VER_MICRO% -DMAYA_VERSION=%MAYA_VERSION% ../src
nmake %CLIENT_TARGET%
popd
endlocal
Expand Down
10 changes: 5 additions & 5 deletions examples/prt4maya/client/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,20 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Maya Plugin Example for CityEngine SDK")
set(CPACK_PACKAGE_VERSION_MAJOR ${PRT4MAYA_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PRT4MAYA_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PRT4MAYA_VERSION_MICRO})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}_${PRT4MAYA_VERSION_MICRO}_${MAYA_DESC}_${CESDK_VERSION}_${PACKAGE_SYSTEM}_${PACKAGE_ARCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_ZIP_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
endif()

Expand Down
16 changes: 10 additions & 6 deletions examples/prt4maya/codec/src/codecs_maya.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
#include "encoder/MayaEncoder.h"


static const int MINIMAL_VERSION_MAJOR = 1;
static const int MINIMAL_VERSION_MINOR = 2;
/*
* an extension library is only loaded if the major and minor version numbers match.
* this ensures compatibility.
*/
static const int VERSION_MAJOR = 1;
static const int VERSION_MINOR = 3;


extern "C" {
Expand All @@ -31,13 +35,13 @@ PRT4MAYA_CODEC_EXPORTS_API void unregisterExtensionFactories(prtx::ExtensionMana
}


PRT4MAYA_CODEC_EXPORTS_API int getMinimalVersionMajor() {
return MINIMAL_VERSION_MAJOR;
PRT4MAYA_CODEC_EXPORTS_API int getVersionMajor() {
return VERSION_MAJOR;
}


PRT4MAYA_CODEC_EXPORTS_API int getMinimalVersionMinor() {
return MINIMAL_VERSION_MINOR;
PRT4MAYA_CODEC_EXPORTS_API int getVersionMinor() {
return VERSION_MINOR;
}


Expand Down
3 changes: 2 additions & 1 deletion examples/prt4unity/deploy.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ copy %PRT%\lib\VueExport.dll ProgramFiles(x86)\Unity\Editor\prt
copy ..\..\README.windows .
xcopy /S ..\..\..\..\license license\

7z a esri_prt4unity_%PRT4UNITY_BUILD_ID%_cesdk_%PRT_VERSION_MAJOR%_%PRT_VERSION_MINOR%_%PRT_VERSION_MICRO%_%BT%_win_x86.zip MyUnityProject\* ProgramFiles(x86)\* license\* README.windows
REM 7z a esri_prt4unity_%PRT4UNITY_BUILD_ID%_cesdk_%PRT_VERSION_MAJOR%_%PRT_VERSION_MINOR%_%PRT_VERSION_MICRO%_%BT%_win_x86.zip MyUnityProject\* ProgramFiles(x86)\* license\* README.windows
7z a esri_prt4unity_win32_x86.zip MyUnityProject\* ProgramFiles(x86)\* license\* README.windows
popd

endlocal
14 changes: 9 additions & 5 deletions examples/prt4unity/src/codec/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
#endif


static const int MINIMAL_VERSION_MAJOR = 1;
static const int MINIMAL_VERSION_MINOR = 2;
/*
* an extension library is only loaded if the major and minor version numbers match.
* this ensures compatibility.
*/
static const int VERSION_MAJOR = 1;
static const int VERSION_MINOR = 3;


extern "C" {
Expand All @@ -41,12 +45,12 @@ CODECS_UNITY_EXPORTS_API void unregisterExtensionFactories(prtx::ExtensionManage
}


CODECS_UNITY_EXPORTS_API int getMinimalVersionMajor() {
return MINIMAL_VERSION_MAJOR;
CODECS_UNITY_EXPORTS_API int getVersionMajor() {
return VERSION_MAJOR;
}

CODECS_UNITY_EXPORTS_API int getMinimalVersionMinor() {
return MINIMAL_VERSION_MINOR;
return VERSION_MINOR;
}

}
10 changes: 5 additions & 5 deletions examples/stlenc/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Custom Encoder Example for CityEngine SDK
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH ${STLENC_VERSION_MICRO})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}_${STLENC_VERSION_MICRO}_${CESDK_VERSION}_${PACKAGE_SYSTEM}_${PACKAGE_ARCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")

if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_ZIP_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_TGZ_COMPONENT_INSTALL 1)
endif()

Expand Down
17 changes: 10 additions & 7 deletions examples/stlenc/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
# define STLENC_EXPORTS_API __attribute__ ((visibility ("default")))
#endif


static const int MINIMAL_VERSION_MAJOR = 1;
static const int MINIMAL_VERSION_MINOR = 2;
/*
* an extension library is only loaded if the major and minor version numbers match.
* this ensures compatibility.
*/
static const int VERSION_MAJOR = 1;
static const int VERSION_MINOR = 3;


extern "C" {
Expand All @@ -57,13 +60,13 @@ STLENC_EXPORTS_API void unregisterExtensionFactories(prtx::ExtensionManager* /*m
}


STLENC_EXPORTS_API int getMinimalVersionMajor() {
return MINIMAL_VERSION_MAJOR;
STLENC_EXPORTS_API int getVersionMajor() {
return VERSION_MAJOR;
}


STLENC_EXPORTS_API int getMinimalVersionMinor() {
return MINIMAL_VERSION_MINOR;
STLENC_EXPORTS_API int getVersionMinor() {
return VERSION_MINOR;
}


Expand Down

0 comments on commit c8dacc0

Please sign in to comment.