Contrib/ExperienceUI/Langpage.nsi
author Dan
Mon, 03 Aug 2009 22:17:31 -0400
changeset 16 13a1c9383c02
parent 11 2cb95c9bb633
permissions -rwxr-xr-x
Unstable release: ExperienceUI 1.3.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     1
!VERBOSE 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     2
!define XPUI_VERBOSE 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     3
!define XPUI_SILENT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     4
!define XPUI_INSTALLOPTIONS_MAXFIELD 4
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     5
!ifndef XPUI_LANGINI_LIST_B
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     6
  !error "This script should only be compiled through the ExperienceUI's internal multi-language support system!"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     7
!endif
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     8
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
     9
SetCompress off
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    10
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    11
Name "Select Language"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    12
Caption " "
11
2cb95c9bb633 Fixed some langpage bugs
Dan
parents: 0
diff changeset
    13
OutFile "$%TEMP%\LangDialog.exe"
0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    14
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    15
MiscButtonText "" "" "" OK
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    16
!define XPUI_DISABLEBG
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    17
!define XPUI_ABORTPAGE_TEXT "The wizard was interrupted before the program could be installed.\r\n\r\nYour system has not been modified.  To install the program at a later time, please run this setup wizard again.\r\n\r\n\r\n\r\n\r\nPlease click $\"$(XPUI_BUTTONTEXT_CLOSE)$\" to exit the NSIS installation wizard."
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    18
!define XPUI_ABORTPAGE_SUBTITLE "Setup did not complete successfully."
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    19
!define XPUI_ABORTPAGE_CAPTION " "
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    20
!include XPUI.nsh
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    21
!VERBOSE 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    22
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    23
Page custom LangSelect LangSelectFin ""
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    24
;Page custom CancelConfirm CancelConfirmFin ""
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    25
!insertmacro XPUI_PAGE_ABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    26
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    27
Function LangSelect
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    28
Call GetParameters
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    29
Pop $0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    30
StrCmp $0 "/CancelDialog" 0 +2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    31
Abort
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    32
SetOutPath $PLUGINSDIR
11
2cb95c9bb633 Fixed some langpage bugs
Dan
parents: 0
diff changeset
    33
