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
|
$(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-win.exe $(DESTDIR)$(BINDIR)/yap-win.exe
|
||||||
@WINDOWS@ $(INSTALL_PROGRAM) -m 755 yap.exe $(DESTDIR)$(BINDIR)/yap.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_DATA) $(srcdir)/misc/icons/yap.ico $(DESTDIR)$(SHAREDIR)/Yap/icons
|
||||||
|
|
||||||
install_library: @YAPLIB@
|
install_library: @YAPLIB@
|
||||||
|
26
configure
vendored
26
configure
vendored
@ -835,7 +835,6 @@ ac_subst_files=''
|
|||||||
ac_user_opts='
|
ac_user_opts='
|
||||||
enable_option_checking
|
enable_option_checking
|
||||||
enable_tabling
|
enable_tabling
|
||||||
enable_abi
|
|
||||||
enable_or_parallelism
|
enable_or_parallelism
|
||||||
enable_depth_limit
|
enable_depth_limit
|
||||||
enable_wam_profile
|
enable_wam_profile
|
||||||
@ -1512,7 +1511,6 @@ Optional Features:
|
|||||||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||||
--enable-tabling support tabling
|
--enable-tabling support tabling
|
||||||
--enable-abi support tabling
|
|
||||||
--enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads
|
--enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads
|
||||||
--enable-depth-limit support depth-bound computation
|
--enable-depth-limit support depth-bound computation
|
||||||
--enable-wam-profile support low level profiling of abstract machine
|
--enable-wam-profile support low level profiling of abstract machine
|
||||||
@ -4209,15 +4207,6 @@ else
|
|||||||
tabling=yes
|
tabling=yes
|
||||||
fi
|
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.
|
# Check whether --enable-or-parallelism was given.
|
||||||
if test "${enable_or_parallelism+set}" = set; then :
|
if test "${enable_or_parallelism+set}" = set; then :
|
||||||
enableval=$enable_or_parallelism; orparallelism="$enableval"
|
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 MinTrailSpace (256*SIZEOF_INT_P)" >>confdefs.h
|
||||||
|
|
||||||
$as_echo "#define MAX_WORKERS 1" >>confdefs.h
|
if test "$orparallelism" = yes
|
||||||
|
|
||||||
if test "$orparallelism" = no
|
|
||||||
then
|
then
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
@ -4574,6 +4561,9 @@ _ACEOF
|
|||||||
then
|
then
|
||||||
threads="yes"
|
threads="yes"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
$as_echo "#define MAX_WORKERS 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -12175,7 +12165,7 @@ else
|
|||||||
JAVA_TEST=Test.java
|
JAVA_TEST=Test.java
|
||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* #line 12178 "configure" */
|
/* #line 12168 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -12351,7 +12341,7 @@ EOF
|
|||||||
if uudecode$EXEEXT Test.uue; then
|
if uudecode$EXEEXT Test.uue; then
|
||||||
ac_cv_prog_uudecode_base64=yes
|
ac_cv_prog_uudecode_base64=yes
|
||||||
else
|
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
|
echo "configure: failed file was:" >&5
|
||||||
cat Test.uue >&5
|
cat Test.uue >&5
|
||||||
ac_cv_prog_uudecode_base64=no
|
ac_cv_prog_uudecode_base64=no
|
||||||
@ -12482,7 +12472,7 @@ else
|
|||||||
JAVA_TEST=Test.java
|
JAVA_TEST=Test.java
|
||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* #line 12485 "configure" */
|
/* #line 12475 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
@ -12517,7 +12507,7 @@ JAVA_TEST=Test.java
|
|||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
TEST=Test
|
TEST=Test
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* [#]line 12520 "configure" */
|
/* [#]line 12510 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void main (String args[]) {
|
public static void main (String args[]) {
|
||||||
System.exit (0);
|
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,
|
AC_ARG_ENABLE(tabling,
|
||||||
[ --enable-tabling support tabling ],
|
[ --enable-tabling support tabling ],
|
||||||
tabling="$enableval", tabling=yes)
|
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,
|
AC_ARG_ENABLE(or-parallelism,
|
||||||
[ --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads ],
|
[ --enable-or-parallelism support or-parallelism as: copy,sba,a-cow,threads ],
|
||||||
orparallelism="$enableval", orparallelism=no)
|
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(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(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(MinTrailSpace,(256*SIZEOF_INT_P), [at least 1/2M Cells for Trail])
|
||||||
AC_DEFINE(MAX_WORKERS,1)
|
if test "$orparallelism" = yes
|
||||||
if test "$orparallelism" = no
|
|
||||||
then
|
then
|
||||||
AC_DEFINE_UNQUOTED(MAX_WORKERS,$yap_cv_max_workers,[maximum amount of or-parallelism])
|
AC_DEFINE_UNQUOTED(MAX_WORKERS,$yap_cv_max_workers,[maximum amount of or-parallelism])
|
||||||
if test "$orparallelism" = copy -o "$orparallelism" = yes
|
if test "$orparallelism" = copy -o "$orparallelism" = yes
|
||||||
@ -325,6 +319,8 @@ then
|
|||||||
then
|
then
|
||||||
threads="yes"
|
threads="yes"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
AC_DEFINE(MAX_WORKERS,1)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(DefHeapSpace,$yap_cv_heap_space, [Default Heap Space.])
|
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
|
THREADS=yes
|
||||||
if test $# = 0; then
|
if test $# = 0; then
|
||||||
ABI=64
|
ABI=64
|
||||||
@ -9,8 +20,21 @@ else
|
|||||||
THREADS=$2
|
THREADS=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# debugging setup
|
||||||
|
do_compile=true
|
||||||
|
do_install=true
|
||||||
|
|
||||||
# HOME WIN64 configuration
|
# 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
|
CUDD=yes
|
||||||
GECODE=no #does not link with mingw64, VC++ trouble
|
GECODE=no #does not link with mingw64, VC++ trouble
|
||||||
GMP=yes
|
GMP=yes
|
||||||
@ -18,13 +42,7 @@ JAVA=yes
|
|||||||
PYTHON=no
|
PYTHON=no
|
||||||
REAL=yes
|
REAL=yes
|
||||||
HOST="--host=x86_64-w64-mingw32"
|
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
|
# 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"
|
||||||
@ -42,7 +60,8 @@ fi
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# HOME WIN32 configuration
|
# 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
|
CUDD=yes
|
||||||
GECODE=no # install only allows one of 32 or 64 bits
|
GECODE=no # install only allows one of 32 or 64 bits
|
||||||
GMP=yes
|
GMP=yes
|
||||||
@ -50,7 +69,6 @@ JAVA=yes
|
|||||||
PYTHON=no
|
PYTHON=no
|
||||||
REAL=yes
|
REAL=yes
|
||||||
|
|
||||||
GCC_PATH="/c/cygwin/Yap/mingw64"
|
|
||||||
PYTHON_PATH="/c/Python27"
|
PYTHON_PATH="/c/Python27"
|
||||||
export PATH="$GCC_PATH"/bin:$PATH:"$PYTHON_PATH"
|
export PATH="$GCC_PATH"/bin:$PATH:"$PYTHON_PATH"
|
||||||
# GECODE_PATH="/c/Program Files/Gecode"
|
# GECODE_PATH="/c/Program Files/Gecode"
|
||||||
@ -59,10 +77,11 @@ REAL=yes
|
|||||||
JAVA_PATH="/c/Program Files (x86)/Java/jdk1.7.0_51"
|
JAVA_PATH="/c/Program Files (x86)/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"
|
||||||
R_ABI=i386
|
R_ABI=i386
|
||||||
HOST="--enable-abi=32"
|
HOST=""
|
||||||
|
|
||||||
if test $THREADS = yes
|
if test $THREADS = yes
|
||||||
then
|
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
|
cp libwinpthread-1.dll pthreadGC2.dll
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -92,6 +111,7 @@ then
|
|||||||
export PATH="$PATH":"$R_PATH"/bin/"$R_ABI"
|
export PATH="$PATH":"$R_PATH"/bin/"$R_ABI"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$do_compile" = true; then
|
||||||
../yap-6.3/configure $HOST \
|
../yap-6.3/configure $HOST \
|
||||||
--with-R="$REAL" \
|
--with-R="$REAL" \
|
||||||
--with-java="$JAVA" \
|
--with-java="$JAVA" \
|
||||||
@ -102,10 +122,15 @@ fi
|
|||||||
--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 install
|
||||||
cp /z/Yap/bins/osx/*html /c/Yap64/share/doc/Yap
|
fi
|
||||||
cp /z/Yap/bins/osx/*pdf /c/Yap64/share/doc/Yap
|
if test "$do_install" = true; then
|
||||||
if test $ABI = 64; then
|
if test $ABI = 64; then
|
||||||
"/c/Program Files (x86)/NSIS/makensis" ../yap-6.3/misc/Yap64.nsi
|
cp $DOCS_DIR/*html /c/Yap64/share/doc/Yap
|
||||||
else
|
cp $DOCS_DIR/*pdf /c/Yap64/share/doc/Yap
|
||||||
"/c/Program Files (x86)/NSIS/makensis" ../yap-6.3/misc/Yap.nsi
|
"/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
|
fi
|
||||||
|
168
misc/yap.nsi
168
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 TEMP1 $R0 ; Temp variable
|
||||||
!define EXT $3 ; Filename extension for Prolog sources
|
!define EXT $3 ; Filename extension for Prolog sources
|
||||||
@ -7,31 +7,31 @@
|
|||||||
!define SHCTX $6 ; Shell context (current/all)
|
!define SHCTX $6 ; Shell context (current/all)
|
||||||
!define ARCH $7 ; Architecture (x86, ia64 or amd64)
|
!define ARCH $7 ; Architecture (x86, ia64 or amd64)
|
||||||
|
|
||||||
!ifdef WIN64
|
|
||||||
!define REGKEY SOFTWARE\YAP\Prolog64
|
|
||||||
!else
|
|
||||||
!define REGKEY SOFTWARE\YAP\Prolog
|
|
||||||
!endif
|
|
||||||
|
|
||||||
|
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
SetCompressor bzip2
|
|
||||||
MiscButtonText "<back" "next>" "abort" "finished"
|
MiscButtonText "<back" "next>" "abort" "finished"
|
||||||
|
|
||||||
# Preload files that are needed by the installer itself
|
SetCompressor /FINAL bzip2
|
||||||
ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
|
|
||||||
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
|
|
||||||
ReserveFile "options.ini"
|
|
||||||
|
|
||||||
InstallDir $PROGRAMFILES\Yap
|
; 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}"
|
||||||
|
|
||||||
|
!ifdef WIN64
|
||||||
|
InstallDir "$PROGRAMFILES64\${ROOTDIR}"
|
||||||
|
!else
|
||||||
|
InstallDir "$PROGRAMFILES\${ROOTDIR}"
|
||||||
|
!endif
|
||||||
InstallDirRegKey HKLM ${REGKEY} "home"
|
InstallDirRegKey HKLM ${REGKEY} "home"
|
||||||
|
|
||||||
ComponentText "This will install YAP on your computer."
|
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"
|
||||||
|
|
||||||
LicenseData c:\Yap\share\doc\Yap\Artistic
|
Icon c:\${ROOTDIR}\share\Yap\icons\yap.ico
|
||||||
LicenseText "YAP is governed by the Artistic License,\
|
LicenseData c:\${ROOTDIR}\share\doc\Yap\Artistic
|
||||||
but includes code under the GPL and LGPL."
|
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 "Typical (all except debug symbols)" # 1
|
||||||
InstType "Minimal (no graphics)" # 2
|
InstType "Minimal (no graphics)" # 2
|
||||||
@ -43,44 +43,55 @@ Page custom SetCustom "" ": Installation options"
|
|||||||
Page instfiles
|
Page instfiles
|
||||||
|
|
||||||
Section "Base system (required)"
|
Section "Base system (required)"
|
||||||
|
|
||||||
SectionIn RO # do not allow to delete this
|
SectionIn RO # do not allow to delete this
|
||||||
|
|
||||||
|
!ifdef WIN64
|
||||||
|
SetRegView 64
|
||||||
|
!endif
|
||||||
|
|
||||||
Delete $INSTDIR\bin\*.pdb
|
Delete $INSTDIR\bin\*.pdb
|
||||||
|
|
||||||
SetOutPath $INSTDIR\bin
|
SetOutPath $INSTDIR\bin
|
||||||
File c:\Yap\bin\yap.exe
|
File c:\${ROOTDIR}\bin\yap.exe
|
||||||
File c:\Yap\bin\yap.dll
|
File c:\${ROOTDIR}\bin\yap.dll
|
||||||
File c:\Yap\bin\yap-win.exe
|
File c:\${ROOTDIR}\bin\yap-win.exe
|
||||||
File c:\Yap\bin\plterm.dll
|
File c:\${ROOTDIR}\bin\*.dll
|
||||||
|
|
||||||
SetOutPath $INSTDIR\bin
|
; first, copy library DLLs
|
||||||
|
SetOutPath $INSTDIR\lib\Yap
|
||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File c:\Yap\lib\Yap\*.dll
|
File c:\${ROOTDIR}\lib\Yap\*.dll
|
||||||
|
|
||||||
SetOutPath $INSTDIR\lib
|
SetOutPath $INSTDIR\lib\Yap
|
||||||
|
|
||||||
SetOutPath $INSTDIR\lib
|
|
||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File c:\Yap\lib\Yap\startup.yss
|
File c:\${ROOTDIR}\lib\Yap\startup.yss
|
||||||
|
|
||||||
SetOutPath $INSTDIR\share
|
SetOutPath $INSTDIR\share\Yap
|
||||||
; SYSTEM STUFF
|
; SYSTEM STUFF
|
||||||
File /r c:\Yap\share\Yap\*
|
File /r c:\${ROOTDIR}\share\Yap\*
|
||||||
|
|
||||||
SetOutPath $INSTDIR\doc\Yap
|
SetOutPath $INSTDIR\share\doc\Yap
|
||||||
File c:\Yap\share\doc\Yap\yap.html
|
File c:\${ROOTDIR}\share\doc\Yap\yap.html
|
||||||
File c:\Yap\share\doc\Yap\yap.pdf
|
File c:\${ROOTDIR}\share\doc\Yap\yap.pdf
|
||||||
File c:\Yap\share\doc\Yap\Artistic
|
; File c:\${ROOTDIR}\share\doc\Yap\yap.info
|
||||||
File c:\Yap\share\doc\Yap\README.TXT
|
File c:\${ROOTDIR}\share\doc\Yap\Artistic
|
||||||
File c:\Yap\share\doc\Yap\COPYING.TXT
|
File c:\${ROOTDIR}\share\doc\Yap\README
|
||||||
|
File c:\${ROOTDIR}\share\doc\Yap\COPYING
|
||||||
|
|
||||||
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
WriteRegStr HKLM ${REGKEY} "home" "$INSTDIR"
|
||||||
WriteRegStr HKLM ${REGKEY} "startup" "$INSTDIR\lib\startup.yss"
|
WriteRegStr HKLM ${REGKEY} "bin" "$INSTDIR\bin\yap.exe"
|
||||||
WriteRegStr HKLM ${REGKEY} "library" "$INSTDIR\share"
|
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
|
; 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" "DisplayName" "YAP (remove only)"
|
||||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
!endif
|
||||||
WriteUninstaller "uninstall.exe"
|
WriteUninstaller "uninstall.exe"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@ -88,24 +99,33 @@ SectionEnd
|
|||||||
Section "Start Menu shortcuts"
|
Section "Start Menu shortcuts"
|
||||||
SectionIn 1 2 3
|
SectionIn 1 2 3
|
||||||
SetOutPath ${CWD}
|
SetOutPath ${CWD}
|
||||||
|
!ifdef WIN64
|
||||||
|
StrCpy ${GRP} "YAP64"
|
||||||
|
!else
|
||||||
|
StrCpy ${GRP} "YAP"
|
||||||
|
!endif
|
||||||
CreateDirectory "$SMPROGRAMS\${GRP}"
|
CreateDirectory "$SMPROGRAMS\${GRP}"
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\YAP-WIN.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\YAP-WIN.lnk" \
|
||||||
"$INSTDIR\bin\yap-win.exe" \
|
"$INSTDIR\bin\yap-win.exe" \
|
||||||
"" \
|
"" \
|
||||||
"$INSTDIR\bin\yap-win.exe" \
|
"$INSTDIR\bin\yap-win.exe" \
|
||||||
0
|
0
|
||||||
SetOutPath $INSTDIR
|
CreateShortCut "$SMPROGRAMS\${GRP}\YAP.lnk" \
|
||||||
|
"$INSTDIR\bin\yap.exe" \
|
||||||
|
"" \
|
||||||
|
"$INSTDIR\bin\yap.exe" \
|
||||||
|
0
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Readme.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\Readme.lnk" \
|
||||||
"$INSTDIR\doc\Yap\README.TXT" "" \
|
"$INSTDIR\share\doc\Yap\README" "" \
|
||||||
"$INSTDIR\doc\Yap\README.TXT" 0 \
|
"$INSTDIR\share\doc\Yap\README" 0 \
|
||||||
"SW_SHOWNORMAL" "" "View readme"
|
"SW_SHOWNORMAL" "" "View readme"
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual Html.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\Manual Html.lnk" \
|
||||||
"$INSTDIR\doc\Yap\yap.html" "" \
|
"$INSTDIR\share\doc\Yap\yap.html" "" \
|
||||||
"$INSTDIR\doc\Yap\yap.html" 0 \
|
"$INSTDIR\share\doc\Yap\yap.html" 0 \
|
||||||
"SW_SHOWNORMAL" "" "View readme"
|
"SW_SHOWNORMAL" "" "View readme"
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Manual PDF.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\Manual PDF.lnk" \
|
||||||
"$INSTDIR\doc\Yap\yap.pdf" "" \
|
"$INSTDIR\share\doc\Yap\yap.pdf" "" \
|
||||||
"$INSTDIR\doc\Yap\yap.pdf" 0 \
|
"$INSTDIR\share\doc\Yap\yap.pdf" 0 \
|
||||||
"SW_SHOWNORMAL" "" "View readme"
|
"SW_SHOWNORMAL" "" "View readme"
|
||||||
CreateShortCut "$SMPROGRAMS\${GRP}\Uninstall.lnk" \
|
CreateShortCut "$SMPROGRAMS\${GRP}\Uninstall.lnk" \
|
||||||
"$INSTDIR\uninstall.exe" \
|
"$INSTDIR\uninstall.exe" \
|
||||||
@ -113,6 +133,7 @@ Section "Start Menu shortcuts"
|
|||||||
"$INSTDIR\uninstall.exe" \
|
"$INSTDIR\uninstall.exe" \
|
||||||
0
|
0
|
||||||
|
|
||||||
|
WriteRegStr HKLM ${REGKEY} fileExtension ${EXT}
|
||||||
WriteRegStr HKLM ${REGKEY} group ${GRP}
|
WriteRegStr HKLM ${REGKEY} group ${GRP}
|
||||||
WriteRegStr HKLM ${REGKEY} cwd ${CWD}
|
WriteRegStr HKLM ${REGKEY} cwd ${CWD}
|
||||||
WriteRegStr HKLM ${REGKEY} context ${SHCTX}
|
WriteRegStr HKLM ${REGKEY} context ${SHCTX}
|
||||||
@ -122,23 +143,46 @@ SectionEnd
|
|||||||
# The uninstaller
|
# 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"
|
Section "Uninstall"
|
||||||
ReadRegStr ${EXT} HKLM Software\YAP\Prolog fileExtension
|
!ifdef WIN64
|
||||||
ReadRegStr ${GRP} HKLM Software\YAP\Prolog group
|
SetRegView 64
|
||||||
ReadRegStr ${SHCTX} HKLM Software\YAP\Prolog context
|
!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
|
StrCmp ${SHCTX} "all" 0 +2
|
||||||
SetShellVarContext all
|
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 \
|
Install dir: $INSTDIR$\r$\n \
|
||||||
Extension: ${EXT}$\r$\n \
|
Extension: ${EXT}$\r$\n \
|
||||||
Program Group ${GRP}" \
|
Program Group ${GRP}" \
|
||||||
IDNO Done
|
IDNO Done
|
||||||
|
|
||||||
StrCmp ".${EXT}" "" NoExt
|
StrCmp "${EXT}" "" NoExt
|
||||||
ReadRegStr $1 HKCR .${EXT} ""
|
ReadRegStr $1 HKCR .${EXT} ""
|
||||||
StrCmp $1 "PrologFile" 0 NoOwn ; only do this if we own it
|
StrCmp $1 "PrologFile" 0 NoOwn ; only do this if we own it
|
||||||
ReadRegStr $1 HKCR .${EXT} "backup_val"
|
ReadRegStr $1 HKCR .${EXT} "backup_val"
|
||||||
@ -164,7 +208,12 @@ Section "Uninstall"
|
|||||||
MessageBox MB_OK "Folder $INSTDIR doesn't seem to contain Prolog"
|
MessageBox MB_OK "Folder $INSTDIR doesn't seem to contain Prolog"
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
!ifdef WIN64
|
||||||
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP64"
|
||||||
|
!else
|
||||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP"
|
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAP"
|
||||||
|
!endif
|
||||||
|
|
||||||
DeleteRegKey HKLM ${REGKEY}
|
DeleteRegKey HKLM ${REGKEY}
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
@ -178,7 +227,7 @@ Function .onInit
|
|||||||
;$PLUGINSDIR will automatically be removed when the installer closes
|
;$PLUGINSDIR will automatically be removed when the installer closes
|
||||||
|
|
||||||
InitPluginsDir
|
InitPluginsDir
|
||||||
File /oname=$PLUGINSDIR\options.ini "options.ini"
|
File /oname=$PLUGINSDIR\options.ini "${OPTIONS}"
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@ -193,6 +242,9 @@ FunctionEnd
|
|||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
Function SetCustom
|
Function SetCustom
|
||||||
|
!ifdef WIN64
|
||||||
|
SetRegView 64
|
||||||
|
!endif
|
||||||
# Basic system info
|
# Basic system info
|
||||||
Call UserInfo
|
Call UserInfo
|
||||||
|
|
||||||
@ -203,10 +255,16 @@ Function SetCustom
|
|||||||
HasExt:
|
HasExt:
|
||||||
WriteINIStr $PLUGINSDIR\options.ini "Field 4" "State" ${EXT}
|
WriteINIStr $PLUGINSDIR\options.ini "Field 4" "State" ${EXT}
|
||||||
|
|
||||||
|
StrCpy ${CWD} $INSTDIR
|
||||||
|
|
||||||
# Startmenu program group
|
# Startmenu program group
|
||||||
ReadRegStr ${GRP} HKLM ${REGKEY} group
|
ReadRegStr ${GRP} HKLM ${REGKEY} group
|
||||||
StrCmp ${GRP} "" 0 HasGroup
|
StrCmp ${GRP} "" 0 HasGroup
|
||||||
|
!ifdef WIN64
|
||||||
|
StrCpy ${GRP} "YAP64"
|
||||||
|
!else
|
||||||
StrCpy ${GRP} "YAP"
|
StrCpy ${GRP} "YAP"
|
||||||
|
!endif
|
||||||
HasGroup:
|
HasGroup:
|
||||||
WriteINIStr $PLUGINSDIR\options.ini "Field 6" "State" ${GRP}
|
WriteINIStr $PLUGINSDIR\options.ini "Field 6" "State" ${GRP}
|
||||||
|
|
||||||
@ -219,6 +277,8 @@ Function SetCustom
|
|||||||
# Get the results
|
# Get the results
|
||||||
ReadINIStr ${EXT} $PLUGINSDIR\options.ini "Field 4" "State"
|
ReadINIStr ${EXT} $PLUGINSDIR\options.ini "Field 4" "State"
|
||||||
ReadINIStr ${GRP} $PLUGINSDIR\options.ini "Field 6" "State"
|
ReadINIStr ${GRP} $PLUGINSDIR\options.ini "Field 6" "State"
|
||||||
|
ReadINIStr ${GRP} $PLUGINSDIR\options.ini "Field 5" "State"
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function UserInfo
|
Function UserInfo
|
||||||
@ -258,7 +318,7 @@ FunctionEnd
|
|||||||
|
|
||||||
Function .onInstSuccess
|
Function .onInstSuccess
|
||||||
MessageBox MB_YESNO "Installation complete. View readme?" IDNO NoReadme
|
MessageBox MB_YESNO "Installation complete. View readme?" IDNO NoReadme
|
||||||
ExecShell "open" "$INSTDIR\doc\README.TXT"
|
ExecShell "open" "$INSTDIR\share\doc\Yap\README"
|
||||||
NoReadme:
|
NoReadme:
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@ -268,4 +328,4 @@ Function .onInstFailed
|
|||||||
installer, please contact yap-users@sf.net"
|
installer, please contact yap-users@sf.net"
|
||||||
FunctionEnd
|
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