Index: branches/blackosx/package/Resources.source/ConvertResourcesTextFile.pl =================================================================== --- branches/blackosx/package/Resources.source/ConvertResourcesTextFile.pl (revision 1838) +++ branches/blackosx/package/Resources.source/ConvertResourcesTextFile.pl (revision 1839) @@ -1,24 +1,24 @@ #!/usr/bin/perl -# This script converts a human readable file for all the -# language 'Resources' for the Chameleon package installer -# in to a simple format ready for merging with pre-defined -# templates during compilation. +# This script converts a human readable file for all the language 'Resources' +# for the Chameleon package installer in to a simple format ready for merging +# with pre-defined templates during compilation. # -# The human readable file is hosted on Google Docs at: -# www....... +# The human readable file is a hosted on Google Docs Spreadsheet. +# To view the readonly spreadsheet, go here: +# https://docs.google.com/spreadsheet/ccc?key=0Aj0jJ2rdmK_sdFdNbm45NlpNYU1PcjRmOHVXX0FNa3c # -# The spreadsheet is a published file and will be -# automatically downloaded as a UTF-8, tabbed delimited -# text file which will be saved in the folder indicated -# by the two arguments passed when calling this. +# The spreadsheet is a published file and will be automatically downloaded by this +# script as a UTF-8, tabbed delimited text file which will be saved in the folder +# indicated by the two arguments passed. # -# Call this script with: -# ./ConvertResourcesTextFile.pl path filename -# # buildpkg.sh calls this with the following defaults: # path: ${PKG_BUILD_DIR} # filename: ResourcesSourceFile.txt +# +# This script can be called manually by using: +# ./ConvertResourcesTextFile.pl path filename +# use LWP::Simple; Index: branches/blackosx/package/buildpkg.sh =================================================================== --- branches/blackosx/package/buildpkg.sh (revision 1838) +++ branches/blackosx/package/buildpkg.sh (revision 1839) @@ -1038,13 +1038,19 @@ # Build an array for each the Welcome, Conclusion and Description Resource files per language. if [[ "$foundCode" != "" ]] && [[ "$foundDescription" != "" ]]; then if [[ "$resourceToUse" == "Welcome" ]] || [[ "$resourceToUse" == "Conclusion" ]]; then + # Convert description from UFT8 to raw unicode markup + # ************************************************************ + # FIX ME: + # This ony works on Lion. + # The command on Snow Leopard yields different results?? + # ************************************************************ convertedFoundDescription=$( echo $foundDescription | textutil -convert rtf -encoding UTF-8 -stdin -stdout ) + # Strip away unicode text up to and including '\f0\fs24 \cf0' - take what's after. strippedConvertedFoundDescription="${convertedFoundDescription#*\\f0\\fs24 \\cf0 }" # Remove last three characters from string and replace all backslashes with a double backslash. - fixStrippedConvertedFoundDescription=$( echo "${strippedConvertedFoundDescription%???}" | sed -e 's/\\/\\\\/g' ) - #echo "$fixStrippedConvertedFoundDescription" + fixStrippedConvertedFoundDescription=$( echo "${strippedConvertedFoundDescription%???}" | sed -e 's/\\/\\\\/g' ) buildCodes[${#buildCodes[*]}]="$foundCode=$fixStrippedConvertedFoundDescription" fi if [[ "$resourceToUse" == "Description" ]]; then