; Script generated with the Venis Install Wizard

; Define your application name
!define APPNAME "Renegade BBS Base Install"
!define APPNAMEANDVERSION "Renegade BBS 05-11.4 Base Install"

; Main Install settings
Name "${APPNAMEANDVERSION}"
InstallDir "C:\RG\"
InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "..\..\..\Program Files\Venis\rgbsetup.exe"

; Modern interface settings
!include "MUI.nsh"

!define MUI_ABORTWARNING
!define MUI_FINISHPAGE_RUN "$INSTDIR\RG.BAT L"
!define MUI_ICON "..\..\..\bluewolficon.ico"
!define MUI_UNICON "..\..\..\bluewolficon.ico"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\..\..\RG_NEW\DOCS\LICENSE.TXT"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL

Section "Renegade BBS" Section1

	; Set Section properties
	SetOverwrite on

	; Set Section Files and Shortcuts
	SetOutPath "$INSTDIR\"
	File "..\..\..\RG2\LOGON.BAT"
	File "..\..\..\RG2\RENEGADE.EXE"
	File "..\..\..\RG2\RENEGADE.OVR"
	File "..\..\..\RG2\RENEMAIL.EXE"
	File "..\..\..\RG2\RENEGADE.DAT"
	File "..\..\..\RG2\RUP.EXE"
	File "..\..\..\RG2\RG.BAT"
	File "..\..\..\RG2\1stboot"
	SetOutPath "$INSTDIR\ARCS\"
	File "..\..\..\RG2\ARCS\PKUNZIP.EXE"
	File "..\..\..\RG2\ARCS\PKZIP.EXE"
	SetOutPath "$INSTDIR\DATA\"
	File "..\..\..\RG2\DATA\BBSLIST.TPL"
	File "..\..\..\RG2\DATA\CONFRENC.DAT"
	File "..\..\..\RG2\DATA\EVENTS.DAT"
	File "..\..\..\RG2\DATA\MBASES.DAT"
	File "..\..\..\RG2\DATA\NODE1.DAT"
	File "..\..\..\RG2\DATA\PROTOCOL.DAT"
	File "..\..\..\RG2\DATA\SCHEME.DAT"
	File "..\..\..\RG2\DATA\STRING.DAT"
	File "..\..\..\RG2\DATA\VOTING.DAT"
	File "..\..\..\RG2\DATA\HISTORY.DAT"
	File "..\..\..\RG2\DATA\USERS.DAT"
	File "..\..\..\RG2\DATA\TOGGLES.DAT"
	SetOutPath "$INSTDIR\MENU\"
	File "..\..\..\RG2\MENU\CENTRAL.MNU"
	File "..\..\..\RG2\MENU\ENTRTAIN.MNU"
	File "..\..\..\RG2\MENU\FDIR.MNU"
	File "..\..\..\RG2\MENU\FILE.MNU"
	File "..\..\..\RG2\MENU\FILEOP.MNU"
	File "..\..\..\RG2\MENU\FILEP.MNU"
	File "..\..\..\RG2\MENU\FSEARCH.MNU"
	File "..\..\..\RG2\MENU\GLOBAL.MNU"
	File "..\..\..\RG2\MENU\INFO.MNU"
	File "..\..\..\RG2\MENU\MESSAGE.MNU"
	File "..\..\..\RG2\MENU\MSGOP.MNU"
	File "..\..\..\RG2\MENU\NEWINFO.MNU"
	File "..\..\..\RG2\MENU\READP.MNU"
	File "..\..\..\RG2\MENU\SETUP.MNU"
	File "..\..\..\RG2\MENU\START.MNU"
	File "..\..\..\RG2\MENU\SYSOP.MNU"
	File "..\..\..\RG2\MENU\TEMPLATE.MNU"
	File "..\..\..\RG2\MENU\TIMEBANK.MNU"
	File "..\..\..\RG2\MENU\UTILITY.MNU"
	File "..\..\..\RG2\MENU\VOTING.MNU"
	SetOutPath "$INSTDIR\MISC\"
	File "..\..\..\RG2\MISC\BATCHUL0.ASC"
	File "..\..\..\RG2\MISC\BBSEH.ASC"
	File "..\..\..\RG2\MISC\BBSET.ASC"
	File "..\..\..\RG2\MISC\BBSME.ASC"
	File "..\..\..\RG2\MISC\BBSMN.ASC"
	File "..\..\..\RG2\MISC\BBSNH.ASC"
	File "..\..\..\RG2\MISC\BBSNT.ASC"
	File "..\..\..\RG2\MISC\BULLETIN.ASC"
	File "..\..\..\RG2\MISC\CENTR.ANS"
	File "..\..\..\RG2\MISC\COLOR.ASC"
	File "..\..\..\RG2\MISC\ENTR.ANS"
	File "..\..\..\RG2\MISC\FILE.ANS"
	File "..\..\..\RG2\MISC\FILEOP.ANS"
	File "..\..\..\RG2\MISC\FSHELP.ASC"
	File "..\..\..\RG2\MISC\INTRNODE.ANS"
	File "..\..\..\RG2\MISC\INTRNODE.ASC"
	File "..\..\..\RG2\MISC\LASTH.ASC"
	File "..\..\..\RG2\MISC\LASTM.ASC"
	File "..\..\..\RG2\MISC\LASTT.ASC"
	File "..\..\..\RG2\MISC\LOGOFF.ASC"
	File "..\..\..\RG2\MISC\MENUCMD.ASC"
	File "..\..\..\RG2\MISC\MSG.ANS"
	File "..\..\..\RG2\MISC\MSGOP.ANS"
	File "..\..\..\RG2\MISC\NEWINFO.ANS"
	File "..\..\..\RG2\MISC\NEWINFO.ASC"
	File "..\..\..\RG2\MISC\NODELH.ASC"
	File "..\..\..\RG2\MISC\NODELM.ASC"
	File "..\..\..\RG2\MISC\NODELT.ASC"
	File "..\..\..\RG2\MISC\PRELOGON.ASC"
	File "..\..\..\RG2\MISC\PRHELP.ASC"
	File "..\..\..\RG2\MISC\PSEUDOS.ASC"
	File "..\..\..\RG2\MISC\SETUP.ANS"
	File "..\..\..\RG2\MISC\SETUP.ASC"
	File "..\..\..\RG2\MISC\SYSTEM.ASC"
	File "..\..\..\RG2\MISC\TELEHELP.ANS"
	File "..\..\..\RG2\MISC\TELEHELP.ASC"
	File "..\..\..\RG2\MISC\TIMEDOUT.ASC"
	File "..\..\..\RG2\MISC\USERH.ASC"
	File "..\..\..\RG2\MISC\USERM.ASC"
	File "..\..\..\RG2\MISC\USERT.ASC"
	File "..\..\..\RG2\MISC\UTIL.ANS"
	File "..\..\..\RG2\MISC\VOTE.ANS"
	File "..\..\..\RG2\MISC\YOURINFO.ASC"
	File "..\..\..\RG2\MISC\DOSHELP.ASC"
	File "..\..\..\RG2\MISC\ACTIONS.ASC"
	File "..\..\..\RG2\MISC\ACTIONS.LST"
	File "..\..\..\RG2\MISC\PROTSUL.ASC"
	File "..\..\..\RG2\MISC\PROTBUL.ASC"
	File "..\..\..\RG2\MISC\PROTRES.ASC"
	File "..\..\..\RG2\MISC\PROTBDL.ASC"
	File "..\..\..\RG2\MISC\PROTSDL.ASC"
	SetOutPath "$INSTDIR\MSGS\"
	File "..\..\..\RG2\MSGS\EMAIL.HDR"
	SetOutPath "$INSTDIR\PROT\"
	File "..\..\..\RG2\PROT\CEXYZ.EXE"
	File "..\..\..\RG2\PROT\fdsz.exe"
	File "..\..\..\RG2\PROT\synzm10.zip"
	SetOutPath "$INSTDIR\DOCS\"
	File "..\..\..\RG2\DOCS\LICENSE.TXT"
	File "..\..\..\RG2\DOCS\MCI.DOC"
	File "..\..\..\RG2\DOCS\RGD12303.DOC"
	File "..\..\..\RG2\DOCS\WHATDONE"
	File "..\..\..\RG2\DOCS\RENEMAIL.DOC"
	File "..\..\..\RG2\DOCS\QUICKREF.PDF"
	File "..\..\..\RG2\DOCS\RENDOCS.PDF"
	File "..\..\..\RG2\DOCS\whatdone.txt"
	File "..\..\..\RG2\DOCS\todo.txt"
  CreateDirectory "$INSTDIR\FATTACH"
  CreateDirectory "$INSTDIR\LOGS"
  CreateShortCut "$DESKTOP\Renegade BBS.lnk" "$INSTDIR\RG.BAT L"
	CreateDirectory "$SMPROGRAMS\Renegade BBS 01-10.4"
	CreateShortCut "$SMPROGRAMS\Renegade BBS 01-10.4\Renegade BBS.lnk" "$INSTDIR\RG.BAT L"
	CreateShortCut "$SMPROGRAMS\Renegade BBS 01-10.4\Uninstall.lnk" "$INSTDIR\uninstall.exe"

