Merge from default. Hope I did it right...

This commit is contained in:
Emil Martinec
2012-03-08 20:27:30 -06:00
parent 380728e1f0
commit f47b4b5bb0
262 changed files with 41736 additions and 37104 deletions

View File

@@ -169,7 +169,7 @@ namespace RTProfilerBuilder {
NameValueCollection nvEXIF = ParseFullExifData(sourceFile);
// File should be Windows ANSI
using (TextWriter tw = new StreamWriter(sourceFile + ".pp3", false, Encoding.Default)) {
using (TextWriter tw = new StreamWriter(sourceFile + ".pp3", false, new UTF8Encoding(false))) {
string section = "";
foreach (string line in lines) {
@@ -211,6 +211,7 @@ namespace RTProfilerBuilder {
ProcessStartInfo psi = new ProcessStartInfo(exifToolPath, "\"" + filePath + "\" -tab -short");
psi.CreateNoWindow = false;
psi.UseShellExecute = false;
psi.StandardOutputEncoding = System.Text.Encoding.UTF8;
psi.RedirectStandardOutput = true;
Process p = Process.Start(psi);

239
tools/benchmarkRT Executable file
View File

@@ -0,0 +1,239 @@
#!/usr/bin/env bash
# Use this Bash script to test RT processing speed.
# Written by DrSlony
# 2012-02-10
# www.seeitmyway.org
# www.rawtherapee.com
revision="tip"
inFile='http://rawtherapee.com/shared/test_images/colorspace_flowers.pef'
sidecarDefault=("neutral.pp3" "default.pp3")
buildType="release"
branch="default"
rtExe="rawtherapee"
repo="${HOME}/rawtherapee"
OPTIND=1 # Reset in case getopts has been used previously in the shell.
outFileFormat="-t"
tmpDir="/tmp/rawtherapee-benchmark"
runs=3
howto() {
fold -s <<END
Benchmark the time it takes for a given version of RawTherapee to process a file. The designated file will be processed three times in a row, and the average time of those three runs will be calculated. Make sure you have no unnecessary background activity - no programs intensely using the CPU. Turn off all P2P, multimedia, graphics editing, games, database, server and other "heavy" software, otherwise the timings will be skewed. You can use the "top" and "ps ux" commands to see a list of running processes and their CPU usage.
Usage:
./benchmarkRT [OPTIONS]
Options:
-b <type> - Specify the CMAKE_BUILD_TYPE.
The default value is "release".
Valid types are:
release
debug
minsizerel
relwithdebuginfo
-e - Specify the whole path to (but excluding) the "rawtherapee"
executable.
e.g. "-e $HOME/rt_${branch}_${buildType}"
-h - Print this help screen.
-i <file> - Input file name. This can be a file on your hard drive or a url.
The url must start with "http". The default behavior if you do
not use -i is to download a test file from www.rawtherapee.com
-m <path> - Path to your clone of the RawTherapee source code repository.
The default path is ~/rawtherapee
If you do not specify a path and ~/rawtherapee is not found, it
will be cloned.
-r <rev> - You can try out any revision of RawTherapee.
Valid values are digits or the word "tip" (excluding quotation
marks), e.g.
1234
tip
-s <file> - Input sidecar file name. The name of the PP3 or XMP file by
which the input file must be developed.
This can be a file on your hard drive or a url.
The default behaviour if you do not use -s is to use the
"neutral" profile.
Examples:
Run the default benchmark (recommended)
./benchmarkRT
Run a benchmark using your own files and existing RT clone dir
./benchmarkRT -b release -i kittens.raw -s kittens.raw.pp3 -m /home/fruitloops/rawtherapee-clone -r 4.0.0
Further help:
If you need further help, discover bugs or want to request new functionality
in this script, then tell us in the forum or on IRC:
http://rawtherapee.com/forum/
http://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1
END
}
buildRT() {
[[ ! -e "${repo}/.hg/hgrc" ]] && {
printf "Error: Cannot find the RawTherapee source code repository in ${repo}\nEither run this script using the -m <path> option, or proceed and have the source code repository cloned automatically.\n" | fold -s
read -p "Do you want to proceed? y/n: " YN
[[ "$YN" != y ]] && exit 1
[[ ! -w /tmp ]] && { printf "Error: /tmp is not writable.\n"; exit 1; }
repo="${tmpDir}/repo"
hg clone https://rawtherapee.googlecode.com/hg/ "$repo"
}
cd "$repo"
hg pull
hg update -r "$revision" || {
printf "About to run \"hg update -C\" which will undo any changes you made to the cloned source code repository. YOU MIGHT LOSE YOUR WORK!\n"
read -p "Do you want to undo all uncommitted changes? y/n: " YN
[[ "$YN" != y ]] && exit 1
hg update -C
hg update -r "$revision" || { printf "Something went wrong while trying to update your cloned source code repository. Exiting.\n"; exit 1; }
}
make clean
./clean.sh
verLatestTag="`hg parents --template '{LATESTTAG}'`"
verMajor="${verLatestTag%%.*}"
cmake -DCMAKE_BUILD_TYPE="$buildType" -DPROC_TARGET_NUMBER:STRING=2 -DCMAKE_INSTALL_PREFIX=rawtherapee -DBUILD_BUNDLE=ON -DBINDIR=. -DDATADIR=. -DCACHE_NAME_SUFFIX="$verMajor"
cpuCount="`grep -c 'processor' /proc/cpuinfo`"
make -j"$cpuCount" install
mv "$buildType" "${tmpDir}/rt_${branch}_${buildType}"
rtExe="${tmpDir}/rt_${branch}_${buildType}/rawtherapee"
}
while getopts "e:h?r:i:s:m:b:" opt; do
case "$opt" in
e) customExeDir="$OPTARG"
;;
h|\?)
howto
exit 0
;;
r) revision="$OPTARG"
buildRT
;;
i) inFile="$OPTARG"
;;
s) sidecarCustom="$OPTARG"
;;
m) repo="$OPTARG"
;;
b) buildType="$OPTARG"
;;
esac
done
shift $((OPTIND-1))
[ "$1" = "--" ] && shift
# tmpDir = /tmp/rawtherapee-benchmark
# if buildRT got called then repo = "${tmpDir}/repo" else repo = ${HOME}/rawtherapee
inFileName="`basename ${inFile}`"
if [[ ! -e "${tmpDir}" ]]; then
if [[ ! -w /tmp ]]; then
printf "Error: /tmp is not writable.\n"
exit 1
fi
mkdir "$tmpDir"
fi
cd "$tmpDir"
[[ ${inFile} = http* ]] && {
[[ ! -e "${tmpDir}/${inFileName}" ]] && {
printf "${inFileName} not found in ${tmpDir}, downloading it.\n"
[[ ! -w /tmp ]] && { printf "Error: /tmp is not writable.\n"; exit 1; }
[[ ! -e "$tmpDir" ]] && mkdir "$tmpDir"
cd "$tmpDir"
wget -c --trust-server-names "$inFile"
echo
}
}
if [[ -n "${sidecarCustom}" ]]; then # if sidecarCustom was specified
if [[ ${sidecarCustom} = http* ]]; then # and if sidecarCustom starts with an http
if [[ ! -e "${tmpDir}/${sidecarCustom##*/}" ]]; then # and if sidecarCustom hasn't been previously downloaded, then download it
printf "${sidecarCustom} not found in ${tmpDir}, downloading it.\n"
[[ ! -w /tmp ]] && { printf "Error: /tmp is not writable.\n"; exit 1; }
[[ ! -e "$tmpDir" ]] && mkdir "$tmpDir"
cd "$tmpDir"
wget -c --trust-server-names "$sidecarCustom"
fi
else # else if sidecarCustom does not start with an http
[[ ! -e "${sidecarCustom}" ]] && { # then check if it exists
printf "You specified \"-i ${sidecarCustom}\" but it doesn't exist."
exit 1
}
unset sidecarFiles # just to be sure, since custom supports only 1 file.
sidecarFiles="${sidecarCustom}"
fi
else # if sidecarCustom was not specified, use the ones in sidecarDefault
sidecarDirs=("${tmpDir}/rt_${branch}_${buildType}/profiles/" "${tmpDir}/" "${repo}/rt_${branch}_${buildType}/profiles/" "${repo}/rtdata/profiles/" "$HOME/.config/RawTherapee4/profiles/")
for dir in "${sidecarDirs[@]}"; do
for sidecar in "${sidecarDefault[@]}"; do
# echo "Checking for ${sidecar} in ${dir}"
if [[ -f "${dir}/${sidecar}" ]]; then
sidecarDir="$dir"
found="true"
# echo "Found sidecar ${sidecar} in ${sidecarDir[@]}"
fi
done
[[ -n $found ]] && break
done
# if the loop above did not find a neutral.pp3 anywhere, then we download one to $tmpDir
[[ -z $found ]] && {
wget -c --trust-server-names "http://code.google.com/p/rawtherapee/source/browse/rtdata/profiles/neutral.pp3" "http://code.google.com/p/rawtherapee/source/browse/rtdata/profiles/default.pp3"
sidecarDir="$tmpDir"
}
sidecarFiles=("${sidecarDefault[@]}")
fi
rtExeDirs=("${customExeDir}" "${tmpDir}/rt_${branch}_${buildType}" "$HOME/rt_${branch}_${buildType}" "${repo}/rt_${branch}_${buildType}" "${repo}/release" "$HOME/rawtherapee/")
for rtExeDir in "${rtExeDirs}"; do
#if [[ -n "$customExe"
if [[ -x "${rtExeDir}/${rtExe}" ]]; then
break
else
printf "%s\n" "Could not find the rawtherapee executable. Either re-run this script using the -e flag, or continue to have this script clone the source code repository and compile RawTherapee for you. For this to work, you need to have the correct dependencies installed - see http://rawtherapee.com/forum/viewtopic.php?f=10&t=3001#p22213" | fold -s
echo
read -p "Do you want to proceed? y/n: " YN
[[ "$YN" = y ]] && buildRT || exit 0
fi
done
printf "%s\n" "Benchmark of RawTherapee"
uname -srvmpio
echo
rtATBdirs=("${tmpDir}/rt_${branch}_${buildType}" "$HOME/rt_${branch}_${buildType}" "${repo}/rt_${branch}_${buildType}" "${repo}/release" "$HOME/rawtherapee")
for rtATBdir in "${rtATBdirs[@]}"; do
if [[ -f "${rtATBdir}/AboutThisBuild.txt" ]]; then
printf "%s\n" "${rtATBdir}/AboutThisBuild.txt"
cat "${rtATBdir}/AboutThisBuild.txt"
break
fi
done
printf "%s\n" "Input file: ${inFileName}"
unset sidecar
for sidecar in "${sidecarFiles[@]}"; do
unset benchmark
for (( i=1; i<=${runs}; i++ )); do
# printf "%s\n" "rtExe is $rtExe" "tmpDir is $tmpDir" "sidecarDir is $sidecarDir" "sidecar is $sidecar" "outFileFormat is $outFileFormat" "tmpDir is $tmpDir" "inFileName is $inFileName"
benchmark+=("`\time -f %e "${rtExeDir}/${rtExe}" -o "$tmpDir" -p "${sidecarDir}/${sidecar}" "$outFileFormat" -Y -c "${tmpDir}/${inFileName}" 2>&1 >/dev/null`")
printf "%b\n" "Benchmark ${sidecar} ${i}: ${benchmark[$i - 1]}"
done
avg=$( { printf "scale=2; ("; IFS="+"; printf %s "${benchmark[*]}"; echo ") / ${#benchmark[@]}"; } | bc)
printf "%b\n" "Benchmark ${sidecar} average:\t${avg}"
done
printf "Total runtime:\t`IFS=+; bc -l <<< "${benchmark[*]}"`\n"

