Skip to content

Commit 235337c

Browse files
committed
Add nsis packaging
1 parent 0a6499f commit 235337c

File tree

9 files changed

+83
-18
lines changed

9 files changed

+83
-18
lines changed

Diff for: CMakeLists.txt

+35
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)
44
# have all targets (exe, lib, dll) as projects (.vcproj)
55
project (isimpa)
66

7+
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
8+
set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/bin" CACHE PATH "default install path" FORCE )
9+
message (STATUS "Default install path is set: " ${CMAKE_INSTALL_PREFIX})
10+
else()
11+
message (STATUS "Install path already defined: " ${CMAKE_INSTALL_PREFIX})
12+
endif()
13+
714
# Turn on the ability to create folders to organize projects (.vcproj)
815
# It creates "CMakePredefinedTargets" folder by default and adds CMake
916
# defined projects like INSTALL.vcproj and ZERO_CHECK.vcproj
@@ -59,3 +66,31 @@ endif()
5966
set(TEST_DATA_DIR "${PROJECT_BINARY_DIR}/Testing")
6067
file(MAKE_DIRECTORY ${TEST_DATA_DIR})
6168
enable_testing()
69+
70+
71+
INCLUDE(InstallRequiredSystemLibraries)
72+
73+
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "I-SIMPA")
74+
SET(CPACK_PACKAGE_VENDOR "Ifsttar")
75+
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/DESCRIPTION.txt")
76+
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.md")
77+
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
78+
SET(CPACK_PACKAGE_VERSION_MINOR "3")
79+
SET(CPACK_PACKAGE_VERSION_PATCH "0")
80+
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "I-SIMPA")
81+
IF(WIN32 AND NOT UNIX)
82+
# There is a bug in NSI that does not handle full unix paths properly. Make
83+
# sure there is at least one set of four (4) backlasshes.
84+
SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/CurrentRelease\\\\isimpa.ico")
85+
SET(CPACK_NSIS_INSTALLED_ICON_NAME "isimpa.exe")
86+
SET(CPACK_NSIS_DISPLAY_NAME "I-SIMPA")
87+
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\i-simpa-wiki.readthedocs.io")
88+
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\i-simpa.ifsttar.fr")
89+
SET(CPACK_NSIS_CONTACT "[email protected]")
90+
SET(CPACK_NSIS_MODIFY_PATH ON)
91+
ELSE(WIN32 AND NOT UNIX)
92+
SET(CPACK_STRIP_FILES "isimpa.exe")
93+
SET(CPACK_SOURCE_STRIP_FILES "")
94+
ENDIF(WIN32 AND NOT UNIX)
95+
SET(CPACK_PACKAGE_EXECUTABLES "isimpa" "I-SIMPA")
96+
INCLUDE(CPack)

Diff for: DESCRIPTION.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
I-Simpa is a graphical user interface (GUI) developed to host three-dimensional numerical codes for the modeling of sound propagation
2+
in complex geometrical domains. Although I-Simpa is well adapted for energetic models (ray-tracing, sound-particle tracing, theory of
3+
reverberation�), it can be extend to use ondulatory approaches.
4+
I-Simpa alone is not a calculation software, but is equivalent to a pre and post-processor for acoustic codes. One or more numerical
5+
codes must be added in order to obtain a fully functional system. At the present time, I-Simpa is delivered with two codes
6+
(TCR and SPPS, see information here).
7+
Classical applications are room and building acoustics, environmental noise and industrial noise, but it can be easily extend to other
8+
applications concerning the sound propagation in 3D environments (interior of vehicle, sound in cavities�).
9+
10+
The main concepts of I-Simpa are:
11+
12+
* a functional GUI: elements and components are organized in tree structures, to easily access to all information, parameters and
13+
properties. Many features are proposed for helping users�
14+
* an �open� system: all information and data are organized in spreadsheets that can be displayed, exported, copied�
15+
* an �open� software: each user can integrate its own numerical propagation code, develop its own functionalities within the interface
16+
for its own applications� All have been done in order you can extend I-Simpa easily.
17+
18+
19+
I-Simpa has been initially developed as a research tool (i.e. for research laboratories), but can also be a very efficient tool for a professional or commercial use.

Diff for: src/VolumetricMeshRepair/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ target_link_libraries (vmr lib_interface)
3838

3939
# Adds logic to INSTALL.vcproj to copy vmr to destination directory
4040
install (TARGETS vmr
41-
RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin/meshing/vmr)
41+
RUNTIME DESTINATION meshing/vmr)

Diff for: src/isimpa/CMakeLists.txt

+11-3
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ ENDIF()
451451

452452
# Adds logic to INSTALL.vcproj to copy isimpa to destination directory
453453
install (TARGETS isimpa
454-
RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin)
454+
RUNTIME DESTINATION .)
455455

456456
set(ISIMPA_RESSOURCES ${PROJECT_SOURCE_DIR}/currentRelease)
457457

@@ -460,7 +460,7 @@ ${ISIMPA_RESSOURCES}/appconst.xml
460460
${ISIMPA_RESSOURCES}/isimpa.ico
461461
${ISIMPA_RESSOURCES}/Licence.pdf
462462
${ISIMPA_RESSOURCES}/Licence.rtf
463-
DESTINATION ${PROJECT_BINARY_DIR}/bin)
463+
DESTINATION .)
464464

