Changeset 19201


Ignore:
Timestamp:
2009-04-22T16:44:51+12:00 (12 years ago)
Author:
oranfry
Message:

installer pages asking if the user wants to enable the admin pages and if so asking for a password, plus the necessary ant targets to make it happen

Location:
release-kits
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • release-kits/lirk2/installer/antinstall-config.xml

    r18723 r19201  
    8383    </page>
    8484
    85     <page type="input" name="admin-password" displayText="">
     85    <page type="input" name="admin-pages" displayText="">
     86        <comment name="admin-expl"/>
     87        <comment name="admin-expl-2"/>
     88        <comment name="admin-expl-3"/>
     89        <checkbox property="enable.admin.pages" displayText="" defaultValue="false"/>
     90    </page>
     91
     92    <page type="input" name="admin-password" displayText="" ifProperty="(${enable.admin.pages}==true)" target="Configuring Administration Pages">
    8693        <comment name="admin-password-expl"/>
    87 <!--        <validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>-->
    88         <text property="admin.password" defaultValue="admin" displayText=""/>
     94        <validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>
    8995    </page>
     96
    9097    <!-- end binary release -->
    9198
  • release-kits/lirk2/installer/build.xml

    r19136 r19201  
    6666        <echo/>
    6767
    68         <echo>Creating admin and demo users</echo>
    69         <adduser txt2db="${installDir}/bin/linux/txt2db"
    70             usersDb="${installDir}/etc/users.gdb"
    71             username="admin"
    72             password="${admin.password}"
    73             groups="administrator,colbuilder"
    74             comment="created at install time"/>
    75         <adduser
    76             txt2db="${installDir}/bin/linux/txt2db"
    77             usersDb="${installDir}/etc/users.gdb"
    78             username="demo"
    79             password="demo"
    80             groups="demo"
    81             comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
    82 
     68   
    8369        <echo>Set the installation locale in config files</echo>
    8470        <rsr file="${installDir}/setup.bash" pattern="^gsdllang=.*" replacement="gsdllang=${language}"/>
     
    9379        <echo file="${installDir}/etc/main.cfg" append="true"
    9480            >cgiarg          shortname=l argdefault=${language}</echo>
    95 
    96         <rsr file="${installDir}/etc/main.cfg" pattern="^status .*" replacement="status enabled"/>
    9781
    9882        <echo>Setting up apache web server</echo>
     
    162146            >cgiarg          shortname=l argdefault=${language}</echo>
    163147
    164         <rsr file="${installDir}/etc/main.cfg" pattern="^status .*" replacement="status enabled"/>
    165 
    166148        <echo>Create usage.txt</echo>
    167149        <echo file="${installDir}/etc/usage.txt"></echo>
     
    172154    </target>
    173155
     156    <target name="Configuring Administration Pages" if="enable.admin.pages">
     157        <echo>Enabling Admin Pages</echo>
     158        <rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
     159        <echo>Creating admin and demo users</echo>
     160        <adduser txt2db="${installDir}/bin/linux/txt2db"
     161            usersDb="${installDir}/etc/users.gdb"
     162            username="admin"
     163            password="${admin.password}"
     164            groups="administrator,colbuilder"
     165            comment="created at install time"/>
     166        <adduser
     167            txt2db="${installDir}/bin/linux/txt2db"
     168            usersDb="${installDir}/etc/users.gdb"
     169            username="demo"
     170            password="demo"
     171            groups="demo"
     172            comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
     173    </target>
     174
    174175</project>
  • release-kits/mark2/installer/antinstall-config.xml

    r18723 r19201  
    7878
    7979    </page>
     80
     81    <page type="input" name="admin-pages" displayText="">
     82        <comment name="admin-expl"/>
     83        <comment name="admin-expl-2"/>
     84        <comment name="admin-expl-3"/>
     85        <checkbox property="enable.admin.pages" displayText="" defaultValue="false"/>
     86    </page>
     87
     88    <page type="input" name="admin-password" displayText="" ifProperty="(${enable.admin.pages}==true)" target="Configuring Administration Pages">
     89        <comment name="admin-password-expl"/>
     90        <validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>
     91    </page>
     92
    8093    <!-- end binary release -->
    8194
    82     <page type="input" name="admin-password" displayText="">
    83         <comment name="admin-password-expl"/>
    84 <!--        <validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>-->
    85         <text property="admin.password" defaultValue="admin" displayText=""/>
    86     </page>
    8795
    8896    <page type="progress" name="progress" showTargets="true" displayText=""/>
  • release-kits/mark2/installer/build.xml

    r19136 r19201  
    5555        <rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
    5656        <echo/>
    57 
    58         <echo message="Creating admin and demo users"/>
    59         <adduser txt2db="${installDir}/bin/darwin/txt2db"
    60             usersDb="${installDir}/etc/users.gdb"
    61             username="admin"
    62             password="${admin.password}"
    63             groups="administrator,colbuilder"
    64             comment="created at install time"/>
    65         <adduser
    66             txt2db="${installDir}/bin/darwin/txt2db"
    67             usersDb="${installDir}/etc/users.gdb"
    68             username="demo"
    69             password="demo"
    70             groups="demo"
    71             comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
    7257
    7358        <!-- delete unneeded files -->     
     
    153138    </target>
    154139
     140    <target name="Configuring Administration Pages" if="enable.admin.pages">
     141        <echo>Enabling Admin Pages</echo>
     142        <rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
     143        <echo message="Creating admin and demo users"/>
     144        <adduser txt2db="${installDir}/bin/darwin/txt2db"
     145            usersDb="${installDir}/etc/users.gdb"
     146            username="admin"
     147            password="${admin.password}"
     148            groups="administrator,colbuilder"
     149            comment="created at install time"/>
     150        <adduser
     151            txt2db="${installDir}/bin/darwin/txt2db"
     152            usersDb="${installDir}/etc/users.gdb"
     153            username="demo"
     154            password="demo"
     155            groups="demo"
     156            comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
     157    </target>
    155158
    156159
  • release-kits/wirk2/installer/antinstall-config.xml

    r18723 r19201  
    9393    </page>
    9494
    95     <page type="input" name="admin-password" displayText="">
     95    <page type="input" name="admin-pages" displayText="">
     96        <comment name="admin-expl"/>
     97        <comment name="admin-expl-2"/>
     98        <comment name="admin-expl-3"/>
     99        <checkbox property="enable.admin.pages" displayText="" defaultValue="false"/>
     100    </page>
     101
     102    <page type="input" name="admin-password" displayText="" ifProperty="(${enable.admin.pages}==true)" target="Configuring Administration Pages">
    96103        <comment name="admin-password-expl"/>
    97 <!--        <validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>-->
    98         <text property="admin.password" defaultValue="admin" displayText=""/>
     104        <validated property="admin.password" defaultValue="" displayText="" regex="^.{3,20}$"/>
    99105    </page>
     106
     107
    100108    <!-- end binary release -->
    101109
  • release-kits/wirk2/installer/build.xml

    r19136 r19201  
    7070        </copy>
    7171       
     72        <echo>Correcting perl shebangs in perl scripts</echo>
     73        <property name="perl.executable" value="${installDir.local}\bin\windows\perl\perl.exe"/>
     74        <rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
     75       
     76        <echo>Creating the english dictionary</echo>
     77        <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
     78        <echo/>
     79
     80        <echo message="Creating installation properties file"/>
     81        <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
     82       
     83        <echo message="Finished"/>
     84       
     85    </target>
     86
     87    <target name="Installing ImageMagick">
     88        <echo message="Installing ImageMagick"/>
     89        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
     90        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
     91        <!--<sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>-->
     92        <delete file="imagemagick.lzma"/>
     93        <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/windows"/>
     94        <delete file="imagemagick.comp"/>
     95    </target>
     96
     97    <target name="Installing Ghostscript">
     98        <echo message="Installing GhostScript"/>
     99        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
     100        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
     101        <!--<sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>-->
     102        <delete file="ghostscript.lzma"/>
     103        <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/windows"/>
     104        <delete file="ghostscript.comp"/>
     105    </target>
     106   
     107    <!-- Start menu shortcuts -->
     108    <target name="Installing Start Menu Shortcuts">
     109
     110        <mkdir dir="${startmenu.path}\Documentation"/>
     111       
     112        <shortcut
     113            file="${startmenu.path}\Greenstone Server.lnk"
     114            execute="${installDir}\server.exe"
     115            workingDirectory="${installDir}"
     116            iconFile="${installDir}\images\serverico.ico"
     117            iconIndex="0" />
     118
     119        <shortcut
     120            file="${startmenu.path}\Librarian Interface (GLI).lnk"
     121            execute="${installDir}\gli\gli.bat"
     122            workingDirectory="${installDir}\gli"
     123            iconFile="${installDir}\images\icon.ico"
     124            iconIndex="0" />
     125
     126        <shortcut
     127            file="${startmenu.path}\Metadata Set Editor (GEMS).lnk"
     128            execute="${installDir}\gli\gems.bat"
     129            workingDirectory="${installDir}\gli"
     130            iconFile="${installDir}\images\gems.ico"
     131            iconIndex="0" />
     132
     133        <shortcut
     134            file="${startmenu.path}\Uninstall.lnk"
     135            execute="${installDir}\Uninstall.bat"
     136            workingDirectory="${installDir}"
     137            iconFile="${installDir}\images\uninstall.ico"
     138            iconIndex="0" />
     139
     140        <shortcut
     141            file="${startmenu.path}\Documentation\READMEen.lnk"
     142            execute="${installDir}\READMEen.txt" />
     143
     144        <shortcut
     145            file="${startmenu.path}\Documentation\Greenstone Wiki.url"
     146            url="http://wiki.greenstone.org" />
     147
     148            <shortcut
     149            file="${startmenu.path}\Documentation\Greenstone Website.url"
     150            url="http://www.greenstone.org" />
     151           
     152<!--
     153        <shortcut
     154            file="${startmenu.path}\Documentation\READMEes.lnk"
     155            execute="${installDir}\READMEes.txt" />
     156
     157        <shortcut
     158            file="${startmenu.path}\Documentation\READMEar.lnk"
     159            execute="${installDir}\READMEar.txt" />
     160
     161        <shortcut
     162            file="${startmenu.path}\Documentation\READMEfr.lnk"
     163            execute="${installDir}\READMEfr.txt" />
     164
     165        <shortcut
     166            file="${startmenu.path}\Documentation\READMEru.lnk"
     167            execute="${installDir}\READMEru.txt" />
     168        -->
     169
     170    </target>
     171
     172    <target name="Source Release" depends="">
     173
     174        <!-- create the installation directory -->
     175        <echo message="Creating Installation directory"/>
     176        <mkdir dir="${installDir}"/>
     177
     178        <!-- extract 7za tool -->
     179        <unzip src="${antinstaller.jar}" dest="${basedir}">
     180            <patternset><include name="7za.exe"/></patternset>
     181        </unzip>
     182
     183        <echo>Installing Source Release</echo>
     184        <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
     185        <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x source-release.lzma"/></exec>
     186        <delete file="source-release.lzma"/>
     187        <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
     188        <delete file="source-release.comp"/>
     189
     190        <!-- figure out the start menu path -->
     191        <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>       
     192        <path id="startmenu.path.path" path="${startmenu.path}"/>
     193        <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
     194
     195        <echo message="Filling in concrete values in config files"/>
     196        <rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
     197        <rsr file="${installDir}/cgi-bin/gsdlsite.cfg">
     198            <job pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
     199            <job pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
     200            <job pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
     201        </rsr>
     202
     203        <echo>Create usage.txt</echo>
     204        <echo file="${installDir}/etc/usage.txt"></echo>
     205               
     206        <echo message="Creating installation properties file"/>
     207        <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
     208       
     209        <echo message="Finished"/>
     210       
     211    </target>
     212
     213    <target name="Configuring Administration Pages" if="enable.admin.pages">
     214        <echo>Enabling Admin Pages</echo>
     215        <rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
    72216        <echo message="Creating admin and demo users"/>
    73217        <adduser
     
    85229            groups="demo"
    86230            comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
    87 
    88         <echo>Correcting perl shebangs in perl scripts</echo>
    89         <property name="perl.executable" value="${installDir.local}\bin\windows\perl\perl.exe"/>
    90         <rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
    91        
    92         <echo>Creating the english dictionary</echo>
    93         <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
    94         <echo/>
    95 
    96         <echo message="Creating installation properties file"/>
    97         <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
    98        
    99         <echo message="Finished"/>
    100        
    101     </target>
    102 
    103     <target name="Installing ImageMagick">
    104         <echo message="Installing ImageMagick"/>
    105         <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
    106         <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x imagemagick.lzma"/></exec>
    107         <!--<sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>-->
    108         <delete file="imagemagick.lzma"/>
    109         <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/windows"/>
    110         <delete file="imagemagick.comp"/>
    111     </target>
    112 
    113     <target name="Installing Ghostscript">
    114         <echo message="Installing GhostScript"/>
    115         <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
    116         <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x ghostscript.lzma"/></exec>
    117         <!--<sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>-->
    118         <delete file="ghostscript.lzma"/>
    119         <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/windows"/>
    120         <delete file="ghostscript.comp"/>
    121     </target>
    122    
    123     <!-- Start menu shortcuts -->
    124     <target name="Installing Start Menu Shortcuts">
    125 
    126         <mkdir dir="${startmenu.path}\Documentation"/>
    127        
    128         <shortcut
    129             file="${startmenu.path}\Greenstone Server.lnk"
    130             execute="${installDir}\server.exe"
    131             workingDirectory="${installDir}"
    132             iconFile="${installDir}\images\serverico.ico"
    133             iconIndex="0" />
    134 
    135         <shortcut
    136             file="${startmenu.path}\Librarian Interface (GLI).lnk"
    137             execute="${installDir}\gli\gli.bat"
    138             workingDirectory="${installDir}\gli"
    139             iconFile="${installDir}\images\icon.ico"
    140             iconIndex="0" />
    141 
    142         <shortcut
    143             file="${startmenu.path}\Metadata Set Editor (GEMS).lnk"
    144             execute="${installDir}\gli\gems.bat"
    145             workingDirectory="${installDir}\gli"
    146             iconFile="${installDir}\images\gems.ico"
    147             iconIndex="0" />
    148 
    149         <shortcut
    150             file="${startmenu.path}\Uninstall.lnk"
    151             execute="${installDir}\Uninstall.bat"
    152             workingDirectory="${installDir}"
    153             iconFile="${installDir}\images\uninstall.ico"
    154             iconIndex="0" />
    155 
    156         <shortcut
    157             file="${startmenu.path}\Documentation\READMEen.lnk"
    158             execute="${installDir}\READMEen.txt" />
    159 
    160         <shortcut
    161             file="${startmenu.path}\Documentation\Greenstone Wiki.url"
    162             url="http://wiki.greenstone.org" />
    163 
    164             <shortcut
    165             file="${startmenu.path}\Documentation\Greenstone Website.url"
    166             url="http://www.greenstone.org" />
    167            
    168 <!--
    169         <shortcut
    170             file="${startmenu.path}\Documentation\READMEes.lnk"
    171             execute="${installDir}\READMEes.txt" />
    172 
    173         <shortcut
    174             file="${startmenu.path}\Documentation\READMEar.lnk"
    175             execute="${installDir}\READMEar.txt" />
    176 
    177         <shortcut
    178             file="${startmenu.path}\Documentation\READMEfr.lnk"
    179             execute="${installDir}\READMEfr.txt" />
    180 
    181         <shortcut
    182             file="${startmenu.path}\Documentation\READMEru.lnk"
    183             execute="${installDir}\READMEru.txt" />
    184         -->
    185 
    186     </target>
    187 
    188     <target name="Source Release" depends="">
    189 
    190         <!-- create the installation directory -->
    191         <echo message="Creating Installation directory"/>
    192         <mkdir dir="${installDir}"/>
    193 
    194         <!-- extract 7za tool -->
    195         <unzip src="${antinstaller.jar}" dest="${basedir}">
    196             <patternset><include name="7za.exe"/></patternset>
    197         </unzip>
    198 
    199         <echo>Installing Source Release</echo>
    200         <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
    201         <exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x source-release.lzma"/></exec>
    202         <delete file="source-release.lzma"/>
    203         <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
    204         <delete file="source-release.comp"/>
    205 
    206         <!-- figure out the start menu path -->
    207         <getfreepath path="${win32.personal.programs_menu}\Greenstone-@version@" property="startmenu.path"/>       
    208         <path id="startmenu.path.path" path="${startmenu.path}"/>
    209         <pathconvert targetos="unix" property="startmenu.path.unix" refid="startmenu.path.path"/>
    210 
    211         <echo message="Filling in concrete values in config files"/>
    212         <rsr file="${installDir}/setup.bat" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
    213         <rsr file="${installDir}/cgi-bin/gsdlsite.cfg">
    214             <job pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
    215             <job pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
    216             <job pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
    217         </rsr>
    218 
    219         <echo>Create usage.txt</echo>
    220         <echo file="${installDir}/etc/usage.txt"></echo>
    221                
    222         <echo message="Creating installation properties file"/>
    223         <echo file="${installDir}\etc\installation.properties">installed.startmenu.path:${startmenu.path.unix}</echo>
    224        
    225         <echo message="Finished"/>
    226        
    227     </target>
     231    </target>
     232
    228233
    229234
Note: See TracChangeset for help on using the changeset viewer.