Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions buildscripts/build_windows_mcstas
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export MCCODE_USE_LEGACY_DESTINATIONS=ON
./mkdist mcstas-tools-matlab-mcplot $1 tools/matlab/mcplot/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcplot-pyqtgraph $1 tools/Python/mcplot/pyqtgraph/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcplot-matplotlib $1 tools/Python/mcplot/matplotlib/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcplot-plopp $1 tools/Python/mcplot/plopp/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcplot-html $1 tools/Python/mcplot/html/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcrun $1 tools/Python/mcrun/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mctest $1 tools/Python/mctest/ "" mingw64 "" -- nsis64
Expand All @@ -53,6 +54,7 @@ export MCCODE_USE_LEGACY_DESTINATIONS=ON
./mkdist mcstas-tools-python-mcdisplay-webgl-classic $1 tools/Python/mcdisplay/webgl-classic/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcdisplay-pyqtgraph $1 tools/Python/mcdisplay/pyqtgraph/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcdisplay-matplotlib $1 tools/Python/mcdisplay/matplotlib/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcdisplay-plopp $1 tools/Python/mcdisplay/plopp/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcdisplay-mantid $1 tools/Python/mcdisplay/mantid_xml/ "" mingw64 "" -- nsis64
./mkdist mcstas-tools-python-mcdisplay-cad $1 tools/Python/mcdisplay/cad/ "" mingw64 "" -- nsis64
./mkdist mcstas-manuals $1 docpkg/manuals/mcstas/ "" mingw64 "" -- nsis64
Expand Down
2 changes: 2 additions & 0 deletions buildscripts/build_windows_mcxtrace
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ export MCCODE_USE_LEGACY_DESTINATIONS=ON
./mkdist mcxtrace-tools-matlab-mxplot $1 tools/matlab/mcplot/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mccodelib $1 tools/Python/mccodelib/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxplot-matplotlib $1 tools/Python/mcplot/matplotlib/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxplot-plopp $1 tools/Python/mcplot/plopp/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxplot-pyqtgraph $1 tools/Python/mcplot/pyqtgraph/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxplot-html $1 tools/Python/mcplot/html/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxrun $1 tools/Python/mcrun/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxtest $1 tools/Python/mctest/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxgui $1 tools/Python/mcgui/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxdisplay-pyqtgraph $1 tools/Python/mcdisplay/pyqtgraph/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxdisplay-matplotlib $1 tools/Python/mcdisplay/matplotlib/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxdisplay-plopp $1 tools/Python/mcdisplay/plopp/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxdisplay-webgl $1 tools/Python/mcdisplay/webgl/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-tools-python-mxdisplay-webgl-classic $1 tools/Python/mcdisplay/webgl-classic/ "" mingw64 "" -- nsis64
./mkdist mcxtrace-manuals $1 docpkg/manuals/mcxtrace/ "" mingw64 "o" -- nsis64
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/InstallMCCODE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ macro(installMCCODE)
install(PROGRAMS ${WORK}/support/${FLAVOR}-labenv.bat DESTINATION "${DEST_BINDIR}")

