--- /dev/null
+#-----------------------------------------------------------------------------
+# Search InnoSetup:
+FIND_FILE(INNOSETUP_EXECUTABLE ISCC.exe
+ "C:/Program Files/Inno Setup 5"
+ DOC "InnoSetup executable"
+)
+
+IF(EXISTS INNOSETUP_EXECUTABLE)
+ MESSAGE(ERROR "INNOSETUP_EXECUTABLE isn't set properly")
+ENDIF(EXISTS INNOSETUP_EXECUTABLE)
+IF(NOT GDCM_WRAP_PYTHON)
+ MESSAGE(ERROR "INNOSETUP_EXECUTABLE require GDCM_WRAP_PYTHON set to YES")
+ENDIF(NOT GDCM_WRAP_PYTHON)
+IF(NOT GDCM_VTK)
+ MESSAGE(ERROR "INNOSETUP_EXECUTABLE require GDCM_VTK set to YES")
+ENDIF(NOT GDCM_VTK)
+IF(NOT BUILD_EXAMPLES)
+ MESSAGE(ERROR "INNOSETUP_EXECUTABLE require BUILD_EXAMPLES set to YES")
+ENDIF(NOT BUILD_EXAMPLES)
+
+#-----------------------------------------------------------------------------
+# Set new variables to have Windows Paths
+STRING(REGEX REPLACE "/" "\\\\" INNO_SOURCE_DIR ${GDCM_SOURCE_DIR})
+STRING(REGEX REPLACE "/" "\\\\" INNO_BINARY_DIR ${GDCM_BINARY_DIR})
+STRING(REGEX REPLACE "/" "\\\\" INNO_DATA_DIR ${GDCM_DATA_ROOT})
+
+#-----------------------------------------------------------------------------
+# Build the installer
+CONFIGURE_FILE(
+ ${GDCM_SOURCE_DIR}/Builder/gdcm.iss.in
+ ${GDCM_BINARY_DIR}/Builder/gdcm.iss
+)
+
+ADD_CUSTOM_TARGET(InstallerWin32
+ ALL
+ ${INNOSETUP_EXECUTABLE} ${GDCM_BINARY_DIR}/Builder/gdcm.iss
+)
+
+#-----------------------------------------------------------------------------
+
+++ /dev/null
-; Script generated by the Inno Setup Script Wizard.
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
-
-[Setup]
-AdminPrivilegesRequired=yes
-AppName=gdcm Environment
-AppVerName=gdcm 0.4
-AppPublisher=Creatis
-AppPublisherURL=http://www.creatis.insa-lyon.fr
-AppSupportURL=http://www.creatis.insa-lyon.fr
-AppUpdatesURL=http://www.creatis.insa-lyon.fr
-DefaultDirName=c:\Creatis\gdcm
-DisableDirPage=no
-DefaultGroupName=gdcm
-DisableProgramGroupPage=yes
-OutputDir=.\
-; uncomment the following line if you want your installation to run on NT 3.51 too.
-; MinVersion=4,3.51
-ShowComponentSizes=no
-DisableStartupPrompt=yes
-Uninstallable=no
-
-[Types]
-Name: "normal"; Description: "Normal installation";
-Name: "full"; Description: "Full installation"
-Name: "custom"; Description: "Selectable components"; Flags: iscustom
-
-[Components]
-Name: "core"; Description: "Libido core"; Types: normal full custom; Flags: fixed
-Name: "sources"; Description: "Soucres"; Types: custom full
-
-[Files]
-; Core
-Source: "..\lib\*.dll"; DestDir: "{app}\lib"; CopyMode: alwaysoverwrite; Components: core
-Source: "..\lib\*.lib"; DestDir: "{app}\lib"; CopyMode: alwaysoverwrite; Components: core
-Source: "..\Dicts\*.dic"; DestDir: "{app}\Dicts"; CopyMode: alwaysoverwrite; Components: core
-Source: "..\src\*.h"; DestDir: "{app}\include"; CopyMode: alwaysoverwrite; Components: core
-Source: "..\vtk\*.h"; DestDir: "{app}\include"; CopyMode: alwaysoverwrite; Components: core
-; Sources
-Source: "..\src\*.*"; DestDir: "{app}\src"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\src\jpeg\*.*"; DestDir: "{app}\src\jpeg"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\src\jpeg\libijg12\*.*"; DestDir: "{app}\src\jpeg\libijg12"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\src\jpeg\libijg8\*.*"; DestDir: "{app}\src\jpeg\libijg8"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\src\jpeg\ljpg\*.*"; DestDir: "{app}\src\jpeg\ljpg"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\vtk\*.*"; DestDir: "{app}\vtk"; CopyMode: alwaysoverwrite; Components: sources
-; Win compilers
-Source: "..\*.dsw"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\src\win32\*.dsp"; DestDir: "{app}\src\win32"; CopyMode: alwaysoverwrite; Components: sources
-Source: "..\vtk\win32\vtkgdcm.dsp"; DestDir: "{app}\vtk\win32"; CopyMode: alwaysoverwrite; Components: sources
-
--- /dev/null
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+AdminPrivilegesRequired=yes
+AppName=${PROJECT_NAME} Library
+AppVerName=${PROJECT_NAME} ${GDCM_VERSION}
+AppPublisher=Creatis
+AppPublisherURL=http://www.creatis.insa-lyon.fr
+AppSupportURL=http://www.creatis.insa-lyon.fr
+AppUpdatesURL=http://www.creatis.insa-lyon.fr
+DefaultDirName=c:\Creatis\gdcm
+DisableDirPage=no
+DefaultGroupName=gdcm
+DisableProgramGroupPage=yes
+OutputDir=.\
+ShowComponentSizes=no
+DisableStartupPrompt=yes
+Uninstallable=yes
+LicenseFile=${INNO_SOURCE_DIR}\Doc\License.txt
+OutputBaseFilename=${PROJECT_NAME}${GDCM_MAJOR_VERSION}_${GDCM_MINOR_VERSION}_${GDCM_BUILD_VERSION}
+
+
+[Types]
+Name: "normal"; Description: "Normal installation";
+Name: "python"; Description: "Python installation";
+Name: "full"; Description: "Full installation"
+Name: "custom"; Description: "Selectable components"; Flags: iscustom
+
+[Components]
+Name: "core"; Description: "gdcm core"; Types: normal python full custom; Flags: fixed
+Name: "python"; Description: "gdcm python"; Types: python full custom;
+Name: "sources"; Description: "Sources"; Types: custom full
+
+[Files]
+; Core
+Source: "${INNO_BINARY_DIR}\bin\Release\ex*.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_BINARY_DIR}\bin\Release\Print*.exe"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_BINARY_DIR}\bin\Release\*.dll"; DestDir: "{app}\bin"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_BINARY_DIR}\bin\Release\*.lib"; DestDir: "{app}\lib\gdcm"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\Dicts\*.dic"; DestDir: "{app}\Dicts"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\src\*.h"; DestDir: "{app}\include\gdcm"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\vtk\*.h"; DestDir: "{app}\include\gdcm"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_DATA_DIR}\test.acr"; DestDir: "{app}\data"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_DATA_DIR}\DICOMDIR"; DestDir: "{app}\data"; CopyMode: alwaysoverwrite; Components: core
+
+; Python
+Source: "${INNO_BINARY_DIR}\gdcmPython\*.py"; DestDir: "{app}\gdcmPython"; CopyMode: alwaysoverwrite; Components: python
+Source: "${INNO_BINARY_DIR}\gdcmPython\*.pth"; DestDir: "{app}\gdcmPython"; CopyMode: alwaysoverwrite; Components: python
+Source: "${INNO_BINARY_DIR}\gdcmPython\demo\*.py"; DestDir: "{app}\gdcmPython\demo"; CopyMode: alwaysoverwrite; Components: python
+Source: "${INNO_DATA_DIR}\test.acr"; DestDir: "{app}\gdcmPython\demo"; CopyMode: alwaysoverwrite; Components: python
+Source: "${INNO_DATA_DIR}\DICOMDIR"; DestDir: "{app}\gdcmPython\demo"; CopyMode: alwaysoverwrite; Components: python
+
+; Sources
+Source: "${INNO_SOURCE_DIR}\src\*.*"; DestDir: "{app}\Sources\src"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\src\gdcmjpeg\*.*"; DestDir: "{app}\Sources\src\gdcmjpeg"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\src\gdcmjpeg\8\*.*"; DestDir: "{app}\Sources\src\gdcmjpeg\8"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\src\gdcmjpeg\12\*.*"; DestDir: "{app}\Sources\src\gdcmjpeg\12"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\src\gdcmjpeg\16\*.*"; DestDir: "{app}\Sources\src\gdcmjpeg\16"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\vtk\*.*"; DestDir: "{app}\Sources\vtk"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\gdcmPython\*.*"; DestDir: "{app}\Sources\gdcmPython"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\gdcmPython\demo\*.*"; DestDir: "{app}\Sources\gdcmPython\demo"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\Doc\*.*"; DestDir: "{app}\Sources\Doc"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\Dicts\*.*"; DestDir: "{app}\Sources\Dicts"; CopyMode: alwaysoverwrite; Components: sources
+Source: "${INNO_SOURCE_DIR}\CMake*.*"; DestDir: "{app}\Sources"; CopyMode: alwaysoverwrite; Components: sources
+
+; CMake
+Source: "${INNO_SOURCE_DIR}\*.CMake"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_BINARY_DIR}\*.CMake"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+
+; Others
+Source: "${INNO_SOURCE_DIR}\Doc\License.txt"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\AUTHORS"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\DEVELOPPER"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\INSTALL"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\NEWS"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+Source: "${INNO_SOURCE_DIR}\README"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Components: core
+
ENDIF(DOXYGEN)
ENDIF(GDCM_DOCUMENTATION)
+#-----------------------------------------------------------------------------
+IF(WIN32)
+ OPTION(GDCM_INSTALLER "Build the install setup using InnoSetup." OFF)
+ IF(GDCM_INSTALLER)
+ SUBDIRS(Builder)
+ ENDIF(GDCM_INSTALLER)
+ENDIF(WIN32)
+
+import sys
+import os.path
from gdcmConfigDemo import *
from gdcmPython.core import *
fileName = sys.argv[1]
except IndexError:
fileName = os.path.join(GDCM_DATA_ROOT, "DICOMDIR")
+ if( not os.path.isfile(fileName) ):
+ fileName=os.path.join(os.path.split(sys.argv[0])[0],"DICOMDIR")
try:
printLevel = int(sys.argv[2])
import sys
+import os.path
from gdcmConfigDemo import *
from gdcmPython.core import *
fileName = sys.argv[1]
except IndexError:
fileName = os.path.join(GDCM_DATA_ROOT, "test.acr")
+ if( not os.path.isfile(fileName) ):
+ fileName=os.path.join(os.path.split(sys.argv[0])[0],"test.acr")
try:
printLevel = int(sys.argv[2])
+import sys
+import os.path
from gdcmConfigDemo import *
from gdcmPython.vtk import *
from vtkpython import *
fileName = sys.argv[1]
except IndexError:
fileName = os.path.join(GDCM_DATA_ROOT, "test.acr")
-
+ if( not os.path.isfile(fileName) ):
+ fileName=os.path.join(os.path.split(sys.argv[0])[0],"test.acr")
+
if( not os.path.isfile(fileName) ):
PrintUse()
sys.exit(1)
+import sys
+import os.path
from gdcmConfigDemo import *
from gdcmPython.vtk import *
from vtkpython import *
fileName = sys.argv[1]
except IndexError:
fileName = os.path.join(GDCM_DATA_ROOT, "test.acr")
-
+ if( not os.path.isfile(fileName) ):
+ fileName=os.path.join(os.path.split(sys.argv[0])[0],"test.acr")
+
if( not os.path.isfile(fileName) ):
PrintUse()
sys.exit(1)