pages/SiteConfig.nsi
author Neal Gompa <neal@enanocms.org>
Fri, 18 Dec 2009 20:36:15 -0600
changeset 9 100ba25b6dba
parent 5 85800cb04cc5
child 10 014d58335b6d
permissions -rwxr-xr-x
Adding uninstall commands for shortcuts, we don't want unnecessary stuff floating around after the uninstallation...
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
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     4
  !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS "pages\SiteConfig.ini" "SiteConfig.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     5
  !insertmacro XPUI_HEADER_TEXT "Configure website" "Enter basic information about your website."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     6
  !insertmacro XPUI_INSTALLOPTIONS_DISPLAY "SiteConfig.ini"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     7
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     8
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
     9
Function SiteConfigLeave
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    10
  StrCmp $XPUI_ABORTED 1 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    11
    Return
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    12
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    13
  ReadINIStr $site_name "$PLUGINSDIR\SiteConfig.ini" "Field 1" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    14
  StrCmp $site_name "" 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    15
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter a name for your site."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    16
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    17
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    18
  ReadINIStr $site_desc "$PLUGINSDIR\SiteConfig.ini" "Field 2" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    19
  StrCmp $site_desc "" 0 +3
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    20
    MessageBox MB_OK|MB_ICONEXCLAMATION "Please enter a description for your site."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    21
    Abort
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    22
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    23
  ReadINIStr $site_copyright "$PLUGINSDIR\SiteConfig.ini" "Field 3" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    24
  StrCmp $site_copyright "" 0 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    25
    StrCpy $site_copyright "No copyright assigned."
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    26
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    27
  Push $site_copyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    28
  Call CleanCopyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    29
  Pop $site_copyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    30
  
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    31
  StrCpy $url_scheme "standard"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    32
  ReadINIStr $0 "$PLUGINSDIR\SiteConfig.ini" "Field 4" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    33
  IntCmp $0 1 0 +2 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    34
    StrCpy $url_scheme "short"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    35
    
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    36
  StrCpy $start_with "blank"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    37
  ReadINIStr $0 "$PLUGINSDIR\SiteConfig.ini" "Field 6" "State"
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    38
  IntCmp $0 1 0 +2 +2
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    39
    StrCpy $start_with "tutorial"
2
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
    40
    
0c0d5dadfca3 Added LockWindow calls to all custom page exit paths to smooth transitions
Dan
parents: 0
diff changeset
    41
  LockWindow on
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    42
FunctionEnd
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    43
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    44
Function CleanCopyright
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    45
  Pop $0
5
85800cb04cc5 Moved around some ExperienceUI directives; fixed missing $XPUI_ABORTED check in StackSelectLeave
Dan
parents: 2
diff changeset
    46
  ${str_replace} $0 "©" "&copy;" "$0"
0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    47
  Push $0
67e1cc6cd929 First commit. It's working!
Dan
parents:
diff changeset
    48
FunctionEnd