# Python/Perl related batches special handling
foreach (name run.bat doc.bat test.bat viewtest.bat resplot.bat plot.bat coplot.bat plotdiff.bat display.bat gui.bat guistart.bat plot-pyqtgraph.bat coplot-pyqtgraph.bat plotdiff-pyqtgraph.bat plot-matplotlib.bat coplot-matplotlib.bat plotdiff-matplotlib.bat plot-matlab.bat plot-html.bat coplot-html.bat plotdiff-html.bat display-webgl.bat display-webgl-classic.bat display-pyqtgraph.bat display-cad.bat display-matplotlib.bat display-mantid.bat display-matlab.bat)
foreach (name run.bat doc.bat test.bat viewtest.bat resplot.bat plot.bat coplot.bat plotdiff.bat display.bat gui.bat guistart.bat plot-pyqtgraph.bat coplot-pyqtgraph.bat plotdiff-pyqtgraph.bat plot-matplotlib.bat coplot-matplotlib.bat plotdiff-matplotlib.bat plot-matlab.bat plot-html.bat coplot-html.bat plotdiff-html.bat display-webgl.bat display-webgl-classic.bat display-pyqtgraph.bat display-cad.bat display-matplotlib.bat display-mantid.bat display-matlab.bat plot-plopp.bat display-plopp.bat)
configure_file(
cmake/support/run-scripts/${name}.in
work/support/${MCCODE_PREFIX}${name}
Expand Down
6 changes: 6 additions & 0 deletions cmake/support/run-scripts/display-plopp.bat.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
@set BINDIR=%~dp0
@CALL %BINDIR%\@FLAVOR@env.bat
@SET PATH=%BINDIR%\@MCCODE_RELPATH_BINDIR2TOOLDIR@\Python\@MCCODE_PREFIX@display\plopp;%PATH%
@python %BINDIR%\@MCCODE_RELPATH_BINDIR2TOOLDIR@\Python\@MCCODE_PREFIX@display\plopp\mcdisplopp.py %*
@exit
6 changes: 6 additions & 0 deletions cmake/support/run-scripts/plot-plopp.bat.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
@set BINDIR=%~dp0
@CALL %BINDIR%\@FLAVOR@env.bat
@SET PATH=%BINDIR%\@MCCODE_RELPATH_BINDIR2TOOLDIR@\Python\@MCCODE_PREFIX@plot\plopp;%PATH%
@python %BINDIR%\@MCCODE_RELPATH_BINDIR2TOOLDIR@\Python\@MCCODE_PREFIX@plot\plopp\mcplopp.py %*
@exit
4 changes: 4 additions & 0 deletions meta-pkgs/windows/McStas-metapackage64-MinGW.iss
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ Source: "dist\mcstas-tools-python-mcgui-NSIS64-@VERSION@-mingw64.exe"; DestDir:
Source: "dist\mcstas-tools-python-mccodelib-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcplot-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcplot-matplotlib-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcplot-plopp-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcplot-html-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-matlab-mcplot-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-webgl-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-webgl-classic-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-cad-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-matplotlib-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-plopp-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdisplay-mantid-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcstas-tools-python-mcdoc-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "Support\micromamba.exe"; DestDir: "{tmp}"
Expand All @@ -68,13 +70,15 @@ Filename: "{tmp}\mcstas-tools-python-mcgui-NSIS64-@VERSION@-mingw64.exe"; Parame
Filename: "{tmp}\mcstas-tools-python-mccodelib-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcplot-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcplot-matplotlib-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcplot-plopp-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcplot-html-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-matlab-mcplot-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-webgl-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-webgl-classic-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-cad-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-matplotlib-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-plopp-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdisplay-mantid-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcstas-tools-python-mcdoc-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\docupdate.bat";
Expand Down
4 changes: 4 additions & 0 deletions meta-pkgs/windows/McXtrace-metapackage64-MinGW.iss
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ Source: "dist\mcxtrace-tools-python-mxgui-NSIS64-@VERSION@-mingw64.exe"; DestDir
Source: "dist\mcxtrace-tools-python-mccodelib-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxplot-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxplot-matplotlib-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxplot-plopp-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxplot-html-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxdisplay-webgl-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxdisplay-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxdisplay-matplotlib-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxdisplay-plopp-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "dist\mcxtrace-tools-python-mxdoc-NSIS64-@VERSION@-mingw64.exe"; DestDir: "{tmp}"
Source: "Support\micromamba.exe"; DestDir: "{tmp}"

Expand All @@ -62,10 +64,12 @@ Filename: "{tmp}\mcxtrace-tools-python-mxgui-NSIS64-@VERSION@-mingw64.exe"; Para
Filename: "{tmp}\mcxtrace-tools-python-mccodelib-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxplot-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxplot-matplotlib-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxplot-plopp-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxplot-html-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxdisplay-webgl-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxdisplay-pyqtgraph-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxdisplay-matplotlib-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxdisplay-plopp-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\mcxtrace-tools-python-mxdoc-NSIS64-@VERSION@-mingw64.exe"; Parameters: "/S"
Filename: "{tmp}\docupdate.bat";

Expand Down
1 change: 1 addition & 0 deletions tools/Python/mcdisplay/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ add_subdirectory(pyqtgraph)
add_subdirectory(webgl)
add_subdirectory(webgl-classic)
add_subdirectory(cad)
add_subdirectory(plopp)
77 changes: 77 additions & 0 deletions tools/Python/mcdisplay/plopp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
cmake_minimum_required(VERSION 3.19)
cmake_policy(VERSION 3.17.0)

# This will install McStas or McXtrace mc/mxdisplay-plopp
project(python-tools-mcdisplay-plopp C)

message(STATUS "Configure ${CMAKE_PROJECT_NAME} ${FLAVOR} ${PROJECT_NAME}")

# Choose between McStas or McXtrace
option(BUILD_MCSTAS "Choose the McStas flavor" off)
option(BUILD_MCXTRACE "Choose the McXtrace flavor (trumps BUILD_MCSTAS)" Off)

# Set module path
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

# Set McCode values (from mkdist or defaults)
include(MCUtil)

if (${BUILD_MCXTRACE})
set(FLAVOR "mcxtrace")
set(CPACK_PACKAGE_HOMEPAGE_URL "http://mcxtrace.org/")
elseif(${BUILD_MCSTAS})
set(FLAVOR "mcstas")
set(CPACK_PACKAGE_HOMEPAGE_URL "http://mcstas.org/")
else()
message(FATAL_ERROR "No flavor specified!\n"
"Please use either -DBUILD_MCSTAS=1 or -DBUILD_MCXTRACE=1")
endif()

setupMCCODE("${FLAVOR}")

# Select prefix
set(P "${MCCODE_PREFIX}")

set(TOOLS_NAME "Python/${P}display/plopp")

# CPack configuration
set(CPACK_PACKAGE_NAME "${FLAVOR}-tools-python-${P}display-plopp")
set(CPACK_RESOURCE_FilE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
set(CPACK_PACKAGE_CONTACT "pkwi@fysik.dtu.dk")

set(CPACK_PACKAGE_VERSION "${MCCODE_MAJOR}.${MCCODE_MINOR}.${MCCODE_PATCH}")
set(CPACK_PACKAGE_VERSION_MAJOR "${MCCODE_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${MCCODE_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${MCCODE_PATCH}")

# NSIS
set(NSIS_NAME "Plopp-based mcdisplay (mcdisplay-plopp), ${MCCODE_STRING}")
set(CPACK_NSIS_PACKAGE_NAME "${NSIS_NAME}")
set(CPACK_NSIS_DISPLAY_NAME "${NSIS_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${NSIS_NAME}")

include(CPack)

set(WORK "${PROJECT_BINARY_DIR}/work")

# Configure fallback script
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mcdisplay.in" "${WORK}/${P}display-plopp" @ONLY)

# Main script - NOT renamed per flavor: the generated notebook imports it by this name
install(
PROGRAMS "${PROJECT_SOURCE_DIR}/mcdisplopp.py"
DESTINATION "${DEST_TOOLDIR}/${TOOLS_NAME}"
)

# Wrapper-scripts on windows are handled via
# cmake Modules/MCUtil
if(NOT WINDOWS)
add_custom_target(
"CREATE_${PROJECT_NAME}_SYMLINK" ALL DEPENDS "${WORK}/${P}display-plopp"
)

install(
PROGRAMS "${WORK}/${P}display-plopp"
DESTINATION ${DEST_BINDIR}
)
endif()
Loading
Loading