Skip to content

Commit

Permalink
Merge pull request #1630 from willend/main
Browse files Browse the repository at this point in the history
Correction to "monolithic" Windows installers
  • Loading branch information
willend authored Jun 15, 2024
2 parents 21f6ffc + 624a91b commit 7dc918a
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 41 deletions.
4 changes: 1 addition & 3 deletions buildscripts/build_windows_mcstas
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if [ "x$2" != "x" ]; then

rm -f python-install.bat.in.2 python-install.bat docupdate.bat.in.2 docupdate.bat

sed s/@VERSION@/${1}/g mcstas-python-install.bat.in > python-install.bat.in.2
sed s/@VERSION@/${1}/g python-install.bat.in > python-install.bat.in.2
sed s/@FLAVOR@/mcstas/g python-install.bat.in.2 > python-install.bat
sed s/@VERSION@/${1}/g docupdate.bat.in > docupdate.bat.in.2
sed s/@P@/mc/g docupdate.bat.in.2 >docupdate.bat.in.3
Expand All @@ -78,8 +78,6 @@ if [ "x$2" != "x" ]; then
sed s/@VERSION@/${1}/g McStas-metapackage64.iss > McStas-${1}-metapackage64.iss
./iscc McStas-${1}-metapackage64.iss
mv Output/setup.exe dist/McStas-Metapackage-${1}-win64.exe
mkdir dist/extras
cp NeXus/*.* dist/extras
cp $WORK/INSTALL-McStas-3.x/Windows/README.md dist/
mkdir dist/single-packages
mv dist/mcstas-* dist/single-packages
Expand Down
4 changes: 1 addition & 3 deletions buildscripts/build_windows_mcxtrace
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ "x$2" != "x" ]; then

rm -f python-install.bat.in.2 python-install.bat docupdate.bat.in.2 docupdate.bat

sed s/@VERSION@/${1}/g mcxtrace-python-install.bat.in > python-install.bat.in.2
sed s/@VERSION@/${1}/g python-install.bat.in > python-install.bat.in.2
sed s/@FLAVOR@/mcxtrace/g python-install.bat.in.2 > python-install.bat
sed s/@VERSION@/${1}/g docupdate.bat.in > docupdate.bat.in.2
sed s/@P@/mx/g docupdate.bat.in.2 >docupdate.bat.in.3
Expand All @@ -74,8 +74,6 @@ if [ "x$2" != "x" ]; then
sed s/@VERSION@/${1}/g McXtrace-metapackage64.iss > McXtrace-${1}-metapackage64.iss
./iscc McXtrace-${1}-metapackage64.iss
mv Output/setup.exe dist/McXtrace-Metapackage-${1}-win64.exe
mkdir dist/extras
cp NeXus/*.* dist/extras
cp $WORK/INSTALL-McXtrace-3.x/Windows/README.md dist/
mkdir dist/single-packages
mv dist/mcxtrace-* dist/single-packages
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/PlatformDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function( detect_platform_variables resultvarname )
if ( NOT WINDOWS )
set(NEXUSFLAGS "-DUSE_NEXUS -lNeXus")#?? should probably have another value
else()
set(NEXUSFLAGS "-DUSE_NEXUS -lNeXus-0")
set(NEXUSFLAGS "-DUSE_NEXUS -lNeXus")
if ( MCCODE_BUILD_CONDA_PKG )
if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" )
set(NEXUSFLAGS "/DUSE_NEXUS NeXus.lib")
Expand Down
8 changes: 6 additions & 2 deletions cmake/toolchains/mingw64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ set(MCCODE_CFLAGS "-flto -O3 -mtune=native -fno-math-errno -ftree-vectorize -g -
set(EDITOR "start")

# NeXus location defaults
set(NEXUSINCLUDE "\\\"C:/Program Files/NeXus Data Format/include/nexus\\\"")
set(NEXUSLIB "\\\"C:/Program Files/NeXus Data Format/bin\\\"")
set(NEXUSINCLUDE "GETPATH(../miniconda3/Library/include/nexus")
set(NEXUSLIB "GETPATH(../miniconda3/Library/lib")

# gsl and xraylib locations
set(GSLFLAGS "-IGETPATH(../miniconda3/Library/include/) -Wl,-rpath,GETPATH(../miniconda3/Library/lib) -LGETPATH(../miniconda3/Library/lib) -lgsl -lgslcblas")
set(XRLFLAGS "-IGETPATH(../miniconda3/Library/include/) -Wl,-rpath,GETPATH(../miniconda3/Library/lib) -LGETPATH(../miniconda3/Library/lib) -lxrl")
3 changes: 1 addition & 2 deletions meta-pkgs/windows/McStas-metapackage64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "python-install.bat"; DestDir: "{tmp}"
Source: "environment.yml"; DestDir: "{tmp}"
Source: "docupdate.bat"; DestDir: "{tmp}"
Source: "Support\unzip.exe"; DestDir: "{tmp}"
Source: "Support\unzip32.dll"; DestDir: "{tmp}"
Source: "dist\mcstas-NSIS64-@[email protected]"; DestDir: "{tmp}"
Source: "dist\mcstas-comps-NSIS64-@[email protected]"; DestDir: "{tmp}"
Source: "dist\mcstas-manuals-NSIS64-@[email protected]"; DestDir: "{tmp}"
Expand Down
2 changes: 1 addition & 1 deletion meta-pkgs/windows/McXtrace-metapackage64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
Source: "python-install.bat"; DestDir: "{tmp}"
Source: "environment.yml"; DestDir: "{tmp}"
Source: "docupdate.bat"; DestDir: "{tmp}"
Source: "dist\mcxtrace-NSIS64-@[email protected]"; DestDir: "{tmp}"
Source: "dist\mcxtrace-comps-NSIS64-@[email protected]"; DestDir: "{tmp}"
Expand Down Expand Up @@ -69,4 +70,3 @@ Filename: "{tmp}\mcxtrace-mcpl-NSIS64-@[email protected]"; Parameters: "/S"
Filename: "{tmp}\docupdate.bat";

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

1 change: 0 additions & 1 deletion meta-pkgs/windows/NeXus

This file was deleted.

40 changes: 40 additions & 0 deletions meta-pkgs/windows/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: miniconda3

channels:
- conda-forge
- nodefaults

dependencies:
- mamba
- conda
- cmake
- compilers
- openmpi=4
- compilers
- gsl
- pyaml
- ply
- matplotlib
- numpy
- tornado
- scipy
- pillow
- pyqtgraph
- pyqt
- qscintilla2
- nexus
- nexusformat
- nexpy
- hdf5
- xraylib
- jupytext
- jupyterlab
- ipympl
- jinja2
- mslex
- typish
- jsons
- pip
- pip:
- guide_bot
- McStasScript
26 changes: 0 additions & 26 deletions meta-pkgs/windows/mcstas-python-install.bat.in

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
@REM update conda and install mamba
@CALL c:\\@FLAVOR@-@VERSION@\\miniconda3\\Scripts\\activate.bat
@mamba update mamba -y
@REM pick dependencies from the default channel and clean up
@mamba install m2-msys2-runtime m2w64-gcc m2w64-gsl mpld3 pyaml ply matplotlib numpy tornado scipy pillow pyqtgraph qscintilla2 nomkl xraylib msmpi mslex jupytext -y
@mamba clean --all -y
@set CONDA_NO_PLUGINS=true
@mamba env update --name base --file environment.yml
@echo ...
@echo Press a key below to exit this installation shell...
@echo ...
Expand Down
Binary file removed support/Win32/NeXus/nexus-4.3-0-win64.exe
Binary file not shown.

0 comments on commit 7dc918a

Please sign in to comment.