Annotation of embedaddon/php/ext/intl/tests/resourcebundle.build, revision 1.1
1.1 ! misho 1: <?php
! 2: // THIS SCRIPT WILL REBUILD ResourceBundle bundles from source files
! 3:
! 4: // DEFINE YOUR ICU TOOLS PATH HERE
! 5: define("ICU_DIR", "C:/PROJECTS/ICU40/BIN/");
! 6:
! 7: $here = dirname(__FILE__);
! 8:
! 9: $dir = new GlobIterator("$here/_files/*.txt", FilesystemIterator::KEY_AS_FILENAME);
! 10:
! 11: foreach($dir as $file) {
! 12: passthru( ICU_DIR."genrb -s $here/_files/ -d $here/_files/resourcebundle ".$file->getFileName());
! 13: }
! 14:
! 15: $dir = new GlobIterator("$here/_files/resourcebundle/*.res", FilesystemIterator::KEY_AS_FILENAME);
! 16: foreach($dir as $file) {
! 17: if($file->getFileName() == "res_index.res") continue;
! 18: $list[] = str_replace(".res", "", $file->getFileName());
! 19: }
! 20:
! 21: $filelist = join(" {\"\"}\n", $list);
! 22: $res_index = <<<END
! 23: res_index:table(nofallback) {
! 24: InstalledLocales {
! 25: $filelist {""}
! 26: }
! 27: }
! 28: END;
! 29: file_put_contents("$here/_files/res_index.txt", $res_index);
! 30:
! 31: passthru( ICU_DIR."genrb -s $here/_files/ -d $here/_files/resourcebundle res_index.txt");
! 32:
! 33: // passthru(ICU_DIR."icupkg -tl -a $here/rb.txt -s $here/_files -d $here/_files new $here/_files/resourcebundle.dat");
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>