!define MUI_PRODUCT "Crystalfontz Boot Screen"
!define MUI_VERSION "1.0" 

!include "${NSISDIR}\Contrib\Modern UI\System.nsh"


;--------------------------------
;Configuration

  !define MUI_COMPONENTSPAGE
  !define MUI_DIRECTORYPAGE
  
  !define MUI_ABORTWARNING
  
  !define MUI_UNINSTALLER
  !define MUI_UNCONFIRMPAGE

  ;Language
  !insertmacro MUI_LANGUAGE "English"
  
  ;General
  OutFile "Setup.exe"

  ;Descriptions
  LangString DESC_SecCopyUI ${LANG_ENGLISH} "Install the core"

  ;Folder-selection page
  InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"

;--------------------------------
;Modern UI System

!insertmacro MUI_SYSTEM


;--------------------------------
;Installer Sections

Section "Boot Setup.exe" SecCopyUI

  ;ADD YOUR OWN STUFF HERE!

  SetOutPath "$INSTDIR"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\Boot Setup.exe"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\uninst.ico"
  ;File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\CFBSFONT.TTF"
  
  SetOutPath "$SYSDIR"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\Comdlg32.ocx"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\COMCTL32.OCX"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\COMCT232.OCX"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\MSCOMM32.OCX"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\Mscomctl.ocx"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\msvbvm60.dll"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\DLL's\fonts.dll"
  RegDLL "$SYSDIR\Comdlg32.ocx"
  RegDLL "$SYSDIR\COMCTL32.OCX"
  RegDLL "$SYSDIR\COMCT232.OCX"
  RegDLL "$SYSDIR\MSCOMM32.OCX"
  RegDLL "$SYSDIR\Mscomctl.ocx"
  RegDLL "$SYSDIR\msvbvm60.dll"
  RegDLL "$SYSDIR\fonts.dll"

  SetOutPath "$STARTMENU"
  CreateDirectory "$STARTMENU\Programs\Crystalfontz Boot Screen Setup\"
  CreateShortCut "$STARTMENU\Programs\Crystalfontz Boot Screen Setup\Boot Setup.lnk" "$INSTDIR\Boot Setup.exe"
  CreateShortCut "$STARTMENU\Programs\Crystalfontz Boot Screen Setup\Uninstall.lnk" "$INSTDIR\Uninstall.exe" [uninst.ico]


  SetOutPath "$WINDIR\Fonts\"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\CFBSFONT.TTF"

  fonts::registerFont "$WINDIR\Fonts\CFBSFONT.TTF"

  ;Create uninstaller
  WriteUninstaller "$INSTDIR\Uninstall.exe"

SectionEnd

Section "Addon screens"
  SetOutPath "$INSTDIR\Screens\"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\Default.cf"
  File "C:\Documents and Settings\CURTISBEF\Desktop\CF PROGRAM!!!\Installer\BarChars.cf"
SectionEnd

;Display the Finish header
;Insert this macro after the sections if you are not using a finish page
!insertmacro MUI_SECTIONS_FINISHHEADER

;--------------------------------
;Descriptions

!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
  !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
 
;--------------------------------
;Uninstaller Section

Section "Uninstall"

  ;ADD YOUR OWN STUFF HERE!

  Delete "$INSTDIR\Boot Setup.exe"
  Delete "$INSTDIR\Uninstall.exe"
  Delete "$INSTDIR\Screens\Default.cf"
  Delete "$INSTDIR\Screens\BarChars.cf"
  RMDir "$INSTDIR\Screens"
  RMDir "$INSTDIR"

  ;Display the Finish header
  !insertmacro MUI_UNFINISHHEADER

SectionEnd