File "${XPUI_SYSDIR}\INI\LangDlg.ini"
0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    34
WriteINIStr "$PLUGINSDIR\LangDlg.ini" "Field 1" ListItems "${XPUI_LANGINI_LIST_B}"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    35
StrCpy $XPUI_TEMP1 "${XPUI_LANGINI_LIST_B}"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    36
StrCpy $XPUI_HWND 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    37
PipeLoop:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    38
StrCpy $XPUI_TEMP2 $XPUI_TEMP1 1 $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    39
StrCmp $XPUI_TEMP2 | foundPipe
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    40
IntOp $XPUI_HWND $XPUI_HWND + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    41
Goto PipeLoop
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    42
FoundPipe:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    43
StrCpy $XPUI_TEMP1 $XPUI_TEMP1 $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    44
WriteINIStr "$PLUGINSDIR\LangDlg.ini" "Field 1" State "$XPUI_TEMP1"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    45
InstallOptions::initDialog /NOUNLOAD $PLUGINSDIR\LangDlg.ini
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    46
Pop $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    47
!insertmacro XPUI_CONTROL_SKIN $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    48
GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1200
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    49
!insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    50
GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1201
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    51
!insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    52
CreateFont $XPUI_TEMP2 "Tahoma" 8 700
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    53
SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    54
GetDlgItem $XPUI_TEMP1 $XPUI_HWND 1202
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    55
!insertmacro XPUI_CONTROL_SKIN $XPUI_TEMP1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    56
CreateFont $XPUI_TEMP2 "Tahoma" 8 350
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    57
SendMessage $XPUI_TEMP1 0x30 $XPUI_TEMP2 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    58
!insertmacro XPUI_HEADER_TEXT "Select Language" "Please select which language to use in the installer."
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    59
InstallOptions::show
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    60
FunctionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    61
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    62
Function LangSelectFin
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    63
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    64
Call GetParameters
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    65
Pop $0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    66
StrCmp $0 "/CancelDialog" 0 +2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    67
Return
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    68
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    69
; Reset everything
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    70
StrCpy $XPUI_HWND 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    71
StrCpy $XPUI_TEMP1 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    72
StrCpy $XPUI_TEMP2 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    73
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    74
ReadINIStr $XPUI_NOABORTWARNING $PLUGINSDIR\LangDlg.ini "Field 1" State
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    75
!include `${CHECKLIST}`
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    76
/*
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    77
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    78
; First, find out if user selected first language...
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    79
StrCpy $XPUI_TEMP1 "${XPUI_LANGINI_LIST_B}"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    80
StrCpy $XPUI_HWND 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    81
PipeLoop1:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    82
StrCpy $XPUI_TEMP2 $XPUI_TEMP1 1 $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    83
StrCmp $XPUI_TEMP2 | foundPipe1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    84
IntOp $XPUI_HWND $XPUI_HWND + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    85
Goto PipeLoop1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    86
FoundPipe1:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    87
StrCpy $XPUI_TEMP1 $XPUI_TEMP1 $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    88
ReadINIStr $XPUI_NOABORTWARNING $PLUGINSDIR\LangDlg.ini "Field 1" State
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    89
StrCmp $XPUI_TEMP1 $NOABORTWARNING "" PipeLoop2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    90
StrCpy $XPUI_TEMP1 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    91
Goto Done
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    92
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    93
PipeLoop2:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    94
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    95
; Reset everything
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    96
StrCpy $XPUI_HWND 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    97
StrCpy $XPUI_TEMP1 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    98
StrCpy $XPUI_TEMP2 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
    99
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   100
PipeLoop:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   101
StrCpy $XPUI_TEMP2 "${XPUI_LANGINI_LIST_B}" 1 $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   102
StrCmp $XPUI_TEMP2 "" Done
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   103
StrCmp $XPUI_TEMP2 | foundPipe
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   104
IntOp $XPUI_HWND $XPUI_HWND + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   105
Goto PipeLoop
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   106
FoundPipe:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   107
IntOp $XPUI_TEMP1 $XPUI_TEMP1 + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   108
IntOp $XPUI_HWND $XPUI_HWND + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   109
ReadINIStr $XPUI_NOABORTWARNING $PLUGINSDIR\LangDlg.ini "Field 1" State
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   110
StrLen $XPUI_TEMP2 "$NOABORTWARNING"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   111
StrCpy $XPUI_TEMP2 "${XPUI_LANGINI_LIST_B}" $XPUI_TEMP2 $XPUI_HWND
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   112
StrCmp $XPUI_TEMP2 $NOABORTWARNING Done PipeLoop
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   113
Goto PipeLoop
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   114
Done:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   115
IntOp $XPUI_TEMP1 $XPUI_TEMP1 * 4
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   116
StrCpy $0 "${XPUI_LANGIDLIST_LIST_B}" 4 $XPUI_TEMP1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   117
SetErrorLevel $0       */
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   118
MessageBox MB_OK|MB_ICONEXCLAMATION "The language page system could not detect the language ID.  The installer will use the first language inserted in the script file."
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   119
SetErrorLevel 0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   120
FunctionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   121
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   122
/*
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   123
Function CancelConfirm
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   124
Call GetParameters
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   125
Pop $0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   126
StrCmp $0 "/CancelDialog" +2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   127
Abort
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   128
SetOutPath $PLUGINSDIR
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   129
File "${NSISDIR}\Contrib\ExperienceUI\Ini\CancelConfirm.ini"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   130
!insertmacro XPUI_INSTALLOPTIONS_DISPLAY "CancelConfirm.ini"
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   131
FunctionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   132
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   133
Function CancelConfirmFin
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   134
  ReadINIStr $0 $PLUGINSDIR\CancelConfirm.ini "Field 2" State
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   135
  StrCmp $0 1 "" ResumeOnLogin
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   136
  SetErrorLevel 5
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   137
  Return
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   138
  ResumeOnLogin:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   139
  ReadINIStr $0 $PLUGINSDIR\CancelConfirm.ini "Field 3" State
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   140
  StrCmp $0 1 "" Resume
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   141
  SetErrorLevel 6
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   142
  Return
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   143
  Resume:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   144
  SetErrorLevel 7
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   145
FunctionEnd */
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   146
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   147
Function .onUserAbort
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   148
StrCmp $XPUI_ABORTED 1 Done
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   149
MessageBox MB_YESNO|MB_ICONQUESTION "You are about to quit setup.$\n$\nIf you quit now, the program will not be installed.$\n$\nDo you want to continue?" IDNO CancelQuit
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   150
!insertmacro XPUI_USERABORT
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   151
CancelQuit:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   152
Abort
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   153
Done:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   154
SetErrorLevel 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   155
FunctionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   156
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   157
Section
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   158
SectionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   159
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   160
 Function GetParameters
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   161
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   162
   Push $R0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   163
   Push $R1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   164
   Push $R2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   165
   Push $R3
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   166
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   167
   StrCpy $R2 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   168
   StrLen $R3 $CMDLINE
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   169
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   170
   ;Check for quote or space
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   171
   StrCpy $R0 $CMDLINE $R2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   172
   StrCmp $R0 '"' 0 +3
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   173
     StrCpy $R1 '"'
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   174
     Goto loop
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   175
   StrCpy $R1 " "
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   176
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   177
   loop:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   178
     IntOp $R2 $R2 + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   179
     StrCpy $R0 $CMDLINE 1 $R2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   180
     StrCmp $R0 $R1 get
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   181
     StrCmp $R2 $R3 get
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   182
     Goto loop
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   183
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   184
   get:
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   185
     IntOp $R2 $R2 + 1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   186
     StrCpy $R0 $CMDLINE 1 $R2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   187
     StrCmp $R0 " " get
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   188
     StrCpy $R0 $CMDLINE "" $R2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   189
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   190
   Pop $R3
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   191
   Pop $R2
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   192
   Pop $R1
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   193
   Exch $R0
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   194
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   195
 FunctionEnd
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   196
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   197
 !insertmacro XPUI_LANGUAGE English
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   198
d5ce4c64ef88 Initial population with stock ExUI 1.11pre + a couple of fixes needed to compile the installer
Dan
parents:
diff changeset
   199
!VERBOSE 1