Added 64-bit support to the NSIS installer script.

This commit is contained in:
Volker Ruppert 2019-12-13 22:25:50 +00:00
parent c117208bbf
commit f1cd051748
3 changed files with 54 additions and 31 deletions

View File

@ -23,8 +23,15 @@
!define MULTIUSER_EXECUTIONLEVEL Highest
!define MULTIUSER_MUI
!include MultiUser.nsh
;--------------------------------
;---------------------
;Include 64-bit support
!include "x64.nsh"
;--------------------------------
!define BITS @BOCHS_BITS@
!define VERSION @VERSION@
!define VER_MAJOR @VER_MAJOR@
!define VER_MINOR @VER_MINOR@
@ -60,7 +67,7 @@ Var IndependentSectionState
InstType "Full (with DLX Linux demo)"
;Folder-select dialog
InstallDir $PROGRAMFILES\Bochs-${VERSION}
InstallDir $PROGRAMFILES${BITS}\Bochs-${VERSION}
InstallDirRegKey HKLM "Software\Bochs" ""
;--------------------------------
@ -257,6 +264,7 @@ SectionEnd
Section -post
SetRegView ${BITS}
; Register Uninstaller
WriteRegStr HKLM "Software\Bochs" "" $INSTDIR
WriteRegDword HKLM "Software\Bochs" "VersionMajor" "${VER_MAJOR}"
@ -283,6 +291,8 @@ SectionEnd
Section "Uninstall"
SetRegView ${BITS}
ReadRegStr $1 HKCR ".bxrc" ""
StrCmp $1 "BochsConfigFile" 0 NoOwn ; only do this if we own it
@ -338,6 +348,12 @@ SectionEnd
Function .onInit
!insertmacro MULTIUSER_INIT
!if ${BITS} == 64
${IfNot} ${RunningX64}
MessageBox MB_ICONSTOP "This Bochs package does not run on 32-bit Windows"
Abort
${Endif}
!endif
# This is necessary otherwise SecDLXIcon won't be selectable for the first time you click it.
SectionGetFlags ${SecDLX} $R0
IntOp $R0 $R0 & ${SF_SELECTED}
@ -409,6 +425,7 @@ Var OldInstDir
Function PageReinstall
SetRegView ${BITS}
ReadRegStr $R0 HKLM "Software\Bochs 2.6.9" ""
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bochs 2.6.9" "UninstallString"
ReadRegStr $R2 HKLM "Software\Bochs" ""
@ -503,6 +520,7 @@ Function PageLeaveReinstall
StrCmp $R1 "1" reinst_done ; Same version, skip to add/reinstall components?
reinst_uninstall:
SetRegView ${BITS}
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bochs" "UninstallString"
${If} $R1 == ""
ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Bochs 2.6.9" "UninstallString"

61
bochs/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in 13632 2019-12-01 13:30:34Z vruppert .
# From configure.in Id: configure.in 13633 2019-12-01 17:32:40Z vruppert .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@ -781,6 +781,7 @@ GZIP
INSTALL_PLUGINS_VAR
WIN32_DLL_IMPORT_LIB
IODEV_DLL_TARGETS
BOCHS_BITS
GUI_DLL_TARGETS
EXT_MSVC_DLL_RULES
PLUGIN_TARGET_2
@ -3401,6 +3402,7 @@ if test "${ADD_FLAGS:+set}" = set; then
CXXFLAGS="$CXXFLAGS $ADD_FLAGS"
CPPFLAGS="$CPPFLAGS $ADD_FLAGS"
fi
BOCHS_BITS=$MSVC_TARGET
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard CFLAGS on this platform" >&5
$as_echo_n "checking for standard CFLAGS on this platform... " >&6; }
@ -5192,7 +5194,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5195 "configure"' > conftest.$ac_ext
echo '#line 5197 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -6880,11 +6882,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6883: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6885: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6887: \$? = $ac_status" >&5
echo "$as_me:6889: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -7113,11 +7115,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7116: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7118: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7120: \$? = $ac_status" >&5
echo "$as_me:7122: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -7180,11 +7182,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7183: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7185: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7187: \$? = $ac_status" >&5
echo "$as_me:7189: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -8970,7 +8972,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 8973 "configure"
#line 8975 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9068,7 +9070,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9071 "configure"
#line 9073 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11183,11 +11185,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11186: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11188: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11190: \$? = $ac_status" >&5
echo "$as_me:11192: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -11250,11 +11252,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11253: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11255: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11257: \$? = $ac_status" >&5
echo "$as_me:11259: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -12275,7 +12277,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 12278 "configure"
#line 12280 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12373,7 +12375,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 12376 "configure"
#line 12378 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -13196,11 +13198,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13199: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13201: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13203: \$? = $ac_status" >&5
echo "$as_me:13205: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -13263,11 +13265,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13266: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13268: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13270: \$? = $ac_status" >&5
echo "$as_me:13272: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -15228,11 +15230,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15231: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15233: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15235: \$? = $ac_status" >&5
echo "$as_me:15237: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -15461,11 +15463,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15464: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15466: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15468: \$? = $ac_status" >&5
echo "$as_me:15470: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@ -15528,11 +15530,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15531: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15533: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15535: \$? = $ac_status" >&5
echo "$as_me:15537: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -17318,7 +17320,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 17321 "configure"
#line 17323 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -17416,7 +17418,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 17419 "configure"
#line 17421 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -19103,7 +19105,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 19106 "configure"
#line 19108 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -26107,6 +26109,7 @@ if test ! -d build/win32/nsis; then mkdir build/win32/nsis; fi
# Extract the first word of "gzip", so it can be a program name with args.

View File

@ -91,6 +91,7 @@ if test "${ADD_FLAGS:+set}" = set; then
CXXFLAGS="$CXXFLAGS $ADD_FLAGS"
CPPFLAGS="$CPPFLAGS $ADD_FLAGS"
fi
BOCHS_BITS=$MSVC_TARGET
AC_MSG_CHECKING(for standard CFLAGS on this platform)
AC_MSG_RESULT($ADD_FLAGS)
@ -3265,6 +3266,7 @@ AC_SUBST(PLUGIN_TARGET)
AC_SUBST(PLUGIN_TARGET_2)
AC_SUBST(EXT_MSVC_DLL_RULES)
AC_SUBST(GUI_DLL_TARGETS)
AC_SUBST(BOCHS_BITS)
AC_SUBST(IODEV_DLL_TARGETS)
AC_SUBST(WIN32_DLL_IMPORT_LIB)
AC_SUBST(INSTALL_PLUGINS_VAR)