THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
#!/usr/bin/tclsh8.5 package require platform set confarea "/DocumentArea/scripts" #Write a file "AOO-LANG", place it in $confarea , it define language list, it will modify #languages list in file "main/instsetoo_native/util/pack.lst" and configure's parametre "--with-lang" set buildarea "/BuildArea/ooo" #Define AOO source place. set os [platform::identify] set buildbin "main/solenv/bin/build.pl" set svnrev [lindex [lindex [split [exec /opt/csw/bin/svn info $buildarea] \n] 9] end ] set builddate [clock format [clock seconds] -format "%Y-%m-%d %H:%M:%S"] set dev_parametre "" #=======Define AOO Build Type==================== #option :normal,devsnap # "normal" is normal installation sets # "devsnap" is Developer Snapshots set buildtype "devsnap" #================================================ #=======Define Special Platform Parametres======= set solaris10_special "--disable-mozilla --disable-cups --with-system-python \ --enable-presenter-console --enable-wiki-publisher --enable-minimizer" set solaris11_special "" set linux_special "" #================================================ if {$os=="solaris2.10-ix86"} { set os_parametre $solaris10_special } if {$os=="solaris2.11-ix86"} { set os_parametre $solaris11_special } #=======Define Compiler and System Env=========== if {$os=="solaris2.10-ix86" || $os=="solaris2.11-ix86"} { set CC "/opt/solarisstudio12.3/bin/cc" set CXX "/opt/solarisstudio12.3/bin/CC" set PATH "/usr/gnu/bin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin" set LD_LIBRARY_PATH "/opt/solarisstudio12.3/lib:/usr/sfw/lib" set platenv "SolarisX86Env.Set.sh" } #================================================ #=======Define Language========================== set lf [open "$confarea/AOO-LANG" r] set langlist [lrange [split [read $lf] \n] 0 end-1] close $lf set lang_parametre "\"$langlist\"" foreach i $langlist { append lanlist1 "$i," append lanlist2 "$i|" } set lanlist1 [string range $lanlist1 0 end-1] set lanlist2 [string range $lanlist2 0 end-1] #================================================ #===========Autres=============================== set autre_parametre "--with-junit=/BuildArea/junit.jar " #Add other need parametres,ex junit's place #================================================ #===========Define Build Type==================== if {$buildtype=="normal"} { set buildwork "cd $buildarea/main/instsetoo_native\n" append buildwork "LD_LIBRARY_PATH=$LD_LIBRARY_PATH $buildarea/$buildbin --all" } if {$buildtype=="devsnap"} { set buildwork "cd $buildarea/main/instsetoo_native\n" set utilpath "$buildarea/main/instsetoo_native/util/" file copy -force $utilpath/makefile.mk $utilpath/makefile.mk-bak file copy -force $utilpath/pack.lst $utilpath/pack.lst-bak set fm [open $utilpath/makefile.mk r] set pakmk [split [read $fm] \n] close $fm set fm [open $utilpath/makefile.mk w] foreach i $pakmk { if {$i=="ALLTAR : openoffice sdkoo_en-US ure_en-US"} { puts $fm "ALLTAR : updatepack" } else { puts $fm $i } } close $fm set fp [open $utilpath/pack.lst w] puts $fp "OpenOffice_Dev_multilang unxlngi6.pro,unxlngx6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro $lanlist1 openofficedev" puts $fp "OpenOffice_Dev_SDK unxlngi6.pro,unxlngx6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro en-US sdkoodev" puts $fp "OpenOfficeDevLanguagepack unxlngi6.pro,unxlngx6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro $lanlist2 ooodevlanguagepack" close $fp # append buildwork "CC=$CC CXX=$CXX PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH $buildarea/$buildbin --all" append buildwork "LD_LIBRARY_PATH=$LD_LIBRARY_PATH $buildarea/$buildbin --all" } #================================================ #=======Generate Build Script==================== set f [open $buildarea/buildaoo.sh w] puts $f "#!/usr/bin/bash" puts $f "cd $buildarea/main" #puts $f "wget http://people.apache.org/~arielch/patches/aoo-dev-pack.lst" puts $f "CC=$CC CXX=$CXX PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH \ $buildarea/main/configure $os_parametre --with-lang=$lang_parametre \ $autre_parametre $dev_parametre --with-build-version=\"$builddate - Rev.$svnrev\"" puts $f "sed 's/sh/bash/' $buildarea/main/fetch_tarballs.sh > tmp" puts $f "cat tmp > $buildarea/main/fetch_tarballs.sh" puts $f "bash $buildarea/main/bootstrap" puts $f ". $buildarea/main/$platenv" puts $f $buildwork close $f #================================================ #============Start Build========================= set mf [open /tmp/mstat w] puts $mf "Building AOO ..." close $mf cd $buildarea/main/instsetoo_native exec -ignorestderr sh $buildarea/buildaoo.sh > $buildarea/buildlog set mf [open /tmp/mstat w] puts $mf "Idle" close $mf #================================================ |
...