465465
install(DIRECTORY
466466
${ISIMPA_RESSOURCES}/Bitmaps
@@ -469,5 +469,13 @@ ${ISIMPA_RESSOURCES}/locale
469469
${ISIMPA_RESSOURCES}/SystemScript
470470
${ISIMPA_RESSOURCES}/UserScript
471471
${ISIMPA_RESSOURCES}/Directivities
472-
DESTINATION ${PROJECT_BINARY_DIR}/bin)
472+
DESTINATION .)
473473

474+
# Copy python ressources required by boost python runtime
475+
if(WIN32) # Check if we are on Windows
476+
get_filename_component(PYTHON_ROOT_FOLDER ${PYTHON_EXECUTABLE} PATH)
477+
set(PYTHON_LIB_FOLDER ${PYTHON_ROOT_FOLDER}/Lib)
478+
install(DIRECTORY
479+
${PYTHON_ROOT_FOLDER}/Lib
480+
DESTINATION .)
481+
endif()

Diff for: src/preprocess/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ target_link_libraries (preprocess lib_interface)
3131

3232
# Adds logic to INSTALL.vcproj to copy preprocess to destination directory
3333
install (TARGETS preprocess
34-
RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin/meshing/tetgen)
34+
RUNTIME DESTINATION meshing/tetgen)

Diff for: src/python_bindings/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ set(ISIMPA_RESSOURCES ${PROJECT_SOURCE_DIR}/currentRelease)
4242

4343
# Adds logic to INSTALL.vcproj to copy _libsimpa.pyd to the destination directory
4444
install (TARGETS ${SWIG_MODULE_libsimpa_REAL_NAME}
45-
ARCHIVE DESTINATION ${CMAKE_SWIG_OUTDIR}
46-
LIBRARY DESTINATION ${CMAKE_SWIG_OUTDIR}
47-
RUNTIME DESTINATION ${CMAKE_SWIG_OUTDIR}
45+
ARCHIVE DESTINATION libsimpa/
46+
LIBRARY DESTINATION libsimpa/
47+
RUNTIME DESTINATION libsimpa/
4848
COMPONENT library
4949
)
5050

5151
install (FILES
5252
${ISIMPA_RESSOURCES}/libsimpa/vec3.py
5353
${ISIMPA_RESSOURCES}/libsimpa/__init__.py
54-
DESTINATION ${PROJECT_BINARY_DIR}/bin/libsimpa/)
54+
DESTINATION libsimpa/)
5555
#------------#
5656
# TEST
5757
#------------#

Diff for: src/spps/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ endif()
9898

9999
# Adds logic to INSTALL.vcproj to copy spps to destination directory
100100
install (TARGETS spps
101-
RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin/core/spps)
101+
RUNTIME DESTINATION core/spps)
102102

103103
#------------#
104104
# TEST

Diff for: src/tetgen/CMakeLists.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
# Add an executable to the project using the specified source files.
33
add_executable(tetgen tetgen.cxx predicates.cxx)
44

5+
# Creates a folder "executables" and adds target
6+
set_property(TARGET tetgen PROPERTY FOLDER "executables")
7+
58
#--------------#
69
# INSTALL
710
#--------------#
811

912
# Adds logic to INSTALL.vcproj to copy tetgen to destination directory
1013
install (TARGETS tetgen
11-
RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin/meshing/tetgen)
14+
RUNTIME DESTINATION meshing/tetgen)
1215

1316
install (FILES
1417
${CMAKE_CURRENT_SOURCE_DIR}/README
1518
${CMAKE_CURRENT_SOURCE_DIR}/LICENSE
16-
DESTINATION ${PROJECT_BINARY_DIR}/bin/meshing/tetgen)
19+
DESTINATION meshing/tetgen)

Diff for: src/theorie_classique/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ include_directories( ${Boost_INCLUDE_DIRS} )
2222
# Set Properties->General->Configuration Type to Application
2323
# Creates spps with the listed sources
2424
# Adds sources to the Solution Explorer
25-
add_executable(TheorieClassique ${CT_SOURCE_FILES})
25+
add_executable(classicalTheory ${CT_SOURCE_FILES})
2626

2727
# Creates a folder "executables" and adds target
28-
set_property(TARGET TheorieClassique PROPERTY FOLDER "executables")
28+
set_property(TARGET classicalTheory PROPERTY FOLDER "executables")
2929

3030
# Properties->Linker->Input->Additional Dependencies
31-
target_link_libraries (TheorieClassique lib_interface)
32-
target_link_libraries(TheorieClassique ${Boost_LIBRARIES})
31+
target_link_libraries (classicalTheory lib_interface)
32+
target_link_libraries(classicalTheory ${Boost_LIBRARIES})
3333

3434
#--------------#
3535
# INSTALL
3636
#--------------#
3737

3838
# Adds logic to INSTALL.vcproj to copy spps to destination directory
39-
install (TARGETS TheorieClassique
40-
RUNTIME DESTINATION ${PROJECT_BINARY_DIR}/bin/core/theorie_classique)
39+
install (TARGETS classicalTheory
40+
RUNTIME DESTINATION core/classical_theory)

0 commit comments

Comments
 (0)