- check in NSIS installer scripts and data, for building win32 install
packages. Michael Rich made this installer setup based on initial work by Robert (segra) and an example by Joost Verburg. Added Files: Makefile ModernUI.nsh WinMessages.NSH bochs.ico bochs.nsi modern.bmp modern2.exe penguin.ico
This commit is contained in:
parent
bd73bf4d8d
commit
3be9628183
23
bochs/build/win32/nsis/Makefile
Normal file
23
bochs/build/win32/nsis/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
# To build an NSIS installer, get NSIS version 2.0a7 from
|
||||
# http://sourceforge.net/projects/nsis
|
||||
# Fix the MAKENSIS variable so that you have the correct path.
|
||||
# Unzip the windows binary release into a subdirectory of this
|
||||
# directory, for example "2.0.pre2". Make sure the VERSION
|
||||
# variable has the same name as the directory, and in bochs.nsi
|
||||
# the VER_MAJOR, VER_MINOR, and VER_REV values should also match.
|
||||
#
|
||||
# Type make, and it should build an installer called Bochs-${VERSION}.exe
|
||||
|
||||
MAKENSIS='c:/Program Files/NSIS/makensis'
|
||||
|
||||
VERSION=2.0.pre2
|
||||
TARGET=Bochs-${VERSION}.exe
|
||||
|
||||
${TARGET}: bochs.nsi
|
||||
rm -rf ${TARGET}
|
||||
${MAKENSIS} bochs.nsi
|
||||
test -f ${TARGET}
|
||||
ls -l ${TARGET}
|
||||
|
||||
clean::
|
||||
rm -rf ${TARGET}
|
203
bochs/build/win32/nsis/ModernUI.nsh
Normal file
203
bochs/build/win32/nsis/ModernUI.nsh
Normal file
@ -0,0 +1,203 @@
|
||||
;Modern UI Header File version 1.01
|
||||
;Written by Joost Verburg
|
||||
|
||||
;See Example.nsi & Multilanguage.nsi for an example of usage
|
||||
|
||||
!ifndef MUI_MACROS_USED
|
||||
|
||||
!define MUI_MACROS_USED
|
||||
|
||||
!macro MUI_INTERFACE UI ICON UNICON CHECKS PROGRESSBAR
|
||||
|
||||
;User interface
|
||||
|
||||
Icon "${ICON}"
|
||||
UninstallIcon "${UNICON}"
|
||||
XPStyle On
|
||||
ChangeUI all "${UI}"
|
||||
SetFont Tahoma 8
|
||||
CheckBitmap "${CHECKS}"
|
||||
InstallColors /windows
|
||||
InstProgressFlags "${PROGRESSBAR}"
|
||||
BrandingText /TRIMRIGHT
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_FINISHHEADER CALL
|
||||
|
||||
;Finish text on the header (white rectangle)
|
||||
|
||||
IntOp ${CURRENTPAGE} ${CURRENTPAGE} + 1
|
||||
Call ${CALL}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_INNERDIALOG_INIT
|
||||
|
||||
;Extra text elements on the inner dialogs
|
||||
|
||||
Push ${TEMP1}
|
||||
Push ${TEMP2}
|
||||
|
||||
FindWindow ${TEMP1} "#32770" "" $HWNDPARENT
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_INNERDIALOG_START PAGE
|
||||
|
||||
StrCmp ${CURRENTPAGE} ${PAGE} "" done_${PAGE}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_INNERDIALOG_TEXT LANGID ELEMENT TEXT
|
||||
|
||||
StrCmp $LANGUAGE ${LANGID} "" +3
|
||||
GetDlgItem ${TEMP2} ${TEMP1} ${ELEMENT}
|
||||
SendMessage ${TEMP2} ${WM_SETTEXT} 0 "${TEXT}"
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_INNERDIALOG_STOP PAGE
|
||||
|
||||
done_${PAGE}:
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_INNERDIALOG_END
|
||||
|
||||
Pop ${TEMP2}
|
||||
Pop ${TEMP1}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_NEXTPAGE_OUTER
|
||||
|
||||
Push ${TEMP1}
|
||||
Push ${TEMP2}
|
||||
|
||||
;Set backgrounds & fonts for the outer dialog (only once)
|
||||
StrCmp ${CURRENTPAGE} "" "" no_first_run
|
||||
|
||||
GetDlgItem ${TEMP1} $HWNDPARENT 1037
|
||||
CreateFont ${TEMP2} "Tahoma" 10 1000
|
||||
SendMessage ${TEMP1} ${WM_SETFONT} ${TEMP2} 0
|
||||
SetStaticBkColor ${TEMP1} 0x00FFFFFF
|
||||
|
||||
GetDlgItem ${TEMP1} $HWNDPARENT 1038
|
||||
SetStaticBkColor ${TEMP1} 0x00FFFFFF
|
||||
|
||||
GetDlgItem ${TEMP1} $HWNDPARENT 1034
|
||||
SetStaticBkColor ${TEMP1} 0x00FFFFFF
|
||||
|
||||
GetDlgItem ${TEMP1} $HWNDPARENT 1039
|
||||
SetStaticBkColor ${TEMP1} 0x00FFFFFF
|
||||
|
||||
no_first_run:
|
||||
|
||||
Pop ${TEMP2}
|
||||
Pop ${TEMP1}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_NEXTPAGE CALL
|
||||
|
||||
IntOp ${CURRENTPAGE} ${CURRENTPAGE} + 1
|
||||
|
||||
Call "${CALL}"
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_PREVPAGE
|
||||
|
||||
IntOp ${CURRENTPAGE} ${CURRENTPAGE} - 1
|
||||
|
||||
Call SetHeader
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_HEADER_INIT
|
||||
|
||||
Push ${TEMP1}
|
||||
Push ${TEMP2}
|
||||
|
||||
GetDlgItem ${TEMP1} $HWNDPARENT 1037
|
||||
GetDlgItem ${TEMP2} $HWNDPARENT 1038
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_HEADER_START PAGE
|
||||
|
||||
StrCmp ${CURRENTPAGE} ${PAGE} "" done_${PAGE}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_HEADER_TEXT LANGID TEXT SUBTEXT
|
||||
|
||||
;Text on the white rectangle
|
||||
|
||||
StrCmp $LANGUAGE ${LANGID} "" +4
|
||||
SendMessage ${TEMP1} ${WM_SETTEXT} 0 "${TEXT}"
|
||||
SendMessage ${TEMP2} ${WM_SETTEXT} 0 "${SUBTEXT}"
|
||||
Goto done
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_HEADER_STOP PAGE
|
||||
|
||||
done_${PAGE}:
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_HEADER_END
|
||||
|
||||
done:
|
||||
|
||||
Pop ${TEMP2}
|
||||
Pop ${TEMP1}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_DESCRIPTION_INIT
|
||||
|
||||
Push ${TEMP1}
|
||||
|
||||
FindWindow ${TEMP1} "#32770" "" $HWNDPARENT
|
||||
GetDlgItem ${TEMP1} ${TEMP1} 1043
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_DESCRIPTION_TEXT LANGID VAR TEXT
|
||||
|
||||
;Set text on the Description frame
|
||||
|
||||
StrCmp $LANGUAGE ${LANGID} "" +4
|
||||
StrCmp $0 ${VAR} "" +3
|
||||
SendMessage ${TEMP1} ${WM_SETTEXT} 0 "${TEXT}"
|
||||
Goto done
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_DESCRIPTION_END
|
||||
|
||||
done:
|
||||
Pop ${TEMP1}
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_ABORTWARNING LANGID TEXT
|
||||
|
||||
;Warning when Cancel button is pressed
|
||||
|
||||
StrCmp $LANGUAGE ${LANGID} "" +3
|
||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION "${TEXT}" IDYES quit
|
||||
Abort
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_ABORTWARNING_END
|
||||
|
||||
quit:
|
||||
|
||||
!macroend
|
||||
|
||||
!endif
|
164
bochs/build/win32/nsis/WinMessages.NSH
Normal file
164
bochs/build/win32/nsis/WinMessages.NSH
Normal file
@ -0,0 +1,164 @@
|
||||
; KiCHiK put together this list of WM_ messages.
|
||||
|
||||
!define WM_NULL 0x0
|
||||
!define WM_CREATE 0x1
|
||||
!define WM_DESTROY 0x2
|
||||
!define WM_MOVE 0x3
|
||||
!define WM_SIZE 0x5
|
||||
!define WM_SETFOCUS 0x7
|
||||
!define WM_KILLFOCUS 0x8
|
||||
!define WM_ENABLE 0xA
|
||||
!define WM_SETREDRAW 0xB
|
||||
!define WM_SETTEXT 0xC
|
||||
!define WM_GETTEXT 0xD
|
||||
!define WM_GETTEXTLENGTH 0xE
|
||||
!define WM_PAINT 0xF
|
||||
!define WM_CLOSE 0x10
|
||||
!define WM_QUERYENDSESSION 0x11
|
||||
!define WM_QUIT 0x12
|
||||
!define WM_QUERYOPEN 0x13
|
||||
!define WM_ERASEBKGND 0x14
|
||||
!define WM_SYSCOLORCHANGE 0x15
|
||||
!define WM_ENDSESSION 0x16
|
||||
!define WM_SHOWWINDOW 0x18
|
||||
!define WM_WININICHANGE 0x1A
|
||||
!define WM_DEVMODECHANGE 0x1B
|
||||
!define WM_ACTIVATEAPP 0x1C
|
||||
!define WM_FONTCHANGE 0x1D
|
||||
!define WM_TIMECHANGE 0x1E
|
||||
!define WM_CANCELMODE 0x1F
|
||||
!define WM_SETCURSOR 0x20
|
||||
!define WM_MOUSEACTIVATE 0x21
|
||||
!define WM_CHILDACTIVATE 0x22
|
||||
!define WM_QUEUESYNC 0x23
|
||||
!define WM_GETMINMAXINFO 0x24
|
||||
!define WM_PAINTICON 0x26
|
||||
!define WM_ICONERASEBKGND 0x27
|
||||
!define WM_NEXTDLGCTL 0x28
|
||||
!define WM_SPOOLERSTATUS 0x2A
|
||||
!define WM_DRAWITEM 0x2B
|
||||
!define WM_MEASUREITEM 0x2C
|
||||
!define WM_DELETEITEM 0x2D
|
||||
!define WM_VKEYTOITEM 0x2E
|
||||
!define WM_CHARTOITEM 0x2F
|
||||
!define WM_SETFONT 0x30
|
||||
!define WM_GETFONT 0x31
|
||||
!define WM_SETHOTKEY 0x32
|
||||
!define WM_GETHOTKEY 0x33
|
||||
!define WM_QUERYDRAGICON 0x37
|
||||
!define WM_COMPAREITEM 0x39
|
||||
!define WM_COMPACTING 0x41
|
||||
!define WM_WINDOWPOSCHANGING 0x46
|
||||
!define WM_WINDOWPOSCHANGED 0x47
|
||||
!define WM_POWER 0x48
|
||||
!define WM_COPYDATA 0x4A
|
||||
!define WM_CANCELJOURNAL 0x4B
|
||||
!define WM_NCCREATE 0x81
|
||||
!define WM_NCDESTROY 0x82
|
||||
!define WM_NCCALCSIZE 0x83
|
||||
!define WM_NCHITTEST 0x84
|
||||
!define WM_NCPAINT 0x85
|
||||
!define WM_NCACTIVATE 0x86
|
||||
!define WM_GETDLGCODE 0x87
|
||||
!define WM_NCMOUSEMOVE 0xA0
|
||||
!define WM_NCLBUTTONDOWN 0xA1
|
||||
!define WM_NCLBUTTONUP 0xA2
|
||||
!define WM_NCLBUTTONDBLCLK 0xA3
|
||||
!define WM_NCRBUTTONDOWN 0xA4
|
||||
!define WM_NCRBUTTONUP 0xA5
|
||||
!define WM_NCRBUTTONDBLCLK 0xA6
|
||||
!define WM_NCMBUTTONDOWN 0xA7
|
||||
!define WM_NCMBUTTONUP 0xA8
|
||||
!define WM_NCMBUTTONDBLCLK 0xA9
|
||||
!define WM_KEYFIRST 0x100
|
||||
!define WM_KEYDOWN 0x100
|
||||
!define WM_KEYUP 0x101
|
||||
!define WM_CHAR 0x102
|
||||
!define WM_DEADCHAR 0x103
|
||||
!define WM_SYSKEYDOWN 0x104
|
||||
!define WM_SYSKEYUP 0x105
|
||||
!define WM_SYSCHAR 0x106
|
||||
!define WM_SYSDEADCHAR 0x107
|
||||
!define WM_KEYLAST 0x108
|
||||
!define WM_INITDIALOG 0x110
|
||||
!define WM_COMMAND 0x111
|
||||
!define WM_SYSCOMMAND 0x112
|
||||
!define WM_TIMER 0x113
|
||||
!define WM_HSCROLL 0x114
|
||||
!define WM_VSCROLL 0x115
|
||||
!define WM_INITMENU 0x116
|
||||
!define WM_INITMENUPOPUP 0x117
|
||||
!define WM_MENUSELECT 0x11F
|
||||
!define WM_MENUCHAR 0x120
|
||||
!define WM_ENTERIDLE 0x121
|
||||
!define WM_CTLCOLORMSGBOX 0x132
|
||||
!define WM_CTLCOLOREDIT 0x133
|
||||
!define WM_CTLCOLORLISTBOX 0x134
|
||||
!define WM_CTLCOLORBTN 0x135
|
||||
!define WM_CTLCOLORDLG 0x136
|
||||
!define WM_CTLCOLORSCROLLBAR 0x137
|
||||
!define WM_CTLCOLORSTATIC 0x138
|
||||
!define WM_MOUSEFIRST 0x200
|
||||
!define WM_MOUSEMOVE 0x200
|
||||
!define WM_LBUTTONDOWN 0x201
|
||||
!define WM_LBUTTONUP 0x202
|
||||
!define WM_LBUTTONDBLCLK 0x203
|
||||
!define WM_RBUTTONDOWN 0x204
|
||||
!define WM_RBUTTONUP 0x205
|
||||
!define WM_RBUTTONDBLCLK 0x206
|
||||
!define WM_MBUTTONDOWN 0x207
|
||||
!define WM_MBUTTONUP 0x208
|
||||
!define WM_MBUTTONDBLCLK 0x209
|
||||
!define WM_MOUSELAST 0x209
|
||||
!define WM_PARENTNOTIFY 0x210
|
||||
!define WM_ENTERMENULOOP 0x211
|
||||
!define WM_EXITMENULOOP 0x212
|
||||
!define WM_MDICREATE 0x220
|
||||
!define WM_MDIDESTROY 0x221
|
||||
!define WM_MDIACTIVATE 0x222
|
||||
!define WM_MDIRESTORE 0x223
|
||||
!define WM_MDINEXT 0x224
|
||||
!define WM_MDIMAXIMIZE 0x225
|
||||
!define WM_MDITILE 0x226
|
||||
!define WM_MDICASCADE 0x227
|
||||
!define WM_MDIICONARRANGE 0x228
|
||||
!define WM_MDIGETACTIVE 0x229
|
||||
!define WM_MDISETMENU 0x230
|
||||
!define WM_DROPFILES 0x233
|
||||
!define WM_MDIREFRESHMENU 0x234
|
||||
!define WM_CUT 0x300
|
||||
!define WM_COPY 0x301
|
||||
!define WM_PASTE 0x302
|
||||
!define WM_CLEAR 0x303
|
||||
!define WM_UNDO 0x304
|
||||
!define WM_RENDERFORMAT 0x305
|
||||
!define WM_RENDERALLFORMATS 0x306
|
||||
!define WM_DESTROYCLIPBOARD 0x307
|
||||
!define WM_DRAWCLIPBOARD 0x308
|
||||
!define WM_PAINTCLIPBOARD 0x309
|
||||
!define WM_VSCROLLCLIPBOARD 0x30A
|
||||
!define WM_SIZECLIPBOARD 0x30B
|
||||
!define WM_ASKCBFORMATNAME 0x30C
|
||||
!define WM_CHANGECBCHAIN 0x30D
|
||||
!define WM_HSCROLLCLIPBOARD 0x30E
|
||||
!define WM_QUERYNEWPALETTE 0x30F
|
||||
!define WM_PALETTEISCHANGING 0x310
|
||||
!define WM_PALETTECHANGED 0x311
|
||||
!define WM_HOTKEY 0x312
|
||||
!define WM_PENWINFIRST 0x380
|
||||
!define WM_PENWINLAST 0x38F
|
||||
!define WM_USER 0x400
|
||||
!define WM_DDE_FIRST 0x3E0
|
||||
!define WM_CONVERTREQUESTEX 0x108
|
||||
!define WM_IME_STARTCOMPOSITION 0x10D
|
||||
!define WM_IME_ENDCOMPOSITION 0x10E
|
||||
!define WM_IME_COMPOSITION 0x10F
|
||||
!define WM_IME_KEYLAST 0x10F
|
||||
!define WM_IME_SETCONTEXT 0x281
|
||||
!define WM_IME_NOTIFY 0x282
|
||||
!define WM_IME_CONTROL 0x283
|
||||
!define WM_IME_COMPOSITIONFULL 0x284
|
||||
!define WM_IME_SELECT 0x285
|
||||
!define WM_IME_CHAR 0x286
|
||||
!define WM_IME_KEYDOWN 0x290
|
||||
!define WM_IME_KEYUP 0x291
|
BIN
bochs/build/win32/nsis/bochs.ico
Normal file
BIN
bochs/build/win32/nsis/bochs.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
400
bochs/build/win32/nsis/bochs.nsi
Normal file
400
bochs/build/win32/nsis/bochs.nsi
Normal file
@ -0,0 +1,400 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; $Id: bochs.nsi,v 1.1 2002-11-21 03:08:35 bdenney Exp $
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; Setup Script for NSIS Installer
|
||||
;
|
||||
; Created: Michael Rich (istan)
|
||||
;
|
||||
; Based on Example Script by Joost Verburg
|
||||
; also original BOCHS script by Robert (segra)
|
||||
;
|
||||
|
||||
!define VER_MAJOR 2
|
||||
!define VER_MINOR 0
|
||||
!define VER_REV pre2
|
||||
|
||||
!define NAME "Bochs ${VER_MAJOR}.${VER_MINOR}.${VER_REV}"
|
||||
|
||||
!verbose 3
|
||||
!include "WinMessages.nsh"
|
||||
!include "ModernUI.nsh"
|
||||
!verbose 4
|
||||
|
||||
!define CURRENTPAGE $9
|
||||
|
||||
!define TEMP1 $R0
|
||||
!define TEMP2 $R1
|
||||
|
||||
!define SRCDIR bochs-${VER_MAJOR}.${VER_MINOR}.${VER_REV}
|
||||
!define PGDIR "$SMPROGRAMS\Bochs ${VER_MAJOR}.${VER_MINOR}.${VER_REV}"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
;General
|
||||
Name "${NAME}"
|
||||
OutFile Bochs-${VER_MAJOR}.${VER_MINOR}.${VER_REV}.exe
|
||||
SetOverwrite on
|
||||
|
||||
;User interface
|
||||
!insertmacro MUI_INTERFACE "modern2.exe" "bochs.ico" "bochs.ico" "modern.bmp" "smooth"
|
||||
|
||||
;License dialog
|
||||
LicenseText "Scroll down to see the rest of the agreement."
|
||||
LicenseData ${SRCDIR}\COPYING.txt
|
||||
|
||||
;Component-select dialog
|
||||
ComponentText "Check the components you want to install and uncheck the components you don't want to install. Click Next to continue."
|
||||
|
||||
; Installation Types
|
||||
InstType "Normal"
|
||||
InstType "Full (with DLX Linux demo)"
|
||||
|
||||
;Folder-select dialog
|
||||
InstallDir $PROGRAMFILES\Bochs-${VER_MAJOR}.${VER_MINOR}.${VER_REV}
|
||||
DirText "Setup will install ${NAME} in the following folder.$\r$\n$\r$\nTo install in this folder, click Install. To install in a different folder, click Browse and select another folder." " "
|
||||
|
||||
;Uninstaller
|
||||
UninstallText "This will uninstall ${NAME} from your system."
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
Section "Bochs Program (required)" SecCore
|
||||
SectionIn 1 2 RO
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
File "${SRCDIR}\bochs.exe"
|
||||
File "${SRCDIR}\bochsdbg.exe"
|
||||
File "${SRCDIR}\bochsrc-sample.txt"
|
||||
File "${SRCDIR}\bximage.exe"
|
||||
File "${SRCDIR}\CHANGES.txt"
|
||||
File "${SRCDIR}\COPYING.txt"
|
||||
File "${SRCDIR}\DOC-win32.htm"
|
||||
File "${SRCDIR}\niclist.exe"
|
||||
File "${SRCDIR}\README.txt"
|
||||
File "${SRCDIR}\sb16ctrl.exe"
|
||||
File "${SRCDIR}\sb16ctrl.txt"
|
||||
File "bochs.ico"
|
||||
File "penguin.ico"
|
||||
|
||||
; Install keymaps
|
||||
SetOutPath "$INSTDIR\keymaps"
|
||||
File "${SRCDIR}\keymaps\*.*"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "ROM Images (required)" SecROMs
|
||||
SectionIn 1 2 RO
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
File "${SRCDIR}\BIOS-bochs-2-processors"
|
||||
File "${SRCDIR}\BIOS-bochs-4-processors"
|
||||
File "${SRCDIR}\BIOS-bochs-latest"
|
||||
|
||||
File "${SRCDIR}\VGABIOS-elpin-2.40"
|
||||
File "${SRCDIR}\VGABIOS-elpin-LICENSE.txt"
|
||||
File "${SRCDIR}\VGABIOS-lgpl-latest"
|
||||
File "${SRCDIR}\VGABIOS-lgpl-README"
|
||||
SectionEnd
|
||||
|
||||
Section "Documentation in HTML" SecDocs
|
||||
SectionIn 1 2
|
||||
SetOutPath "$INSTDIR\docs-html"
|
||||
File "${SRCDIR}\docs-html\*.*"
|
||||
SectionEnd
|
||||
|
||||
Section "DLX Linux Demo" SecDLX
|
||||
SectionIn 2
|
||||
|
||||
SetOutPath "$INSTDIR\dlxlinux"
|
||||
File "${SRCDIR}\dlxlinux\*.*"
|
||||
|
||||
; Fix up the path to the Bochs executable
|
||||
FileOpen $1 "$INSTDIR\dlxlinux\run.bat" w
|
||||
FileWrite $1 "cd $INSTDIR\dlxlinux$\r$\n"
|
||||
FileWrite $1 "..\bochs -q$\r$\n"
|
||||
FileClose $1
|
||||
SectionEnd
|
||||
|
||||
Section "Add Bochs to the Start Menu and Desktop" SecIcons
|
||||
SectionIn 1 2
|
||||
|
||||
; Set the Program Group as output to ensure it exists
|
||||
SetOutPath "${PGDIR}"
|
||||
|
||||
; Change the output back to the install folder so the "Start In" paths get set properly
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
CreateShortCut "${PGDIR}\${NAME}.lnk" "$INSTDIR\Bochs.exe" "" "$INSTDIR\bochs.ico" "0"
|
||||
|
||||
CreateShortCut "${PGDIR}\Readme.lnk" \
|
||||
"$INSTDIR\Readme.txt"
|
||||
|
||||
CreateShortCut "${PGDIR}\Bochs Sample Setup.lnk" \
|
||||
"$INSTDIR\bochsrc-sample.txt"
|
||||
|
||||
CreateShortCut "${PGDIR}\Disk Image Creation Tool.lnk" \
|
||||
"$INSTDIR\bximage.exe"
|
||||
|
||||
CreateShortCut "${PGDIR}\NIC Lister.lnk" \
|
||||
"$INSTDIR\niclist.exe"
|
||||
|
||||
WriteINIStr "${PGDIR}\Help.url" \
|
||||
"InternetShortcut" "URL" "file://$INSTDIR/docs-html/index.html"
|
||||
|
||||
WriteINIStr "${PGDIR}\Home Page.url" \
|
||||
"InternetShortcut" "URL" "http://bochs.sourceforge.net/"
|
||||
|
||||
CreateShortCut "${PGDIR}\${NAME} Folder.lnk" \
|
||||
"$INSTDIR"
|
||||
|
||||
CreateShortCut "${PGDIR}\Uninstall Bochs.lnk" \
|
||||
"$INSTDIR\Uninstall.exe"
|
||||
|
||||
; Create shortcut to DLX Linux if it was installed
|
||||
IfFileExists "$INSTDIR\dlxlinux\*.*" 0 no
|
||||
CreateShortCut "${PGDIR}\DLX Linux.lnk" "$INSTDIR\dlxlinux\run.bat" "" "$INSTDIR\penguin.ico" "0"
|
||||
|
||||
; Add a link to the DLX demo to the desktop
|
||||
CreateShortCut "$DESKTOP\${NAME} Linux Demo.lnk" "$INSTDIR\dlxlinux\run.bat" "" "$INSTDIR\bochs.ico" "0"
|
||||
no:
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "Bochs Shell Extensions" SecExtention
|
||||
SectionIn 1 2
|
||||
|
||||
; back up old value of .bxr
|
||||
ReadRegStr $1 HKCR ".bxr" ""
|
||||
|
||||
StrCmp $1 "" Label1
|
||||
StrCmp $1 "BOCHSFile" Label1
|
||||
WriteRegStr HKCR ".bxr" "backup_val" $1
|
||||
|
||||
Label1:
|
||||
WriteRegStr HKCR ".bxr" "" "BOCHSFile"
|
||||
WriteRegStr HKCR "BOCHSFile" "" "${NAME} Disk Image"
|
||||
WriteRegStr HKCR "BOCHSFile\DefaultIcon" "" "$INSTDIR\bochs.ico,0"
|
||||
;WriteRegStr HKCR "BOCHSFile\shell" "" "open"
|
||||
;WriteRegStr HKCR "BOCHSFile\shell\open\command" "" '$INSTDIR\Bochs.exe -nocp "%1"'
|
||||
SectionEnd
|
||||
|
||||
|
||||
Section ""
|
||||
|
||||
;Invisible section to display the Finish header
|
||||
!insertmacro MUI_FINISHHEADER SetHeader
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section -post
|
||||
; Register Uninstaller
|
||||
WriteRegStr HKLM "SOFTWARE\${NAME}" "" $INSTDIR
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME} (remove only)"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayIcon" "$INSTDIR\bochs.ico,0"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
||||
|
||||
; Write the uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Installer Functions
|
||||
|
||||
Function .onInitDialog
|
||||
|
||||
!insertmacro MUI_INNERDIALOG_INIT
|
||||
|
||||
!insertmacro MUI_INNERDIALOG_START 1
|
||||
!insertmacro MUI_INNERDIALOG_TEXT 1033 1040 "If you accept all the terms of the agreement, choose I Agree to continue. If you choose Cancel, Setup will close. You must accept the agreement to install ${NAME}."
|
||||
!insertmacro MUI_INNERDIALOG_STOP 1
|
||||
|
||||
!insertmacro MUI_INNERDIALOG_START 2
|
||||
!insertmacro MUI_INNERDIALOG_TEXT 1033 1042 "Description"
|
||||
!insertmacro MUI_INNERDIALOG_TEXT 1033 1043 "Hover your mouse over a component to see it's description."
|
||||
!insertmacro MUI_INNERDIALOG_STOP 2
|
||||
|
||||
!insertmacro MUI_INNERDIALOG_START 3
|
||||
!insertmacro MUI_INNERDIALOG_TEXT 1033 1041 "Destination Folder"
|
||||
!insertmacro MUI_INNERDIALOG_STOP 3
|
||||
|
||||
!insertmacro MUI_INNERDIALOG_END
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onNextPage
|
||||
|
||||
!insertmacro MUI_NEXTPAGE_OUTER
|
||||
!insertmacro MUI_NEXTPAGE SetHeader
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onPrevPage
|
||||
|
||||
!insertmacro MUI_PREVPAGE
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function SetHeader
|
||||
|
||||
!insertmacro MUI_HEADER_INIT
|
||||
|
||||
!insertmacro MUI_HEADER_START 1
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "License Agreement" "Please review the license terms before installing ${NAME}."
|
||||
!insertmacro MUI_HEADER_STOP 1
|
||||
|
||||
!insertmacro MUI_HEADER_START 2
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Choose Components" "Choose the components you want to install."
|
||||
!insertmacro MUI_HEADER_STOP 2
|
||||
|
||||
!insertmacro MUI_HEADER_START 3
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Choose Install Location" "Choose the folder in which to install ${NAME} in."
|
||||
!insertmacro MUI_HEADER_STOP 3
|
||||
|
||||
!insertmacro MUI_HEADER_START 4
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Installing" "Please wait while ${NAME} is being installed."
|
||||
!insertmacro MUI_HEADER_STOP 4
|
||||
|
||||
!insertmacro MUI_HEADER_START 5
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Finished" "Setup was completed successfully."
|
||||
!insertmacro MUI_HEADER_STOP 5
|
||||
|
||||
!insertmacro MUI_HEADER_END
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onMouseOverSection
|
||||
|
||||
!insertmacro MUI_DESCRIPTION_INIT
|
||||
|
||||
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecCore} "Installs the core ${NAME} applications."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecROMs} "BIOS and Video ROMs required by ${NAME}."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecDLX} "An image of DLX Linux with a batch file for quickly loading it."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecDocs} "Documentation for configuring and running ${NAME}."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecIcons} "Installs icons and program menu items for quickly running ${NAME}."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT 1033 ${SecExtention} "Adds the ability to double-click and run the disk image directly in ${NAME}."
|
||||
|
||||
!insertmacro MUI_DESCRIPTION_END
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onUserAbort
|
||||
|
||||
!insertmacro MUI_ABORTWARNING 1033 "Are you sure you want to quit ${NAME} Setup?"
|
||||
!insertmacro MUI_ABORTWARNING_END
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
"Would you like to see a list of changes?" \
|
||||
IDNO NoChanges
|
||||
ExecShell open '$INSTDIR\CHANGES.TXT'
|
||||
NoChanges:
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
"Setup has completed. Read readme now?" \
|
||||
IDNO NoReadme
|
||||
ExecShell open '$INSTDIR\readme.txt'
|
||||
|
||||
NoReadme:
|
||||
DetailPrint "Thank you for installing Bochs, think inside the bochs."
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
ReadRegStr $1 HKCR ".bxr" ""
|
||||
|
||||
StrCmp $1 "BOCHSFile" 0 NoOwn ; only do this if we own it
|
||||
ReadRegStr $1 HKCR ".bxr" "backup_val"
|
||||
StrCmp $1 "" 0 RestoreBackup ; if backup == "" then delete the whole key
|
||||
DeleteRegKey HKCR ".bxr"
|
||||
Goto NoOwn
|
||||
RestoreBackup:
|
||||
WriteRegStr HKCR ".bxr" "" $1
|
||||
DeleteRegValue HKCR ".bxr" "backup_val"
|
||||
NoOwn:
|
||||
|
||||
DeleteRegKey HKCR "BOCHSFile"
|
||||
DeleteRegKey HKLM "SOFTWARE\${NAME}"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}"
|
||||
|
||||
Delete "${PGDIR}\*.lnk"
|
||||
Delete "${PGDIR}\*.url"
|
||||
RMDir "${PGDIR}"
|
||||
|
||||
Delete "$DESKTOP\${NAME} Linux Demo.lnk"
|
||||
|
||||
Delete "$INSTDIR\bochs.exe"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
Delete "$INSTDIR\BIOS-bochs-2-processors"
|
||||
Delete "$INSTDIR\BIOS-bochs-4-processors"
|
||||
Delete "$INSTDIR\BIOS-bochs-latest"
|
||||
Delete "$INSTDIR\bochs.exe"
|
||||
Delete "$INSTDIR\bochsdbg.exe"
|
||||
Delete "$INSTDIR\bochsrc-sample.txt"
|
||||
Delete "$INSTDIR\bximage.exe"
|
||||
Delete "$INSTDIR\CHANGES.txt"
|
||||
Delete "$INSTDIR\COPYING.txt"
|
||||
Delete "$INSTDIR\DOC-win32.htm"
|
||||
Delete "$INSTDIR\niclist.exe"
|
||||
Delete "$INSTDIR\README.txt"
|
||||
Delete "$INSTDIR\sb16ctrl.exe"
|
||||
Delete "$INSTDIR\sb16ctrl.txt"
|
||||
Delete "$INSTDIR\VGABIOS-elpin-2.40"
|
||||
Delete "$INSTDIR\VGABIOS-elpin-LICENSE.txt"
|
||||
Delete "$INSTDIR\VGABIOS-lgpl-0.3a"
|
||||
Delete "$INSTDIR\VGABIOS-lgpl-README"
|
||||
Delete "$INSTDIR\bochs.ico"
|
||||
Delete "$INSTDIR\penguin.ico"
|
||||
Delete "$INSTDIR\dlxlinux\*.*"
|
||||
Delete "$INSTDIR\docs-html\*.*"
|
||||
Delete "$INSTDIR\keymaps\*.*"
|
||||
|
||||
RMDIR "$INSTDIR\keymaps"
|
||||
RMDIR "$INSTDIR\dlxlinux"
|
||||
RMDIR "$INSTDIR\docs-html"
|
||||
RMDIR "$INSTDIR"
|
||||
|
||||
!insertmacro MUI_FINISHHEADER un.SetHeader
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Functions
|
||||
|
||||
Function un.onNextPage
|
||||
|
||||
!insertmacro MUI_NEXTPAGE_OUTER
|
||||
!insertmacro MUI_NEXTPAGE un.SetHeader
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function un.SetHeader
|
||||
|
||||
!insertmacro MUI_HEADER_INIT
|
||||
|
||||
!insertmacro MUI_HEADER_START 1
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Uninstall ${NAME}" "Remove ${NAME} from your system."
|
||||
!insertmacro MUI_HEADER_STOP 1
|
||||
|
||||
!insertmacro MUI_HEADER_START 2
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Uninstalling" "Please wait while ${NAME} is being uninstalled."
|
||||
!insertmacro MUI_HEADER_STOP 2
|
||||
|
||||
!insertmacro MUI_HEADER_START 3
|
||||
!insertmacro MUI_HEADER_TEXT 1033 "Finished" "${NAME} has been removed from your system."
|
||||
!insertmacro MUI_HEADER_STOP 3
|
||||
|
||||
!insertmacro MUI_HEADER_END
|
||||
|
||||
FunctionEnd
|
||||
|
||||
;eof
|
BIN
bochs/build/win32/nsis/modern.bmp
Normal file
BIN
bochs/build/win32/nsis/modern.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
bochs/build/win32/nsis/modern2.exe
Executable file
BIN
bochs/build/win32/nsis/modern2.exe
Executable file
Binary file not shown.
BIN
bochs/build/win32/nsis/penguin.ico
Normal file
BIN
bochs/build/win32/nsis/penguin.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Loading…
Reference in New Issue
Block a user