pages/SiteConfig.nsi
author Dan Fuhry <dan@enanocms.org>
Sat, 21 Aug 2010 18:20:18 -0400
changeset 11 b62383876fdb
parent 10 014d58335b6d
permissions -rwxr-xr-x
Merged from accidental split
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     1
Page custom SiteConfigCreate SiteConfigLeave " - Configure site information"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     3
Function SiteConfigCreate
10
014d58335b6d Changed behavior of the entire database selection process. A real "upgrade"/"don't touch the database" option was added, and the old options unconditionally delete the database.
Dan Fuhry <dan@enanocms.org>
parents: 5
diff changeset
     4
  IntCmp $skip_install 0 +2
014d58335b6d Changed behavior of the entire database selection process. A real "upgrade"/"don't touch the database" option was added, and the old options unconditionally delete the database.
Dan Fuhry <dan@enanocms.org>
parents: 5
diff changeset
     5
    Abort
014d58335b6d Changed behavior of the entire database selection process. A real "upgrade"/"don't touch the database" option was added, and the old options unconditionally delete the database.
Dan Fuhry <dan@enanocms.org>
parents: 5
diff changeset
     6
  
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     7
  !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS "pages\SiteConfig.ini" "SiteConfig.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     8
  !insertmacro XPUI_HEADER_TEXT "Configure website" "Enter basic information about your website."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     9
  !insertmacro XPUI_INSTALLOPTIONS_DISPLAY "SiteConfig.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    10
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    11
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    12
Function SiteConfigLeave
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    13
  StrCmp $XPUI_ABORTED 1 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    14
    Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    15
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    16
  ReadINIStr $site_name "$PLUGINSDIR\SiteConfig.ini" "Field 1" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    17
  StrCmp $site_name "" 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    18
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter a name for your site."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    19
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    20
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    21
  ReadINIStr $site_desc "$PLUGINSDIR\SiteConfig.ini" "Field 2" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    22
  StrCmp $site_desc "" 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    23
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter a description for your site."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    24
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    25
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    26
  ReadINIStr $site_copyright "$PLUGINSDIR\SiteConfig.ini" "Field 3" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    27
  StrCmp $site_copyright "" 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    28
    StrCpy $site_copyright "No copyright assigned."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    29
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    30
  Push $site_copyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    31
  Call CleanCopyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    32
  Pop $site_copyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    33
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    34
  StrCpy $url_scheme "standard"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    35
  ReadINIStr $0 "$PLUGINSDIR\SiteConfig.ini" "Field 4" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    36
  IntCmp $0 1 0 +2 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    37
    StrCpy $url_scheme "short"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    38
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    39
  StrCpy $start_with "blank"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    40
  ReadINIStr $0 "$PLUGINSDIR\SiteConfig.ini" "Field 6" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    41
  IntCmp $0 1 0 +2 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    42
    StrCpy $start_with "tutorial"
2
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
    43
    
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
    44
  LockWindow on
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    45
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    46
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    47
Function CleanCopyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    48
  Pop $0
5
85800cb04cc5 Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents: 2
diff changeset
    49
  ${str_replace} $0 "©" "&copy;" "$0"
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    50
  Push $0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    51
FunctionEnd