SectionEnd

Section -FinishSection

	WriteRegStr HKLM "Software\${APPNAME}" "" "$INSTDIR"
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\uninstall.exe"
	WriteUninstaller "$INSTDIR\uninstall.exe"

SectionEnd

;Uninstall section
Section Uninstall

	;Remove from registry...
	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
	DeleteRegKey HKLM "SOFTWARE\${APPNAME}"

	; Delete self
	Delete "$INSTDIR\uninstall.exe"

	; Delete Shortcuts
	Delete "$DESKTOP\Renegade BBS.lnk"
	Delete "$SMPROGRAMS\Renegade BBS 05-11.4\Renegade BBS.lnk"
	Delete "$SMPROGRAMS\Renegade BBS 05-11.4\Uninstall.lnk"
	
	; Clean up Renegade BBS
	Delete "$INSTDIR\LOGON.BAT"
	Delete "$INSTDIR\RENEGADE.EXE"
	Delete "$INSTDIR\RENEGADE.OVR"
	Delete "$INSTDIR\RENEMAIL.EXE"
	Delete "$INSTDIR\RENEGADE.DAT"
	Delete "$INSTDIR\RUP.EXE"
	Delete "$INSTDIR\RG.BAT"
	Delete "$INSTDIR\1stboot"
	Delete "$INSTDIR\ARCS\PKUNZIP.EXE"
	Delete "$INSTDIR\ARCS\PKZIP.EXE"
	Delete "$INSTDIR\DATA\BBSLIST.TPL"
	Delete "$INSTDIR\DATA\CONFRENC.DAT"
	Delete "$INSTDIR\DATA\EVENTS.DAT"
	Delete "$INSTDIR\DATA\MBASES.DAT"
	Delete "$INSTDIR\DATA\NODE1.DAT"
	Delete "$INSTDIR\DATA\PROTOCOL.DAT"
	Delete "$INSTDIR\DATA\SCHEME.DAT"
	Delete "$INSTDIR\DATA\STRING.DAT"
	Delete "$INSTDIR\DATA\VOTING.DAT"
	Delete "$INSTDIR\DATA\HISTORY.DAT"
	Delete "$INSTDIR\DATA\USERS.DAT"
	Delete "$INSTDIR\DATA\TOGGLES.DAT"
	Delete "$INSTDIR\MENU\CENTRAL.MNU"
	Delete "$INSTDIR\MENU\ENTRTAIN.MNU"
	Delete "$INSTDIR\MENU\FDIR.MNU"
	Delete "$INSTDIR\MENU\FILE.MNU"
	Delete "$INSTDIR\MENU\FILEOP.MNU"
	Delete "$INSTDIR\MENU\FILEP.MNU"
	Delete "$INSTDIR\MENU\FSEARCH.MNU"
	Delete "$INSTDIR\MENU\GLOBAL.MNU"
	Delete "$INSTDIR\MENU\INFO.MNU"
	Delete "$INSTDIR\MENU\MESSAGE.MNU"
	Delete "$INSTDIR\MENU\MSGOP.MNU"
	Delete "$INSTDIR\MENU\NEWINFO.MNU"
	Delete "$INSTDIR\MENU\READP.MNU"
	Delete "$INSTDIR\MENU\SETUP.MNU"
	Delete "$INSTDIR\MENU\START.MNU"
	Delete "$INSTDIR\MENU\SYSOP.MNU"
	Delete "$INSTDIR\MENU\TEMPLATE.MNU"
	Delete "$INSTDIR\MENU\TIMEBANK.MNU"
	Delete "$INSTDIR\MENU\UTILITY.MNU"
	Delete "$INSTDIR\MENU\VOTING.MNU"
	Delete "$INSTDIR\MISC\BATCHUL0.ASC"
	Delete "$INSTDIR\MISC\BBSEH.ASC"
	Delete "$INSTDIR\MISC\BBSET.ASC"
	Delete "$INSTDIR\MISC\BBSME.ASC"
	Delete "$INSTDIR\MISC\BBSMN.ASC"
	Delete "$INSTDIR\MISC\BBSNH.ASC"
	Delete "$INSTDIR\MISC\BBSNT.ASC"
	Delete "$INSTDIR\MISC\BULLETIN.ASC"
	Delete "$INSTDIR\MISC\CENTR.ANS"
	Delete "$INSTDIR\MISC\COLOR.ASC"
	Delete "$INSTDIR\MISC\ENTR.ANS"
	Delete "$INSTDIR\MISC\FILE.ANS"
	Delete "$INSTDIR\MISC\FILEOP.ANS"
	Delete "$INSTDIR\MISC\FSHELP.ASC"
	Delete "$INSTDIR\MISC\INTRNODE.ANS"
	Delete "$INSTDIR\MISC\INTRNODE.ASC"
	Delete "$INSTDIR\MISC\LASTH.ASC"
	Delete "$INSTDIR\MISC\LASTM.ASC"
	Delete "$INSTDIR\MISC\LASTT.ASC"
	Delete "$INSTDIR\MISC\LOGOFF.ASC"
	Delete "$INSTDIR\MISC\MENUCMD.ASC"
	Delete "$INSTDIR\MISC\MSG.ANS"
	Delete "$INSTDIR\MISC\MSGOP.ANS"
	Delete "$INSTDIR\MISC\NEWINFO.ANS"
	Delete "$INSTDIR\MISC\NEWINFO.ASC"
	Delete "$INSTDIR\MISC\NODELH.ASC"
	Delete "$INSTDIR\MISC\NODELM.ASC"
	Delete "$INSTDIR\MISC\NODELT.ASC"
	Delete "$INSTDIR\MISC\PRELOGON.ASC"
	Delete "$INSTDIR\MISC\PRHELP.ASC"
	Delete "$INSTDIR\MISC\PSEUDOS.ASC"
	Delete "$INSTDIR\MISC\SETUP.ANS"
	Delete "$INSTDIR\MISC\SETUP.ASC"
	Delete "$INSTDIR\MISC\SYSTEM.ASC"
	Delete "$INSTDIR\MISC\TELEHELP.ANS"
	Delete "$INSTDIR\MISC\TELEHELP.ASC"
	Delete "$INSTDIR\MISC\TIMEDOUT.ASC"
	Delete "$INSTDIR\MISC\USERH.ASC"
	Delete "$INSTDIR\MISC\USERM.ASC"
	Delete "$INSTDIR\MISC\USERT.ASC"
	Delete "$INSTDIR\MISC\UTIL.ANS"
	Delete "$INSTDIR\MISC\VOTE.ANS"
	Delete "$INSTDIR\MISC\YOURINFO.ASC"
	Delete "$INSTDIR\MISC\DOSHELP.ASC"
	Delete "$INSTDIR\MISC\ACTIONS.ASC"
	Delete "$INSTDIR\MISC\ACTIONS.LST"
	Delete "$INSTDIR\MISC\PROTSUL.ASC"
	Delete "$INSTDIR\MISC\PROTBUL.ASC"
	Delete "$INSTDIR\MISC\PROTRES.ASC"
	Delete "$INSTDIR\MISC\PROTBDL.ASC"
	Delete "$INSTDIR\MISC\PROTSDL.ASC"
	Delete "$INSTDIR\MSGS\EMAIL.HDR"
	Delete "$INSTDIR\PROT\CEXYZ.EXE"
	Delete "$INSTDIR\PROT\fdsz.exe"
	Delete "$INSTDIR\PROT\synzm10.zip"
	Delete "$INSTDIR\DOCS\LICENSE.TXT"
	Delete "$INSTDIR\DOCS\MCI.DOC"
	Delete "$INSTDIR\DOCS\RGD12303.DOC"
	Delete "$INSTDIR\DOCS\WHATDONE"
	Delete "$INSTDIR\DOCS\RENEMAIL.DOC"
	Delete "$INSTDIR\DOCS\QUICKREF.PDF"
	Delete "$INSTDIR\DOCS\RENDOCS.PDF"
	Delete "$INSTDIR\DOCS\whatdone.txt"
	Delete "$INSTDIR\DOCS\todo.txt"

	; Remove remaining directories
	RMDir "$SMPROGRAMS\Renegade BBS"
	RMDir "$INSTDIR\PROT\"
	RMDir "$INSTDIR\MSGS\"
	RMDir "$INSTDIR\MISC\"
	RMDir "$INSTDIR\MENU\"
	RMDir "$INSTDIR\DOCS\"
	RMDir "$INSTDIR\DATA\"
	RMDir "$INSTDIR\ARCS\"
  RMDir "$INSTDIR\FATTACH"
  RMDir "$INSTDIR\LOGS"
	RMDir "$INSTDIR\"

SectionEnd

; eof