Fix: Make Windows installation scripts that install in user space.
This commit is contained in:
parent
f01de36c23
commit
3339d9cfa5
54
misc/mkwin
54
misc/mkwin
@ -1,9 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# script for compiling and installing YAP under msys. Uses a mingw64
|
# script for compiling and installing YAP under msys. Uses a mingw64
|
||||||
# compiler and nsis to do the installing
|
# compiler, msys shell and nsis to do the installing
|
||||||
|
# Please read the script before trying to execute it.
|
||||||
|
# Legal arguments for the script are
|
||||||
|
# 'threads' - enable threads
|
||||||
|
# 'no_threads',
|
||||||
|
# '32', '64' - compile for 32 or 64 bit architecture.
|
||||||
|
# By default threads are turned off and we use 64 bits.
|
||||||
#
|
#
|
||||||
# please check:
|
# please check if you have gcc 64 bits in your path and a clone
|
||||||
|
# of msys shell like smartgit:
|
||||||
#
|
#
|
||||||
# http://sourceforge.net/projects/mingwbuilds/
|
# http://sourceforge.net/projects/mingwbuilds/
|
||||||
# PS: don't install in the default location.
|
# PS: don't install in the default location.
|
||||||
@ -15,6 +22,9 @@
|
|||||||
VERSION=6.3.4
|
VERSION=6.3.4
|
||||||
THREADS=no
|
THREADS=no
|
||||||
ABI=64
|
ABI=64
|
||||||
|
ROOTS=/l/work/noth/git
|
||||||
|
ROOTS_WIN=L:\\work\\noth\\git
|
||||||
|
TARGET=$ROOTS/yap
|
||||||
|
|
||||||
if test $# = 1; then
|
if test $# = 1; then
|
||||||
if test $1 = threads; then
|
if test $1 = threads; then
|
||||||
@ -53,7 +63,8 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CONFIGURE=../yap-6.3/configure
|
# srcdir comes from here, please avoid relative paths
|
||||||
|
CONFIGURE=$ROOTS/yap-6.3/configure
|
||||||
|
|
||||||
# debugging setup
|
# debugging setup
|
||||||
do_compile=true
|
do_compile=true
|
||||||
@ -61,7 +72,7 @@ do_install=true
|
|||||||
|
|
||||||
# HOME WIN64 configuration
|
# HOME WIN64 configuration
|
||||||
|
|
||||||
DOCS_DIR=/z/Yap/bins/osx
|
DOCS_DIR=/l/work/noth/yapdocs
|
||||||
if test "$THREADS" = yes; then
|
if test "$THREADS" = yes; then
|
||||||
FULL_VERSION="$VERSION"-threads
|
FULL_VERSION="$VERSION"-threads
|
||||||
else
|
else
|
||||||
@ -69,28 +80,28 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test $ABI = 64; then
|
if test $ABI = 64; then
|
||||||
GCC_PATH=/c/cygwin/Yap/mingw64
|
GCC_PATH=/l/Work/noth/mingw-w64/x86_64-4.9.0-posix-seh-rt_v3-rev1/mingw64
|
||||||
HOST="--host=x86_64-w64-mingw32"
|
HOST="--host=x86_64-w64-mingw32"
|
||||||
# ok.
|
# ok.
|
||||||
|
|
||||||
CUDD=yes
|
CUDD=no # BDD compiler package. Get version that compiles on Windows from Vitor!
|
||||||
GECODE=no #does not link with mingw64, VC++ trouble
|
GECODE=no #does not link with mingw64, VC++ trouble
|
||||||
GMP=yes
|
GMP=yes # Compile it for infinite precision numbers and rationals
|
||||||
JAVA=yes
|
JAVA=no # for JPL only
|
||||||
PYTHON=no
|
PYTHON=no # does not work in Windows anyway (currently)
|
||||||
REAL=yes
|
REAL=no # interface to R
|
||||||
|
|
||||||
# it seems python2.7 does not support mingw64
|
# it seems python2.7 does not support mingw64
|
||||||
PYTHON_PATH="/c/Python33-64"
|
PYTHON_PATH="/c/Python33-64"
|
||||||
export PATH="$GCC_PATH"/bin:"$PATH"
|
export PATH="$GCC_PATH"/bin:"$PATH"
|
||||||
GECODE_PATH="/c/Program Files/Gecode"
|
GECODE_PATH="/c/Program Files/Gecode"
|
||||||
GMP=/c/cygwin/Yap/win64
|
GMP=/l/Work/noth/msys/1.0/local
|
||||||
CUDD_PATH=/c/cygwin/Yap/cudd-2.5.0-mingw64
|
CUDD_PATH=/c/cygwin/Yap/cudd-2.5.0-mingw64
|
||||||
JAVA_PATH="/c/Program Files/Java/jdk1.7.0_51"
|
JAVA_PATH="/c/Program Files/Java/jdk1.7.0_51"
|
||||||
R_PATH="/c/Program Files/R/R-3.0.2"
|
R_PATH="/c/Program Files/R/R-3.0.2"
|
||||||
if test $THREADS = yes
|
if test $THREADS = yes
|
||||||
then
|
then
|
||||||
cp "$GCC_PATH/x86_64-w64-mingw32/lib/libwinpthread-1.dll" .
|
cp "$GCC_PATH/x86_64-w64-mingw32/lib/libwinpthread-1.dll" . # interface from posix threads to windows native threads
|
||||||
cp libwinpthread-1.dll pthreadGC2.dll
|
cp libwinpthread-1.dll pthreadGC2.dll
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -108,7 +119,7 @@ REAL=yes
|
|||||||
|
|
||||||
PYTHON_PATH="/c/Python27"
|
PYTHON_PATH="/c/Python27"
|
||||||
export PATH="$GCC_PATH"/bin:$PATH
|
export PATH="$GCC_PATH"/bin:$PATH
|
||||||
# GECODE_PATH="/c/Program Files/Gecode"
|
GECODE_PATH="/c/Program Files/Gecode"
|
||||||
GMP=/c/cygwin/Yap/win32
|
GMP=/c/cygwin/Yap/win32
|
||||||
CUDD_PATH=/c/cygwin/Yap/cudd-2.5.0-mingw32
|
CUDD_PATH=/c/cygwin/Yap/cudd-2.5.0-mingw32
|
||||||
JAVA_PATH="/c/Program Files (x86)/Java/jdk1.7.0_51"
|
JAVA_PATH="/c/Program Files (x86)/Java/jdk1.7.0_51"
|
||||||
@ -149,8 +160,11 @@ then
|
|||||||
export PATH="$PATH":"$R_PATH"/bin/"$R_ABI"
|
export PATH="$PATH":"$R_PATH"/bin/"$R_ABI"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export INSTALL_SH=$ROOTS/yap-6.3/install.sh
|
||||||
|
# avoid using relativ paths
|
||||||
if test "$do_compile" = true; then
|
if test "$do_compile" = true; then
|
||||||
"$CONFIGURE" $HOST \
|
"$CONFIGURE" $HOST \
|
||||||
|
--prefix=$TARGET \
|
||||||
--with-R="$REAL" \
|
--with-R="$REAL" \
|
||||||
--with-java="$JAVA" \
|
--with-java="$JAVA" \
|
||||||
--with-gmp="$GMP" \
|
--with-gmp="$GMP" \
|
||||||
@ -159,16 +173,16 @@ if test "$do_compile" = true; then
|
|||||||
--enable-gecode="$GECODE" \
|
--enable-gecode="$GECODE" \
|
||||||
--enable-threads="$THREADS" --enable-pthread-locking \
|
--enable-threads="$THREADS" --enable-pthread-locking \
|
||||||
--enable-debug-yap --enable-low-level-tracer
|
--enable-debug-yap --enable-low-level-tracer
|
||||||
make install
|
make -j 4 install
|
||||||
fi
|
fi
|
||||||
if test "$do_install" = true; then
|
if test "$do_install" = true; then
|
||||||
if test $ABI = 64; then
|
if test $ABI = 64; then
|
||||||
cp $DOCS_DIR/*html /c/Yap64/share/doc/Yap
|
cp $DOCS_DIR/*html $TARGET/share/doc/Yap
|
||||||
cp $DOCS_DIR/*pdf /c/Yap64/share/doc/Yap
|
cp $DOCS_DIR/*pdf $TARGET/share/doc/Yap
|
||||||
"/c/Program Files (x86)/NSIS/makensis" -DREGKEY=SOFTWARE\\YAP\\Prolog64 -DROOTDIR=Yap64 -DABI="$ABI" -DVERSION="$FULL_VERSION" -DOPTIONS="..\\yap-6.3\\misc\\options.ini" -DOUT_DIR=".." -D"WIN64=1" -NOCD ../yap-6.3/misc/Yap.nsi
|
"/l/Program Files (x86)/NSIS/makensis" -DREGKEY=SOFTWARE\\YAP\\Prolog64 -DROOTDIR=$TARGET -DABI="$ABI" -DVERSION="$FULL_VERSION" -DOPTIONS="$ROOTS_WIN\\yap-6.3\\misc\\options.ini" -DOUT_DIR=".." -D"WIN64=1" -NOCD $ROOTS/yap-6.3/misc/Yap.nsi
|
||||||
else
|
else
|
||||||
cp $DOCS_DIR/*html /c/Yap/share/doc/Yap
|
cp $DOCS_DIR/*html $TARGET/share/doc/Yap
|
||||||
cp $DOCS_DIR/*pdf /c/Yap/share/doc/Yap
|
cp $DOCS_DIR/*pdf $TARGET/share/doc/Yap
|
||||||
"/c/Program Files (x86)/NSIS/makensis" -DREGKEY=SOFTWARE\\YAP\\Prolog -DROOTDIR=Yap -DABI="$ABI" -DVERSION="$FULL_VERSION" -DOPTIONS="..\\yap-6.3\\misc\\options.ini" -DOUT_DIR=".." -NOCD ../yap-6.3/misc/Yap.nsi
|
"/l/Program Files (x86)/NSIS/makensis" -DREGKEY=SOFTWARE\\YAP\\Prolog -DROOTDIR=$TARGET -DABI="$ABI" -DVERSION="$FULL_VERSION" -DOPTIONS="$ROOTS_WIN\\yap-6.3\\misc\\options.ini" -DOUT_DIR=".." -NOCD $ROOTS/yap-6.3/misc/Yap.nsi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
30
misc/yap.nsi
30
misc/yap.nsi
@ -28,8 +28,8 @@ ComponentText "This will install YAP on your computer."
|
|||||||
DirText "This program will install YAP on your computer.\
|
DirText "This program will install YAP on your computer.\
|
||||||
Choose a directory"
|
Choose a directory"
|
||||||
|
|
||||||
Icon c:\${ROOTDIR}\share\Yap\icons\yap.ico
|
Icon ${ROOTDIR}\share\Yap\icons\yap.ico
|
||||||
LicenseData c:\${ROOTDIR}\share\doc\Yap\Artistic
|
LicenseData ${ROOTDIR}\share\doc\Yap\Artistic
|
||||||
LicenseText "YAP is governed by the Artistic License and LGPL;\
|
LicenseText "YAP is governed by the Artistic License and LGPL;\
|
||||||
it includes code under the GPL and LGPL."
|
it includes code under the GPL and LGPL."
|
||||||
|
|
||||||
@ -53,31 +53,31 @@ Section "Base system (required)"
|
|||||||
Delete $INSTDIR\bin\*.pdb
|
Delete $INSTDIR\bin\*.pdb
|
||||||
|
|
||||||
SetOutPath $INSTDIR\bin
|
SetOutPath $INSTDIR\bin
|
||||||
File c:\${ROOTDIR}\bin\yap.exe
|
File ${ROOTDIR}\bin\yap.exe
|
||||||
File c:\${ROOTDIR}\bin\yap.dll
|
File ${ROOTDIR}\bin\yap.dll
|
||||||
File c:\${ROOTDIR}\bin\yap-win.exe
|
File ${ROOTDIR}\bin\yap-win.exe
|
||||||
File c:\${ROOTDIR}\bin\*.dll
|
File ${ROOTDIR}\bin\*.dll
|
||||||
|
|
||||||
; first, copy library DLLs
|
; first, copy library DLLs
|
||||||
SetOutPath $INSTDIR\lib\Yap
|
SetOutPath $INSTDIR\lib\Yap
|
||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File c:\${ROOTDIR}\lib\Yap\*.dll
|
File ${ROOTDIR}\lib\Yap\*.dll
|
||||||
|
|
||||||
SetOutPath $INSTDIR\lib\Yap
|
SetOutPath $INSTDIR\lib\Yap
|
||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File c:\${ROOTDIR}\lib\Yap\startup.yss
|
File ${ROOTDIR}\lib\Yap\startup.yss
|
||||||
|
|
||||||
SetOutPath $INSTDIR\share\Yap
|
SetOutPath $INSTDIR\share\Yap
|
||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File /r c:\${ROOTDIR}\share\Yap\*
|
File /r ${ROOTDIR}\share\Yap\*
|
||||||
|
|
||||||
SetOutPath $INSTDIR\share\doc\Yap
|
SetOutPath $INSTDIR\share\doc\Yap
|
||||||
File c:\${ROOTDIR}\share\doc\Yap\yap.html
|
File ${ROOTDIR}\share\doc\Yap\yap.html
|
||||||
File c:\${ROOTDIR}\share\doc\Yap\yap.pdf
|
File ${ROOTDIR}\share\doc\Yap\yap.pdf
|
||||||
; File c:\${ROOTDIR}\share\doc\Yap\yap.info
|
; File ${ROOTDIR}\share\doc\Yap\yap.info
|
||||||
File c:\${ROOTDIR}\share\doc\Yap\Artistic
|
File ${ROOTDIR}\share\doc\Yap\Artistic
|
||||||
File c:\${ROOTDIR}\share\doc\Yap\README.TXT
|
File ${ROOTDIR}\share\doc\Yap\README.TXT
|
||||||
File c:\${ROOTDIR}\share\doc\Yap\COPYING
|
File ${ROOTDIR}\share\doc\Yap\COPYING
|
||||||
|
|
||||||
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
||||||
WriteRegStr HKLM ${REGKEY} "bin" "$INSTDIR\bin\yap.exe"
|
WriteRegStr HKLM ${REGKEY} "bin" "$INSTDIR\bin\yap.exe"
|
||||||
|
Reference in New Issue
Block a user