243
tools/buildRT Executable file
View File

@@ -0,0 +1,243 @@
#!/usr/bin/env bash
# Written by DrSlony
# Version 2.0.1, 2012-02-15
# Please report bugs or enhancements to http://code.google.com/p/rawtherapee/issues/list
# www.seeitmyway.org
# www.rawtherapee.com
checkDeps () {
hash hg 2>&- || { echo "Mercurial not found, install Mercurial first and then re-run this script." >&2; exit 1; }
hash curl 2>&- || { echo "Curl not found, install curl first and then re-run this script." >&2; exit 1; }
}
getBranches () {
branches=(); while read branch _; do branches+=("$branch"); done < <(curl -s 'https://rawtherapee.googlecode.com/hg/?cmd=branchmap'; echo)
}
hgClone () {
[[ -d "${repo}" ]] || { echo "${repo} not found, cloning from GoogleCode"; hg clone https://rawtherapee.googlecode.com/hg/ "${repo}"; }
cd "${repo}" || exit 1
}
menu () {
num=1
# list[0] is manually set to clone to avoid columns, so we make a bogus one and hide it so that the index will match the list entries
list[0]="im hungry omnonom"
buildTypes=(release debug)
for branch in ${branches[@]}
do
for buildType in ${buildTypes[@]}
do
list+=( "$num - ${branch} - ${buildType}" )
((num++))
done
done
((num--)) # cause of num++ in the for loop increasing a number after the last list item
printf "%s\n------------------------------------------\n# - branch - build type\n------------------------------------------\n"
printf "%s\n" "0 - only clone the repository and exit"
printf "%s\n" "${list[@]:1}" | column -t
echo -e "------------------------------------------\n\nIf you don't know which option to choose,\nthen choose the \"default\" branch,\n\"release\" build type.\n\nEnter your choices, each number\nseparated by a single space.\ne.g. 7 8\n"
echo -n "Your choices: "
read -a choiceNumbers
#sanitize
choiceNumbers=${choiceNumbers//[^0-9 ]/}
echo
}
compile () {
for choiceNumber in ${choiceNumbers[@]}
do
[[ $choiceNumber = 0 ]] && {
echo "Repository cloned."
hg parents --template 'RawTherapee-{latesttag}.{latesttagdistance} Latest tag: {latesttag}, Latest tag distance: {latesttagdistance}, Changeset: {rev}:{node|short}\n'
exit 0;
}
read _ _ branch _ buildType < <( echo ${list[$choiceNumber]} )
echo
printf "%-15b %b\n" "About to compile:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget" "" ""
[[ -d "${repo}/${buildType}" ]] && { printf "%s\n" "Found old build directory \"$buildType\" in your repository. Removing it."; rm -rf "${repo}/${buildType}"; }
[[ -d "${HOME}/rt_${branch}_${buildType}" ]] && {
printf "%s\n" "Found old build directory ${HOME}/rt_${branch}_${buildType}" "It must be removed to proceed."
read -p "Do you want to remove it and proceed? y/n: " YN
[[ "$YN" = y ]] && rm -rf "${HOME}/rt_${branch}_${buildType}" || exit 1
}
cd "$repo" || exit 1
echo
printf "%s\n" "Cleaning out old CMake files"
make clean
./clean.sh
echo
# if you manually applied a patch, this check avoids having it undone or broken by a hg update
if [[ ! $patched = b ]]; then
printf "%s\n" "\$patched is ${patched}"
printf "%s\n" "Updating the local repository."
hg pull
hg update ${branch}
else
printf "%s\n" "You ran this script with the \"b\" option (\"build-only\")." "Skipping repository update and binary zip creation."
fi
printf "%s\n" "" "Starting compilation:"
verLatesttag="`hg parents --template '{latesttag}'`"
verLatesttagdistance="`hg parents --template '{latesttagdistance}'`"
verMajor=${verLatesttag%%.*}
cmake -DCMAKE_BUILD_TYPE="$buildType" -DPROC_TARGET_NUMBER="$procTarget" -DCMAKE_C_FLAGS="-O2 -pipe" -DCMAKE_CXX_FLAGS="$CMAKE_C_FLAGS" -DCMAKE_CXX_FLAGS_RELEASE="$CMAKE_CXX_FLAGS" "$noomp" -DCMAKE_INSTALL_PREFIX="rawtherapee" -DBUILD_BUNDLE="ON" -DBINDIR="." -DDATADIR="." -DCACHE_NAME_SUFFIX="$verMajor" || { echo "Error during cmake, exiting." >&2; exit 1; }
time { make -j${cpuCount} install; } || { printf "%s\n" "" "Error during make, exiting."; exit 1; }
printf "%-15b %b\n" "" "" "Rawtherapee compiled:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget" "" ""
[[ -d "${repo}/${buildType}" ]] && { printf "%s\n" "Moving \"${repo}/${buildType}\" to \"${repo}/rawtherapee\""; mv "${repo}/${buildType}" "${repo}/rawtherapee"; } || { printf "%s\n" "Could not find the directory containing the compiled RawTherapee in ${repo}" "Please notify DrSlony in the forum:" "http://rawtherapee.com/forum/viewtopic.php?f=10&t=3001#p22213" "" "Exiting"; exit 1; }
echo
cat AboutThisBuild.txt || { printf "%s\n" "${repo}/AboutThisBuild.txt not found, exiting."; exit 1; }
# AboutThisBuild.txt has a blank line at the end - 4.0.7
if [[ ! $patched = b ]]; then
printf "%s\n" "Zipping the compiled RawTherapee dir \"${repo}/rawtherapee\" and putting it in \"/tmp/RawTherapee_${branch}_${distribution}_${bits}_${verLatesttag}.${verLatesttagdistance}_${buildType}.zip\""
[[ -e "/tmp/RawTherapee_${branch}_${distribution}_${bits}_${verLatesttag}.${verLatesttagdistance}_${buildType}.zip" ]] && { rm "/tmp/RawTherapee_${branch}_${distribution}_${bits}_${verLatesttag}.${verLatesttagdistance}_${buildType}.zip" || exit 1; }
zip -Xrq "/tmp/RawTherapee_${branch}_${distribution}_${bits}_${verLatesttag}.${verLatesttagdistance}_${buildType}.zip" AboutThisBuild.txt rawtherapee
fi
printf "%s\n" "" "Moving \"${repo}/rawtherapee\" to \"${HOME}/rt_${branch}_${buildType}\""
mv "${repo}/rawtherapee" "${HOME}/rt_${branch}_${buildType}" || { printf "%s\n" "" "Could not move \"${repo}/rawtherapee\" to \"${HOME}/rt_${branch}_${buildType}\", exiting."; exit 1; }
printf "%-15b %b\n" "" "" "Build ready:" "" "\tChoice number:" "$choiceNumber" "\tBranch:" "$branch" "\tBuild type:" "$buildType" "\tTarget:" "$procTarget"
printf "%s\n" "" "To run RawTherapee, fire up a terminal and type:" "~/rt_${branch}_${buildType}/rawtherapee" "" "------------------------------------------"
alert "RawTherapee-${verLatesttag}.${verLatesttagdistance} ready.\nChoice number ${choiceNumber}, branch: ${branch}, type: ${buildType}, target: ${procTarget}"
done
}
checkDistro () {
# list from http://linuxmafia.com/faq/Admin/release-files.html
distributions=(
"Annvix /etc/annvix-release"
"Arch /etc/arch-release"
"Arklinux /etc/arklinux-release"
"Aurox /etc/aurox-release"
"BlackCat /etc/blackcat-release"
"Cobalt /etc/cobalt-release"
"Conectiva /etc/conectiva-release"
"Debian /etc/debian_version"
"Fedora /etc/fedora-release"
"Gentoo /etc/gentoo-release"
"Immunix /etc/immunix-release"
"Knoppix knoppix_version"
"Linux-From-Scratch /etc/lfs-release"
"Linux-PPC /etc/linuxppc-release"
"Mandrake /etc/mandrake-release"
"Mandriva_Mandrake /etc/mandriva-release /etc/mandrake-release /etc/mandrakelinux-release"
"Mint /etc/linuxmint/info"
"MkLinux /etc/mklinux-release"
"Novell /etc/nld-release"
"PLD /etc/pld-release"
"RedHat /etc/redhat-release"
"CentOS /etc/centos-release"
"Slackware /etc/slackware-version"
"SME /etc/e-smith-release"
"Solaris /etc/release"
"SunJDS /etc/sun-release"
"SUSE /etc/SuSE-release"
"TinySofa /etc/tinysofa-release"
"TurboLinux /etc/turbolinux-release"
"Ubuntu /etc/lsb-release"
"UltraPenguin /etc/ultrapenguin-release"
"United /etc/UnitedLinux-release"
"VA-Linux /etc/va-release"
"YellowDog /etc/yellowdog-release"
)
for element in "${distributions[@]}"; do
read distro loc1 loc2 loc3 <<< "$element"
for loc in $loc1 $loc2 $loc3
do
# distribution=${distro} because if none of the elements match, distro will =YellowDog (last item in the list)
# add "break 2;" to the end if we really want to, but Ubuntu gets detected as Debian first, then as Ubuntu,
# so we might want to not break the loop.
[[ -e "$loc" ]] && { distribution=${distro}; echo "Distribution detected as ${distribution}"; }
done
done
if [[ -z ${distribution} ]]
then
echo -e "\nCould not automatically detect your distribution.\nPlease enter it below followed immediately by the version\nwithout any spaces or punctuation marks and hit enter,\n.e.g. \"Ubuntu1104\", \"Mint11\" or \"Musix20\""
read distribution
#sanitize
distribution=${distribution//[^a-zA-Z0-9]/}
echo "Distribution entered manually: ${distribution}"
fi
}
checkBits () {
bits=`uname -m` || { echo -e "Is your system a 32 or 64 bit one?\nEnter 32 or 64 and hit enter."; read bits; bits=${bits//[^0-9]/}; echo "bits entered manually: ${bits}"; }
if [[ $bits = *64* ]]
then
bits=64
echo "Bits detected as ${bits}"
else
bits=32
echo "Bits detected as ${bits}"
fi
[[ $bits != 32 ]] && [[ $bits != 64 ]] && checkBits
}
setVars () {
unset choiceNumber choiceNumbers buildType buildTypes list branch branches repo param
checkDistro
checkBits
repo="${HOME}/rawtherapee" && echo "Repository is set to ${repo}"
cpuCount="`grep -c 'processor' /proc/cpuinfo`"
if (( "$cpuCount" >= 1 && "$cpuCount" <= 8 )); then echo "CPU count detected as ${cpuCount}"; else cpuCount="1"; echo "CPU count set to ${cpuCount}"; fi
procTarget="2" && echo "procTarget set to ${procTarget}"
if hash notify-send 2>/dev/null; then alert_type="notify-send"
elif hash kdialog 2>/dev/null; then alert_type="kdialog"
elif hash zenity 2>/dev/null; then alert_type="zenity"
elif hash xmessage 2>/dev/null; then alert_type="xmessage"
else alert_type="none"
fi
}
alert () {
case "$alert_type" in
notify-send) notify-send "RawTherapee" "$1";;
kdialog) kdialog --title "RawTherapee" --passivepopup "$1";;
zenity) zenity --notification --text="$1";;
xmessage) xmessage -nearmouse "$1";;
none) printf "%b\n" "" "Compilation complete:" "$1";;
esac
}
finishUp () {
# builds=( /tmp/RawTherapee* ); for f in ${builds[@]}; do echo ${f#/tmp/}; done
if [[ $patched != b ]]; then
printf "%s\n" "RawTherapee zipped builds ready in /tmp"
ls -lh /tmp/RawTherapee*
fi
printf "%s\n" "" "Finished building all chosen versions of RawTherapee"
}
# program start
printf "%s\n" "Running the RawTherapee build script."
for param in "$@"
do
[[ $param = b ]] && { patched="b"; echo "Detected buildonly flag"; }
[[ $param = noomp ]] && { noomp="-DOPTION_OMP=OFF"; echo "Detected noomp flag"; }
done
setVars
checkDeps
getBranches
menu
hgClone
compile
finishUp

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Append translation differences on the end of all files. Developers should run this script
# after changing default, so that translators can easily see what items need to be translated.
@@ -15,36 +15,34 @@ if [[ $? != 0 ]]; then
exit
fi
#First thing, we want to strip default of any !s and duplicates.
cat "default" | grep -v '^!' | sort -Vu > "$TEMP"
#First thing, we want to strip default of any "!" and duplicates.
grep -v '^!' default | sort -Vu > "$TEMP"
mv "$TEMP" "default"
echo "Generating differences... this may take a few minutes."
find . |
grep -v 'default' |
grep -v 'README' |
grep -v 'LICENSE' |
grep -v 'generateDiffs.sh' |
grep -v "$TEMP" |
grep -v '^.$' |
#Find all language files, excluding non-language files
find . -not -iname "default" -not -iname "LICENSE" -not -iname "README" -not -iname "*.sh" -not -iname ".*" -not -iname "$TEMP" |
#for every found language file X
while read X; do
echo "Working on differences for $X"
#Start by copying the existing file to a temporary one, after sorting and removing all
#previous differences
cat "$X" | grep -v '^!' | sort -Vu > "$TEMP"
#Start by copying the existing file to a temporary one, after sorting and removing all "!"
grep -v '^!' "$X" | sort -Vu > "$TEMP"
echo -e "\n\n!!!!!!!!!!!!!!!!!!!!!!!!!\n! Untranslated keys follow; remove the ! prefix after an entry is translated.\n!!!!!!!!!!!!!!!!!!!!!!!!!\n\n" >> "$TEMP"
cat 'default' | grep -v '^#' | while read LINE; do
KEY=`echo "$LINE" | cut -f 1 -d ';'`
grep -q "^$KEY" "$X";
if [[ $? != 0 ]]; then
echo "!$LINE" >> "$TEMP"
fi
done
#find every line that is not a comment
grep -v '^#' default | while read LINE
do
KEY=${LINE%%;*}
grep -q "^$KEY" "$X"
if [[ $? != 0 ]]
then
echo '!'"${LINE}" >> "$TEMP"
fi
done
#Replace the old file with the new one, with a section at the end for differences.
mv "$TEMP" "$X"

View File

@@ -16,9 +16,9 @@ The repository tools/source_icons contains source icons (in svg format) and the
=================================
=== tools/source_icons/script ===
=================================
- the main script to create the icons in make_all_icon_theme.bash
- the main script which creates the icons is make_all_icon_theme.bash
- launch make_all_icon_theme.bash tools/source_icons/scalable /tmp/png
- the icons and an archive will be created in /tmp/png
- an archive with all the icons will be created in /tmp/png
================================
=== guidelines for icon name ===

View File

@@ -1 +1,2 @@
edit-copy.png,w22
gtk-copy.png,w22

View File

@@ -1 +1,2 @@
edit-paste.png,w22
gtk-paste.png,w22