Kaynağa Gözat

Add confirmation dialog.

git-svn-id: file:///var/svn/tigccpp/trunk@70 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 19 yıl önce
ebeveyn
işleme
f0a7d4e3b3
2 değiştirilmiş dosya ile 145 ekleme ve 0 silme
  1. 84 0
      tigcc/setup/dlgcnfrm.ini
  2. 61 0
      tigcc/setup/tigcc.nsi

+ 84 - 0
tigcc/setup/dlgcnfrm.ini

@@ -0,0 +1,84 @@
+; Ini file generated by the HM NIS Edit IO designer.
+[Settings]
+NumFields=10
+
+[Field 1]
+Type=Label
+Text=Setup can start installing files now. Click on "Install" if you want to do this. To revise your
+Left=0
+Right=297
+Top=2
+Bottom=10
+
+[Field 2]
+Type=Label
+Text=settings, click on "Back."
+Left=0
+Right=297
+Top=12
+Bottom=20
+
+[Field 3]
+Type=Label
+Text=Program Folder:
+Left=0
+Right=55
+Top=32
+Bottom=40
+
+[Field 4]
+Type=Label
+Text=Label
+Left=60
+Right=297
+Top=32
+Bottom=40
+
+[Field 5]
+Type=Label
+Text=Program Group:
+Left=0
+Right=54
+Top=47
+Bottom=55
+
+[Field 6]
+Type=Label
+Text=Label
+Left=60
+Right=297
+Top=47
+Bottom=55
+
+[Field 7]
+Type=Label
+Text=Items to Install:
+Left=0
+Right=49
+Top=62
+Bottom=70
+
+[Field 8]
+Type=Label
+Text=Label
+Left=60
+Right=297
+Top=62
+Bottom=70
+
+[Field 9]
+Type=Label
+Text=Add TIGCC to PATH variable:
+Left=0
+Right=101
+Top=77
+Bottom=85
+
+[Field 10]
+Type=Label
+Text=Label
+Left=106
+Right=297
+Top=77
+Bottom=85
+

+ 61 - 0
tigcc/setup/tigcc.nsi

@@ -72,6 +72,8 @@ var ICONS_GROUP
 !insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
 ; Path settings page
 Page custom PathSettings
+; Confirmation dialog
+Page custom ConfirmSettings
 ; Instfiles page
 !insertmacro MUI_PAGE_INSTFILES
 ; Finish page
@@ -109,6 +111,7 @@ Var SET_PATH
 Function .onInit
 !insertmacro MUI_INSTALLOPTIONS_EXTRACT "dlgpth9x.ini"
 !insertmacro MUI_INSTALLOPTIONS_EXTRACT "dlgpthnt.ini"
+!insertmacro MUI_INSTALLOPTIONS_EXTRACT "dlgcnfrm.ini"
   ReadRegStr $0 HKCU "Software\SeReSoft\TI-GCC IDE" "Program Folder"
   StrCmp $0 "" noseresoft
   StrCpy $INSTALLED_BEFORE 1
@@ -409,6 +412,64 @@ isnt:
 tigcc_not_selected:
 FunctionEnd
 
+; Confirm settings window
+Function ConfirmSettings
+  !insertmacro MUI_HEADER_TEXT "Confirm Settings" "Please double-check and confirm your settings."
+  Push $INSTDIR
+  Call Nsis2Io
+  Pop $1
+  WriteINIStr "$PLUGINSDIR\dlgcnfrm.ini" "Field 4" "Text" $1
+  Push $ICONS_GROUP
+  Call Nsis2Io
+  Pop $1
+  WriteINIStr "$PLUGINSDIR\dlgcnfrm.ini" "Field 6" "Text" $1
+  StrCpy $2 ""
+  SectionGetFlags 1 $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  IntCmp $0 0 ide_not_selected
+  StrCpy $2 "$2IDE; "
+ide_not_selected:
+  SectionGetFlags 2 $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  IntCmp $0 0 tigcc_not_selected
+  StrCpy $2 "$2Command Line Compiler; "
+tigcc_not_selected:
+  SectionGetFlags 3 $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  IntCmp $0 0 examples_not_selected
+  StrCpy $2 "$2Examples; "
+examples_not_selected:
+  SectionGetFlags 5 $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  IntCmp $0 0 a68k_not_selected
+  StrCpy $2 "$2A68k; "
+a68k_not_selected:
+  SectionGetFlags 6 $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  IntCmp $0 0 exepack_not_selected
+  StrCpy $2 "$2ExePack Compression; "
+exepack_not_selected:
+  StrLen $1 $2
+  IntOp $1 $1 - 2
+  StrCpy $2 $2 $1
+  WriteINIStr "$PLUGINSDIR\dlgcnfrm.ini" "Field 8" "Text" $2
+  SectionGetFlags 2 $0
+  IntOp $0 $0 & ${SF_SELECTED}
+  IntCmp $0 0 tigcc_not_selected2
+  IntCmp $SET_PATH 0 set_path_no
+  WriteINIStr "$PLUGINSDIR\dlgcnfrm.ini" "Field 10" "Text" "Yes"
+  Goto tigcc_selected
+set_path_no:
+  WriteINIStr "$PLUGINSDIR\dlgcnfrm.ini" "Field 10" "Text" "No"
+  Goto tigcc_selected
+tigcc_not_selected2:
+  WriteINIStr "$PLUGINSDIR\dlgcnfrm.ini" "Field 10" "Text" "No, command line compiler not installed"
+tigcc_selected:
+  !insertmacro MUI_INSTALLOPTIONS_INITDIALOG "dlgcnfrm.ini"
+  Pop $0 ;HWND of dialog
+  !insertmacro MUI_INSTALLOPTIONS_SHOW
+FunctionEnd
+
 ; Uninstallation
 Function un.onUninstSuccess
   HideWindow