Commit 009c10c3 authored by bonnell's avatar bonnell

Add custom package target for windows

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@10733 18c085ea-50e0-402c-830e-de6fd14e8384
parent afe752b0
SET(VISIT_NSIS_SEARCHPATH)
IF (WIN32)
SET(VISIT_NSIS_SEARCHPATH "$ENV{PROGRAMFILES}/NSIS")
ENDIF (WIN32)
FIND_PROGRAM(MAKENSIS
makensis
PATHS ${VISIT_NSIS_SEARCHPATH}
DOC "Location of the NSIS executable"
)
STRING(COMPARE NOTEQUAL ${MAKENSIS} "MAKENSIS-NOTFOUND" MAKENSIS_FOUND)
......@@ -91,6 +91,10 @@
# Kathleen Bonnell, Wed Mar 17 10:06:44 MST 2010
# Change cmake minimum required to 2.8.0, to support FILE(COPY .
#
# Kathleen Bonnell, Thu April 1 19:29:24 MST 2010
# Find MakeNSIS on windows. Add PACKAGE target for windows, that uses
# our NSIS scripts to create the self-installer.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
......@@ -741,6 +745,10 @@ ELSE(CMAKE_HOST_UNIX)
ENDIF(WIN32)
ENDIF(CMAKE_HOST_UNIX)
IF (WIN32)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindNSIS.cmake)
ENDIF (WIN32)
IF(VISIT_STATIC)
SET(BUILD_SHARED_LIBS 0)
......@@ -1389,4 +1397,28 @@ SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_STRIP_FILES TRUE)
#ENDIF(WIN32)
INCLUDE(CPack)
ELSE (NOT WIN32)
# create a custom target that will run our nsis scripts.
# Make sure it won't run unless specifically called.
#
IF (${MAKENSIS_FOUND})
ADD_CUSTOM_COMMAND(OUTPUT visit${VISIT_VERSION}.exe
COMMAND ${MAKENSIS}
/DVISIT_SOURCE_DIR=${VISIT_SOURCE_DIR}
/DINSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
${VISIT_WINDOWS_DIR}/installation/CreateDBSections.nsi
COMMAND ${MAKENSIS}
/DVisItVersion=${VISIT_VERSION}
/DCOMPILER=${VISIT_MSVC_VERSION}
/DVISIT_SOURCE_DIR=${VISIT_SOURCE_DIR}
/DINSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
${VISIT_WINDOWS_DIR}/installation/binaryinstallation.nsi
DEPENDS ${VISIT_WINDOWS_DIR}/installation/CreateDBSections.nsi
${VISIT_WINDOWS_DIR}/installation/binaryinstallation.nsi
)
ADD_CUSTOM_TARGET(_PACKAGE ALL DEPENDS visit${VISIT_VERSION}.exe)
SET_TARGET_PROPERTIES(_PACKAGE PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD 1)
ENDIF (${MAKENSIS_FOUND})
ENDIF (NOT WIN32)
......@@ -230,16 +230,26 @@ avtPythonFilterEnvironment::Shutdown()
// Programmer: Cyrus Harrison
// Creation: Tue Feb 2 13:14:44 PST 2010
//
// Modifications:
// Kathleen Bonnell, Wed Mar 24 17:58:11 MST 2010
// Check for existence of '0x' at beginning of obj address before attempting
// to remove it.
//
// ****************************************************************************
PyObject *
avtPythonFilterEnvironment::WrapVTKObject(void *obj,
const string &obj_type)
{
ostringstream oss;
string addy_str;
// vtk constructor needs a string of the objects address.
oss << (void *) obj;
// remove 0x from front of string
string addy_str = oss.str().substr(2);
if (oss.str().substr(0, 2) == "0x")
addy_str = oss.str().substr(2);
else
addy_str = oss.str();
if(!pyi->RunScript("_vtkobj = vtk." + obj_type + "('" + addy_str + "')\n"))
return NULL;
......
......@@ -145,7 +145,7 @@ ELSE (NOT WIN32)
GROUP_READ GROUP_WRITE
WORLD_READ)
FOREACH (CFG Release Debug RelWithDebuInfo MinSizeRel)
FOREACH (CFG Release Debug RelWithDebugInfo MinSizeRel)
FILE(COPY ${VISIT_BIN_WIN_FILES}
DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CFG}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE
......
......@@ -2,3 +2,9 @@ INSTALL(FILES UltraCurve.py UltraGrammar.py ultraparse.py
DESTINATION ${VISIT_INSTALLED_VERSION}/ultrawrapper
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ
)
IF (WIN32)
FILE(COPY UltraCurve.py UltraGrammar.py ultraparse.py
DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ultrawrapper)
ENDIF (WIN32)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment