more updates
This commit is contained in:
parent
e2c44e492f
commit
386e15c425
@ -614,7 +614,7 @@ install_win32: startup.yss @WINDOWS@ yap-win@EXEC_SUFFIX@ install_unix
|
||||
$(INSTALL_PROGRAM) -m 755 yap.dll $(DESTDIR)$(BINDIR)/yap.dll
|
||||
@WINDOWS@ $(INSTALL_PROGRAM) -m 755 yap-win.exe $(DESTDIR)$(BINDIR)/yap-win.exe
|
||||
@WINDOWS@ $(INSTALL_PROGRAM) -m 755 yap.exe $(DESTDIR)$(BINDIR)/yap.exe
|
||||
@WINDOWS@ $(INSTALL_PROGRAM) -m 755 plterm.dll $(DESTDIR)$(BINDIR)/plterm.dll
|
||||
@WINDOWS@ for i in *.dll; do $(INSTALL_PROGRAM) -m 755 $$i $(DESTDIR)$(BINDIR)/; done
|
||||
$(INSTALL_DATA) $(srcdir)/misc/icons/yap.ico $(DESTDIR)$(SHAREDIR)/Yap/icons
|
||||
|
||||
install_library: @YAPLIB@
|
||||
|
26
configure
vendored
26
configure
vendored
@ -835,7 +835,6 @@ ac_subst_files=''
|
||||
ac_user_opts='
|
||||
enable_option_checking
|
||||
enable_tabling
|
||||
enable_abi
|
||||
enable_or_parallelism
|
||||
enable_depth_limit
|
||||
enable_wam_profile
|
||||
@ -1512,7 +1511,6 @@ Optional Features:
|
||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-tabling support tabling
|
||||
--enable-abi support tabling
|
||||
--enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads
|
||||
--enable-depth-limit support depth-bound computation
|
||||
--enable-wam-profile support low level profiling of abstract machine
|
||||
@ -4209,15 +4207,6 @@ else
|
||||
tabling=yes
|
||||
fi
|
||||
|
||||
# Check whether --enable-abi was given.
|
||||
if test "${enable_abi+set}" = set; then :
|
||||
enableval=$enable_abi; yap_cv_abi="$enableval"
|
||||
CC="$CC -m$abi"
|
||||
CXX="$CXX -m$abi"
|
||||
else
|
||||
yap_cv_abi=""
|
||||
fi
|
||||
|
||||
# Check whether --enable-or-parallelism was given.
|
||||
if test "${enable_or_parallelism+set}" = set; then :
|
||||
enableval=$enable_or_parallelism; orparallelism="$enableval"
|
||||
@ -4557,9 +4546,7 @@ $as_echo "#define MinStackSpace (1024*SIZEOF_INT_P)" >>confdefs.h
|
||||
|
||||
$as_echo "#define MinTrailSpace (256*SIZEOF_INT_P)" >>confdefs.h
|
||||
|
||||
$as_echo "#define MAX_WORKERS 1" >>confdefs.h
|
||||
|
||||
if test "$orparallelism" = no
|
||||
if test "$orparallelism" = yes
|
||||
then
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -4574,6 +4561,9 @@ _ACEOF
|
||||
then
|
||||
threads="yes"
|
||||
fi
|
||||
else
|
||||
$as_echo "#define MAX_WORKERS 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
@ -12175,7 +12165,7 @@ else
|
||||
JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* #line 12178 "configure" */
|
||||
/* #line 12168 "configure" */
|
||||
public class Test {
|
||||
}
|
||||
EOF
|
||||
@ -12351,7 +12341,7 @@ EOF
|
||||
if uudecode$EXEEXT Test.uue; then
|
||||
ac_cv_prog_uudecode_base64=yes
|
||||
else
|
||||
echo "configure: 12354: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||
echo "configure: 12344: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||
echo "configure: failed file was:" >&5
|
||||
cat Test.uue >&5
|
||||
ac_cv_prog_uudecode_base64=no
|
||||
@ -12482,7 +12472,7 @@ else
|
||||
JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* #line 12485 "configure" */
|
||||
/* #line 12475 "configure" */
|
||||
public class Test {
|
||||
}
|
||||
EOF
|
||||
@ -12517,7 +12507,7 @@ JAVA_TEST=Test.java
|
||||
CLASS_TEST=Test.class
|
||||
TEST=Test
|
||||
cat << \EOF > $JAVA_TEST
|
||||
/* [#]line 12520 "configure" */
|
||||
/* [#]line 12510 "configure" */
|
||||
public class Test {
|
||||
public static void main (String args[]) {
|
||||
System.exit (0);
|
||||
|
10
configure.in
10
configure.in
@ -101,11 +101,6 @@ AC_DEFINE(ALIGN_LONGS, 1, [longs should be in addresses that are multiple of fou
|
||||
AC_ARG_ENABLE(tabling,
|
||||
[ --enable-tabling support tabling ],
|
||||
tabling="$enableval", tabling=yes)
|
||||
AC_ARG_ENABLE(abi,
|
||||
[ --enable-abi support tabling ],
|
||||
[yap_cv_abi="$enableval"
|
||||
CC="$CC -m$abi"
|
||||
CXX="$CXX -m$abi"], yap_cv_abi="")
|
||||
AC_ARG_ENABLE(or-parallelism,
|
||||
[ --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads ],
|
||||
orparallelism="$enableval", orparallelism=no)
|
||||
@ -313,8 +308,7 @@ AC_ARG_WITH(max-threads,
|
||||
AC_DEFINE(MinHeapSpace, (2048*SIZEOF_INT_P), [at least 2M Cells for Heap])
|
||||
AC_DEFINE(MinStackSpace,(1024*SIZEOF_INT_P), [at least 1M Cells for Stack])
|
||||
AC_DEFINE(MinTrailSpace,(256*SIZEOF_INT_P), [at least 1/2M Cells for Trail])
|
||||
AC_DEFINE(MAX_WORKERS,1)
|
||||
if test "$orparallelism" = no
|
||||
if test "$orparallelism" = yes
|
||||
then
|
||||
AC_DEFINE_UNQUOTED(MAX_WORKERS,$yap_cv_max_workers,[maximum amount of or-parallelism])
|
||||
if test "$orparallelism" = copy -o "$orparallelism" = yes
|
||||
@ -325,6 +319,8 @@ then
|
||||
then
|
||||
threads="yes"
|
||||
fi
|
||||
else
|
||||
AC_DEFINE(MAX_WORKERS,1)
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(DefHeapSpace,$yap_cv_heap_space, [Default Heap Space.])
|
||||
|
61
misc/mkwin
61
misc/mkwin
@ -1,4 +1,15 @@
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
# script for compiling and installing YAP under msys. Uses a mingw64
|
||||
# compiler and nsis to do the installing
|
||||
#
|
||||
# please check:
|
||||
#
|
||||
# http://sourceforge.net/projects/mingwbuilds/
|
||||
# http://nsis.sourceforge.net/Main_Page
|
||||
#
|
||||
#
|
||||
VERSION=6.3.4
|
||||
THREADS=yes
|
||||
if test $# = 0; then
|
||||
ABI=64
|
||||
@ -9,8 +20,21 @@ else
|
||||
THREADS=$2
|
||||
fi
|
||||
|
||||
# debugging setup
|
||||
do_compile=true
|
||||
do_install=true
|
||||
|
||||
# HOME WIN64 configuration
|
||||
if test -e "/c/cygwin/Yap/mingw64/bin/gcc" -a $ABI = 64; then
|
||||
|
||||
DOCS_DIR=/z/Yap/bins/osx
|
||||
if test "$THREADS" = yes; then
|
||||
FULL_VERSION="$VERSION"-threads
|
||||
else
|
||||
FULL_VERSION="$VERSION"
|
||||
fi
|
||||
|
||||
if test $ABI = 64; then
|
||||
GCC_PATH=/c/cygwin/Yap/mingw64
|
||||
CUDD=yes
|
||||
GECODE=no #does not link with mingw64, VC++ trouble
|
||||
GMP=yes
|
||||
@ -18,13 +42,7 @@ JAVA=yes
|
||||
PYTHON=no
|
||||
REAL=yes
|
||||
HOST="--host=x86_64-w64-mingw32"
|
||||
if test $THREADS = yes; then
|
||||
TAR=yap-x86_64-threads-6.3.4.tar.gz
|
||||
else
|
||||
TAR=yap-x86_64-6.3.4.tar.gz
|
||||
fi
|
||||
|
||||
GCC_PATH="/c/cygwin/Yap/mingw64"
|
||||
# it seems python2.7 does not support mingw64
|
||||
PYTHON_PATH="/c/Python33-64"
|
||||
export PATH="$GCC_PATH"/bin:"$PATH"
|
||||
@ -42,7 +60,8 @@ fi
|
||||
fi
|
||||
|
||||
# HOME WIN32 configuration
|
||||
if test -e "/c/cygwin/Yap/mingw64/bin/gcc" -a $ABI = 32; then
|
||||
if test $ABI = 32; then
|
||||
GCC_PATH="/c/Program Files (x86)/mingw-builds/x32-4.8.1-posix-dwarf-rev5/mingw32"
|
||||
CUDD=yes
|
||||
GECODE=no # install only allows one of 32 or 64 bits
|
||||
GMP=yes
|
||||
@ -50,7 +69,6 @@ JAVA=yes
|
||||
PYTHON=no
|
||||
REAL=yes
|
||||
|
||||
GCC_PATH="/c/cygwin/Yap/mingw64"
|
||||
PYTHON_PATH="/c/Python27"
|
||||
export PATH="$GCC_PATH"/bin:$PATH:"$PYTHON_PATH"
|
||||
# GECODE_PATH="/c/Program Files/Gecode"
|
||||
@ -59,10 +77,11 @@ REAL=yes
|
||||
JAVA_PATH="/c/Program Files (x86)/Java/jdk1.7.0_51"
|
||||
R_PATH="/c/Program Files/R/R-3.0.2"
|
||||
R_ABI=i386
|
||||
HOST="--enable-abi=32"
|
||||
HOST=""
|
||||
|
||||
if test $THREADS = yes
|
||||
then
|
||||
cp "$GCC_PATH/x86_64-w64-mingw32/lib32/libwinpthread-1.dll" .
|
||||
cp "$GCC_PATH/i686-w64-mingw32/lib/libwinpthread-1.dll" .
|
||||
cp libwinpthread-1.dll pthreadGC2.dll
|
||||
fi
|
||||
fi
|
||||
@ -92,6 +111,7 @@ then
|
||||
export PATH="$PATH":"$R_PATH"/bin/"$R_ABI"
|
||||
fi
|
||||
|
||||
if test "$do_compile" = true; then
|
||||
../yap-6.3/configure $HOST \
|
||||
--with-R="$REAL" \
|
||||
--with-java="$JAVA" \
|
||||
@ -102,10 +122,15 @@ fi
|
||||
--enable-threads="$THREADS" --enable-pthread-locking \
|
||||
--enable-debug-yap --enable-low-level-tracer
|
||||
make install
|
||||
cp /z/Yap/bins/osx/*html /c/Yap64/share/doc/Yap
|
||||
cp /z/Yap/bins/osx/*pdf /c/Yap64/share/doc/Yap
|
||||
if test $ABI = 64; then
|
||||
"/c/Program Files (x86)/NSIS/makensis" ../yap-6.3/misc/Yap64.nsi
|
||||
else
|
||||
"/c/Program Files (x86)/NSIS/makensis" ../yap-6.3/misc/Yap.nsi
|
||||
fi
|
||||
if test "$do_install" = true; then
|
||||
if test $ABI = 64; then
|
||||
cp $DOCS_DIR/*html /c/Yap64/share/doc/Yap
|
||||
cp $DOCS_DIR/*pdf /c/Yap64/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
|
||||
else
|
||||
cp $DOCS_DIR/*html /c/Yap/share/doc/Yap
|
||||
cp $DOCS_DIR/*pdf /c/Yap/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
|
||||
fi
|
||||
fi
|
||||
|
170
misc/yap.nsi
170
misc/yap.nsi
@ -1,4 +1,4 @@
|
||||
# YAP install-script (from SWI-Prolog)
|
||||
; YAP install-script (based on a similar scrip from SWI-Prolog)
|
||||
|
||||
!define TEMP1 $R0 ; Temp variable
|
||||
!define EXT $3 ; Filename extension for Prolog sources
|
||||
@ -7,31 +7,31 @@
|
||||
!define SHCTX $6 ; Shell context (current/all)
|
||||
!define ARCH $7 ; Architecture (x86, ia64 or amd64)
|
||||
|
||||
!ifdef WIN64
|
||||
!define REGKEY SOFTWARE\YAP\Prolog64
|
||||
!else
|
||||
!define REGKEY SOFTWARE\YAP\Prolog
|
||||
!endif
|
||||
|
||||
|
||||
RequestExecutionLevel admin
|
||||
SetCompressor bzip2
|
||||
MiscButtonText "<back" "next>" "abort" "finished"
|
||||
|
||||
# Preload files that are needed by the installer itself
|
||||
ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
|
||||
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||
ReserveFile "options.ini"
|
||||
SetCompressor /FINAL bzip2
|
||||
|
||||
; Preload files that are needed by the installer itself
|
||||
ReserveFile "${NSISDIR}\Plugins\x86-unicode\UserInfo.dll"
|
||||
ReserveFile "${NSISDIR}\Plugins\\x86-unicode\InstallOptions.dll"
|
||||
ReserveFile "${OPTIONS}"
|
||||
|
||||
InstallDir $PROGRAMFILES\Yap
|
||||
!ifdef WIN64
|
||||
InstallDir "$PROGRAMFILES64\${ROOTDIR}"
|
||||
!else
|
||||
InstallDir "$PROGRAMFILES\${ROOTDIR}"
|
||||
!endif
|
||||
InstallDirRegKey HKLM ${REGKEY} "home"
|
||||
|
||||
ComponentText "This will install YAP on your computer."
|
||||
DirText "This program will install YAP on your computer.\
|
||||
Choose a directory"
|
||||
|
||||
LicenseData c:\Yap\share\doc\Yap\Artistic
|
||||
LicenseText "YAP is governed by the Artistic License,\
|
||||
but includes code under the GPL and LGPL."
|
||||
Icon c:\${ROOTDIR}\share\Yap\icons\yap.ico
|
||||
LicenseData c:\${ROOTDIR}\share\doc\Yap\Artistic
|
||||
LicenseText "YAP is governed by the Artistic License and LGPL;\
|
||||
it includes code under the GPL and LGPL."
|
||||
|
||||
InstType "Typical (all except debug symbols)" # 1
|
||||
InstType "Minimal (no graphics)" # 2
|
||||
@ -43,44 +43,55 @@ Page custom SetCustom "" ": Installation options"
|
||||
Page instfiles
|
||||
|
||||
Section "Base system (required)"
|
||||
|
||||
SectionIn RO # do not allow to delete this
|
||||
|
||||
!ifdef WIN64
|
||||
SetRegView 64
|
||||
!endif
|
||||
|
||||
Delete $INSTDIR\bin\*.pdb
|
||||
|
||||
SetOutPath $INSTDIR\bin
|
||||
File c:\Yap\bin\yap.exe
|
||||
File c:\Yap\bin\yap.dll
|
||||
File c:\Yap\bin\yap-win.exe
|
||||
File c:\Yap\bin\plterm.dll
|
||||
File c:\${ROOTDIR}\bin\yap.exe
|
||||
File c:\${ROOTDIR}\bin\yap.dll
|
||||
File c:\${ROOTDIR}\bin\yap-win.exe
|
||||
File c:\${ROOTDIR}\bin\*.dll
|
||||
|
||||
SetOutPath $INSTDIR\bin
|
||||
; first, copy library DLLs
|
||||
SetOutPath $INSTDIR\lib\Yap
|
||||
; SYSTEM STUFF
|
||||
File c:\Yap\lib\Yap\*.dll
|
||||
File c:\${ROOTDIR}\lib\Yap\*.dll
|
||||
|
||||
SetOutPath $INSTDIR\lib
|
||||
|
||||
SetOutPath $INSTDIR\lib
|
||||
SetOutPath $INSTDIR\lib\Yap
|
||||
; SYSTEM STUFF
|
||||
File c:\Yap\lib\Yap\startup.yss
|
||||
|
||||
SetOutPath $INSTDIR\share
|
||||
File c:\${ROOTDIR}\lib\Yap\startup.yss
|
||||
|
||||
SetOutPath $INSTDIR\share\Yap
|
||||
; SYSTEM STUFF
|
||||
File /r c:\Yap\share\Yap\*
|
||||
File /r c:\${ROOTDIR}\share\Yap\*
|
||||
|
||||
SetOutPath $INSTDIR\doc\Yap
|
||||
File c:\Yap\share\doc\Yap\yap.html
|
||||
File c:\Yap\share\doc\Yap\yap.pdf
|
||||
File c:\Yap\share\doc\Yap\Artistic
|
||||
File c:\Yap\share\doc\Yap\README.TXT
|
||||
File c:\Yap\share\doc\Yap\COPYING.TXT
|
||||
SetOutPath $INSTDIR\share\doc\Yap
|
||||
File c:\${ROOTDIR}\share\doc\Yap\yap.html
|
||||
File c:\${ROOTDIR}\share\doc\Yap\yap.pdf
|
||||
; File c:\${ROOTDIR}\share\doc\Yap\yap.info
|
||||
File c:\${ROOTDIR}\share\doc\Yap\Artistic
|
||||
File c:\${ROOTDIR}\share\doc\Yap\README
|
||||
File c:\${ROOTDIR}\share\doc\Yap\COPYING
|
||||
|
||||
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
||||
WriteRegStr HKLM ${REGKEY} "startup" "$INSTDIR\lib\startup.yss"
|
||||
WriteRegStr HKLM ${REGKEY} "library" "$INSTDIR\share"
|
||||
WriteRegStr HKLM ${REGKEY} "bin" "$INSTDIR\bin\yap.exe"
|
||||
WriteRegStr HKLM ${REGKEY} "dlls" "$INSTDIR\lib\Yap"
|
||||
WriteRegStr HKLM ${REGKEY} "startup" "$INSTDIR\lib\Yap\startup.yss"
|
||||
WriteRegStr HKLM ${REGKEY} "library" "$INSTDIR\share\Yap"
|
||||
WriteRegStr HKLM ${REGKEY} "commons" "$INSTDIR\share\PrologCommons"
|
||||
|
||||
; Write uninstaller
|
||||
!ifdef WIN64
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64" "DisplayName" "YAP64 (remove only)"
|
||||
!else
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP" "DisplayName" "YAP (remove only)"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
!endif
|
||||
WriteUninstaller "uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
@ -88,24 +99,33 @@ SectionEnd
|
||||
Section "Start Menu shortcuts"
|
||||
SectionIn 1 2 3
|
||||
SetOutPath ${CWD}
|
||||
!ifdef WIN64
|
||||
StrCpy ${GRP} "YAP64"
|
||||
!else
|
||||
StrCpy ${GRP} "YAP"
|
||||
!endif
|
||||
CreateDirectory "$SMPROGRAMS\${GRP}"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\YAP-WIN.lnk" \
|
||||
"$INSTDIR\bin\yap-win.exe" \
|
||||
"" \
|
||||
"$INSTDIR\bin\yap-win.exe" \
|
||||
0
|
||||
SetOutPath $INSTDIR
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\YAP.lnk" \
|
||||
"$INSTDIR\bin\yap.exe" \
|
||||
"" \
|
||||
"$INSTDIR\bin\yap.exe" \
|
||||
0
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Readme.lnk" \
|
||||
"$INSTDIR\doc\Yap\README.TXT" "" \
|
||||
"$INSTDIR\doc\Yap\README.TXT" 0 \
|
||||
"$INSTDIR\share\doc\Yap\README" "" \
|
||||
"$INSTDIR\share\doc\Yap\README" 0 \
|
||||
"SW_SHOWNORMAL" "" "View readme"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual Html.lnk" \
|
||||
"$INSTDIR\doc\Yap\yap.html" "" \
|
||||
"$INSTDIR\doc\Yap\yap.html" 0 \
|
||||
"$INSTDIR\share\doc\Yap\yap.html" "" \
|
||||
"$INSTDIR\share\doc\Yap\yap.html" 0 \
|
||||
"SW_SHOWNORMAL" "" "View readme"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual PDF.lnk" \
|
||||
"$INSTDIR\doc\Yap\yap.pdf" "" \
|
||||
"$INSTDIR\doc\Yap\yap.pdf" 0 \
|
||||
"$INSTDIR\share\doc\Yap\yap.pdf" "" \
|
||||
"$INSTDIR\share\doc\Yap\yap.pdf" 0 \
|
||||
"SW_SHOWNORMAL" "" "View readme"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Uninstall.lnk" \
|
||||
"$INSTDIR\uninstall.exe" \
|
||||
@ -113,6 +133,7 @@ Section "Start Menu shortcuts"
|
||||
"$INSTDIR\uninstall.exe" \
|
||||
0
|
||||
|
||||
WriteRegStr HKLM ${REGKEY} fileExtension ${EXT}
|
||||
WriteRegStr HKLM ${REGKEY} group ${GRP}
|
||||
WriteRegStr HKLM ${REGKEY} cwd ${CWD}
|
||||
WriteRegStr HKLM ${REGKEY} context ${SHCTX}
|
||||
@ -122,23 +143,46 @@ SectionEnd
|
||||
# The uninstaller
|
||||
################################################################
|
||||
|
||||
UninstallText "This will uninstall YAP. Hit Uninstall to continue."
|
||||
!ifdef WIN64
|
||||
UninstallText "This will uninstall YAP64. Hit Uninstall to continue."
|
||||
!else
|
||||
UninstallText "This will uninstall YAP. Hit Uninstall to continue."
|
||||
!endif
|
||||
|
||||
Section "Uninstall"
|
||||
ReadRegStr ${EXT} HKLM Software\YAP\Prolog fileExtension
|
||||
ReadRegStr ${GRP} HKLM Software\YAP\Prolog group
|
||||
ReadRegStr ${SHCTX} HKLM Software\YAP\Prolog context
|
||||
!ifdef WIN64
|
||||
SetRegView 64
|
||||
!endif
|
||||
|
||||
ReadRegStr ${EXT} HKLM ${REGKEY} fileExtension
|
||||
StrCmp ${EXT} "" 0 UExt
|
||||
StrCpy ${EXT} "pl"
|
||||
UExt:
|
||||
|
||||
ReadRegStr ${GRP} HKLM ${REGKEY} group
|
||||
StrCmp ${GRP} "" 0 UHasGroup
|
||||
!ifdef WIN64
|
||||
StrCpy ${GRP} "YAP64"
|
||||
!else
|
||||
StrCpy ${GRP} "YAP"
|
||||
!endif
|
||||
UHasGroup:
|
||||
|
||||
ReadRegStr ${SHCTX} HKLM ${REGKEY} context
|
||||
StrCmp ${SHCTX} "" 0 UHasContext
|
||||
StrCpy ${SHCTX} "all"
|
||||
UHasContext:
|
||||
|
||||
StrCmp ${SHCTX} "all" 0 +2
|
||||
SetShellVarContext all
|
||||
|
||||
MessageBox MB_YESNO "Delete the following components?$\r$\n \
|
||||
MessageBox MB_YESNO "Delete the following components?\r$\n \
|
||||
Install dir: $INSTDIR$\r$\n \
|
||||
Extension: ${EXT}$\r$\n \
|
||||
Program Group ${GRP}" \
|
||||
IDNO Done
|
||||
|
||||
StrCmp ".${EXT}" "" NoExt
|
||||
StrCmp "${EXT}" "" NoExt
|
||||
ReadRegStr $1 HKCR .${EXT} ""
|
||||
StrCmp $1 "PrologFile" 0 NoOwn ; only do this if we own it
|
||||
ReadRegStr $1 HKCR .${EXT} "backup_val"
|
||||
@ -164,7 +208,12 @@ Section "Uninstall"
|
||||
MessageBox MB_OK "Folder $INSTDIR doesn't seem to contain Prolog"
|
||||
|
||||
Done:
|
||||
!ifdef WIN64
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64"
|
||||
!else
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP"
|
||||
!endif
|
||||
|
||||
DeleteRegKey HKLM ${REGKEY}
|
||||
SectionEnd
|
||||
|
||||
@ -178,7 +227,7 @@ Function .onInit
|
||||
;$PLUGINSDIR will automatically be removed when the installer closes
|
||||
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\options.ini "options.ini"
|
||||
File /oname=$PLUGINSDIR\options.ini "${OPTIONS}"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
@ -193,6 +242,9 @@ FunctionEnd
|
||||
################################################################
|
||||
|
||||
Function SetCustom
|
||||
!ifdef WIN64
|
||||
SetRegView 64
|
||||
!endif
|
||||
# Basic system info
|
||||
Call UserInfo
|
||||
|
||||
@ -203,10 +255,16 @@ Function SetCustom
|
||||
HasExt:
|
||||
WriteINIStr $PLUGINSDIR\options.ini "Field 4" "State" ${EXT}
|
||||
|
||||
StrCpy ${CWD} $INSTDIR
|
||||
|
||||
# Startmenu program group
|
||||
ReadRegStr ${GRP} HKLM ${REGKEY} group
|
||||
StrCmp ${GRP} "" 0 HasGroup
|
||||
!ifdef WIN64
|
||||
StrCpy ${GRP} "YAP64"
|
||||
!else
|
||||
StrCpy ${GRP} "YAP"
|
||||
!endif
|
||||
HasGroup:
|
||||
WriteINIStr $PLUGINSDIR\options.ini "Field 6" "State" ${GRP}
|
||||
|
||||
@ -219,6 +277,8 @@ Function SetCustom
|
||||
# Get the results
|
||||
ReadINIStr ${EXT} $PLUGINSDIR\options.ini "Field 4" "State"
|
||||
ReadINIStr ${GRP} $PLUGINSDIR\options.ini "Field 6" "State"
|
||||
ReadINIStr ${GRP} $PLUGINSDIR\options.ini "Field 5" "State"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function UserInfo
|
||||
@ -258,7 +318,7 @@ FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
||||
MessageBox MB_YESNO "Installation complete. View readme?" IDNO NoReadme
|
||||
ExecShell "open" "$INSTDIR\doc\README.TXT"
|
||||
ExecShell "open" "$INSTDIR\share\doc\Yap\README"
|
||||
NoReadme:
|
||||
FunctionEnd
|
||||
|
||||
@ -268,4 +328,4 @@ Function .onInstFailed
|
||||
installer, please contact yap-users@sf.net"
|
||||
FunctionEnd
|
||||
|
||||
outfile "yap-6.3.4-installer.exe"
|
||||
outfile "${OUT_DIR}\yap${ABI}-${VERSION}-installer.exe"
|
||||
|
277
misc/yap64.nsi
277
misc/yap64.nsi
@ -1,277 +0,0 @@
|
||||
; YAP install-script (based on a similar scrip from SWI-Prolog)
|
||||
|
||||
!define TEMP1 $R0 ; Temp variable
|
||||
!define EXT $3 ; Filename extension for Prolog sources
|
||||
!define CWD $4 ; Working directory for startmenu shortcut
|
||||
!define GRP $5 ; Startmenu group
|
||||
!define SHCTX $6 ; Shell context (current/all)
|
||||
!define ARCH $7 ; Architecture (x86, ia64 or amd64)
|
||||
!define REGKEY SOFTWARE\YAP\Prolog64
|
||||
|
||||
RequestExecutionLevel admin
|
||||
SetCompressor bzip2
|
||||
MiscButtonText "<back" "next>" "abort" "finished"
|
||||
|
||||
; Preload files that are needed by the installer itself
|
||||
ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
|
||||
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
||||
ReserveFile "options.ini"
|
||||
|
||||
|
||||
InstallDir $PROGRAMFILES64\Yap64
|
||||
InstallDirRegKey HKLM ${REGKEY} "home"
|
||||
ComponentText "This will install YAP64 on your computer."
|
||||
DirText "This program will install YAP64 on your computer.\
|
||||
Choose a directory"
|
||||
|
||||
Icon c:\Yap64\share\Yap\icons\yap.ico
|
||||
LicenseData c:\Yap64\share\doc\Yap\Artistic
|
||||
LicenseText "YAP64 is governed by the Artistic License and LGPL;\
|
||||
it includes code under the GPL and LGPL."
|
||||
|
||||
InstType "Typical (all except debug symbols)" # 1
|
||||
InstType "Minimal (no graphics)" # 2
|
||||
InstType "Full" # 3
|
||||
|
||||
Page license
|
||||
Page directory
|
||||
Page custom SetCustom "" ": Installation options"
|
||||
Page instfiles
|
||||
|
||||
Section "Base system (required)"
|
||||
SectionIn RO # do not allow to delete this
|
||||
; make sure we use 64 bits registry
|
||||
SetRegView 64
|
||||
|
||||
Delete $INSTDIR\bin\*.pdb
|
||||
|
||||
SetOutPath $INSTDIR\bin
|
||||
File c:\Yap64\bin\yap.exe
|
||||
File c:\Yap64\bin\yap.dll
|
||||
File c:\Yap64\bin\yap-win.exe
|
||||
File c:\Yap64\bin\*.dll
|
||||
|
||||
; first, copy library DLLs
|
||||
SetOutPath $INSTDIR\lib\Yap
|
||||
; SYSTEM STUFF
|
||||
File c:\Yap64\lib\Yap\*.dll
|
||||
|
||||
SetOutPath $INSTDIR\lib\Yap
|
||||
; SYSTEM STUFF
|
||||
File c:\Yap64\lib\Yap\startup.yss
|
||||
|
||||
SetOutPath $INSTDIR\share\Yap
|
||||
; SYSTEM STUFF
|
||||
File /r c:\Yap64\share\Yap\*
|
||||
|
||||
SetOutPath $INSTDIR\share\doc\Yap
|
||||
File c:\Yap64\share\doc\Yap\yap.html
|
||||
File c:\Yap64\share\doc\Yap\yap.pdf
|
||||
File c:\Yap64\share\doc\Yap\yap.html
|
||||
; File c:\Yap64\share\doc\Yap\yap.info
|
||||
File c:\Yap64\share\doc\Yap\Artistic
|
||||
File c:\Yap64\share\doc\Yap\README.TXT
|
||||
File c:\Yap64\share\doc\Yap\COPYING.TXT
|
||||
|
||||
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
||||
WriteRegStr HKLM ${REGKEY} "bin" "$INSTDIR\bin\yap.exe"
|
||||
WriteRegStr HKLM ${REGKEY} "dlls" "$INSTDIR\lib\Yap"
|
||||
WriteRegStr HKLM ${REGKEY} "startup" "$INSTDIR\lib\Yap\startup.yss"
|
||||
WriteRegStr HKLM ${REGKEY} "library" "$INSTDIR\share\Yap"
|
||||
WriteRegStr HKLM ${REGKEY} "commons" "$INSTDIR\share\PrologCommons"
|
||||
|
||||
; Write uninstaller
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64" "DisplayName" "YAP64 (remove only)"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteUninstaller "uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
|
||||
Section "Start Menu shortcuts"
|
||||
SectionIn 1 2 3
|
||||
SetOutPath ${CWD}
|
||||
CreateDirectory "$SMPROGRAMS\${GRP}"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\YAP-WIN.lnk" \
|
||||
"$INSTDIR\bin\yap-win.exe" \
|
||||
"" \
|
||||
"$INSTDIR\bin\yap-win.exe" \
|
||||
0
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\YAP.lnk" \
|
||||
"$INSTDIR\bin\yap.exe" \
|
||||
"" \
|
||||
"$INSTDIR\bin\yap.exe" \
|
||||
0
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Readme.lnk" \
|
||||
"$INSTDIR\share\doc\Yap\README.TXT" "" \
|
||||
"$INSTDIR\share\doc\Yap\README.TXT" 0 \
|
||||
"SW_SHOWNORMAL" "" "View readme"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual Html.lnk" \
|
||||
"$INSTDIR\share\doc\Yap\yap.html" "" \
|
||||
"$INSTDIR\share\doc\Yap\yap.html" 0 \
|
||||
"SW_SHOWNORMAL" "" "View readme"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual PDF.lnk" \
|
||||
"$INSTDIR\share\doc\Yap\yap.pdf" "" \
|
||||
"$INSTDIR\share\doc\Yap\yap.pdf" 0 \
|
||||
"SW_SHOWNORMAL" "" "View readme"
|
||||
CreateShortCut "$SMPROGRAMS\${GRP}\Uninstall.lnk" \
|
||||
"$INSTDIR\uninstall.exe" \
|
||||
"" \
|
||||
"$INSTDIR\uninstall.exe" \
|
||||
0
|
||||
|
||||
WriteRegStr HKLM ${REGKEY} group ${GRP}
|
||||
WriteRegStr HKLM ${REGKEY} cwd ${CWD}
|
||||
WriteRegStr HKLM ${REGKEY} context ${SHCTX}
|
||||
SectionEnd
|
||||
|
||||
################################################################
|
||||
# The uninstaller
|
||||
################################################################
|
||||
|
||||
UninstallText "This will uninstall YAP.64 Hit Uninstall to continue."
|
||||
|
||||
Section "Uninstall"
|
||||
ReadRegStr ${EXT} HKLM Software\YAP\Prolog64 fileExtension
|
||||
ReadRegStr ${GRP} HKLM Software\YAP\Prolog64 group
|
||||
ReadRegStr ${SHCTX} HKLM Software\YAP\Prolog64 context
|
||||
|
||||
StrCmp ${SHCTX} "all" 0 +2
|
||||
SetShellVarContext all
|
||||
|
||||
MessageBox MB_YESNO "Delete the following components?$\r$\n \
|
||||
Install dir: $INSTDIR$\r$\n \
|
||||
Extension: ${EXT}$\r$\n \
|
||||
Program Group ${GRP}" \
|
||||
IDNO Done
|
||||
|
||||
StrCmp ".${EXT}" "" NoExt
|
||||
ReadRegStr $1 HKCR .${EXT} ""
|
||||
StrCmp $1 "PrologFile" 0 NoOwn ; only do this if we own it
|
||||
ReadRegStr $1 HKCR .${EXT} "backup_val"
|
||||
StrCmp $1 "" 0 RestoreBackup ; if backup == "" then delete the whole key
|
||||
DeleteRegKey HKCR .${EXT}
|
||||
Goto NoOwn
|
||||
RestoreBackup:
|
||||
WriteRegStr HKCR .${EXT} "" $1
|
||||
DeleteRegValue HKCR .${EXT} "backup_val"
|
||||
NoOwn:
|
||||
NoExt:
|
||||
|
||||
StrCmp "${GRP}" "" NoGrp
|
||||
MessageBox MB_OK "Deleting $SMPROGRAMS\${GRP}"
|
||||
RMDir /r "$SMPROGRAMS\${GRP}"
|
||||
NoGrp:
|
||||
|
||||
IfFileExists "$INSTDIR\bin\yap.exe" 0 NoDir
|
||||
RMDir /r "$INSTDIR"
|
||||
goto Done
|
||||
|
||||
NoDir:
|
||||
MessageBox MB_OK "Folder $INSTDIR doesn't seem to contain Prolog"
|
||||
|
||||
Done:
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64"
|
||||
DeleteRegKey HKLM ${REGKEY}
|
||||
SectionEnd
|
||||
|
||||
################################################################
|
||||
# FUNCTIONS
|
||||
################################################################
|
||||
|
||||
Function .onInit
|
||||
|
||||
;Extract InstallOptions files
|
||||
;$PLUGINSDIR will automatically be removed when the installer closes
|
||||
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\options.ini "options.ini"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
################################################################
|
||||
# Handle customisation; Settings are maintained in
|
||||
#
|
||||
# HKLM ${REGKEY}
|
||||
#
|
||||
# Using the following mapping:
|
||||
#
|
||||
# ${EXT} fileExtension
|
||||
################################################################
|
||||
|
||||
Function SetCustom
|
||||
# Basic system info
|
||||
Call UserInfo
|
||||
|
||||
# Filename extension
|
||||
ReadRegStr ${EXT} HKLM ${REGKEY} fileExtension
|
||||
StrCmp ${EXT} "" 0 HasExt
|
||||
StrCpy ${EXT} "pl"
|
||||
HasExt:
|
||||
WriteINIStr $PLUGINSDIR\options.ini "Field 4" "State" ${EXT}
|
||||
|
||||
# Startmenu program group
|
||||
ReadRegStr ${GRP} HKLM ${REGKEY} group
|
||||
StrCmp ${GRP} "" 0 HasGroup
|
||||
StrCpy ${GRP} "YAP64"
|
||||
HasGroup:
|
||||
WriteINIStr $PLUGINSDIR\options.ini "Field 6" "State" ${GRP}
|
||||
|
||||
# Start the dialog
|
||||
Push ${TEMP1}
|
||||
InstallOptions::dialog "$PLUGINSDIR\options.ini"
|
||||
Pop ${TEMP1}
|
||||
Pop ${TEMP1}
|
||||
|
||||
# Get the results
|
||||
ReadINIStr ${EXT} $PLUGINSDIR\options.ini "Field 4" "State"
|
||||
ReadINIStr ${GRP} $PLUGINSDIR\options.ini "Field 6" "State"
|
||||
FunctionEnd
|
||||
|
||||
Function UserInfo
|
||||
ClearErrors
|
||||
UserInfo::GetName
|
||||
IfErrors Win9x
|
||||
Pop $0
|
||||
UserInfo::GetAccountType
|
||||
Pop $1
|
||||
|
||||
StrCmp $1 "Admin" 0 +4
|
||||
SetShellVarContext all
|
||||
StrCpy ${SHCTX} "all"
|
||||
Goto done
|
||||
StrCmp $1 "Power" 0 +3
|
||||
StrCpy ${SHCTX} "all"
|
||||
Goto done
|
||||
StrCmp $1 "User" 0 +3
|
||||
StrCpy ${SHCTX} "current"
|
||||
Goto done
|
||||
StrCmp $1 "Guest" 0 +3
|
||||
StrCpy ${SHCTX} "current"
|
||||
Goto done
|
||||
StrCpy ${SHCTX} "current" # Unkown accounttype
|
||||
Goto done
|
||||
|
||||
Win9x:
|
||||
StrCpy ${SHCTX} "current"
|
||||
Goto end
|
||||
|
||||
done:
|
||||
StrCmp ${SHCTX} "all" 0 +2
|
||||
SetShellVarContext all
|
||||
|
||||
end:
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
||||
MessageBox MB_YESNO "Installation complete. View readme?" IDNO NoReadme
|
||||
ExecShell "open" "$INSTDIR\doc\README.TXT"
|
||||
NoReadme:
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstFailed
|
||||
MessageBox MB_OK "Installation failed.$\r$\n\
|
||||
If you cannot resolve the issue or it is a bug in the$\r$\n\
|
||||
installer, please contact yap-users@sf.net"
|
||||
FunctionEnd
|
||||
|
||||
outfile "yap64-6.3.4-installer.exe"
|
Reference in New Issue
Block a user