diff --git a/BuildFiles/Building/scripts/compile-site-resources b/BuildFiles/Building/scripts/compile-site-resources index 5072a850..53ff8438 100755 --- a/BuildFiles/Building/scripts/compile-site-resources +++ b/BuildFiles/Building/scripts/compile-site-resources @@ -7,24 +7,32 @@ cd frontend/App_GlobalResources # Compile .resx to .resources -find . -iname '*.resx' -exec resgen -compile {} \; -find . -iname '*.resx' -delete -find . -iname '*.designer.cs' -delete +#find . -iname '*.resx' -exec resgen -compile {} \; +#find . -iname '*.resx' -delete +#find . -iname '*.designer.cs' -delete -# Compile .resources to .resources.dll +# Compile .resources to .resources.dll; embed all cultures in one assembly -for F in *; do - if [ -d "$F" ]; then - # $F is a directory - cd $F - find . -iname '*.resources' -exec al /target:lib /culture:$F /version:1.0.0.0 /embed:{} /out:../{}.dll \; - cd .. - elif [[ $F == *.resources ]]; then - al /target:lib /embed:$F /version:1.0.0.0 /out:$F.dll - fi +for SOURCEFILE in $(cat SourceResourcesFiles.txt); do + EMBEDTARGETS= + for EMBEDTARGET in $(find -iname "$SOURCEFILE*" -print); do + EMBEDTARGETS="$EMBEDTARGETS /embed:${EMBEDTARGET:2}" + done + echo "al /target:lib $EMBEDTARGETS /out:Swarmops.Frontend.$SOURCEFILE.resources.dll" + al /target:lib $EMBEDTARGETS /version:1.0.0.0 /out:Swarmops.Frontend.$SOURCEFILE.resources.dll done -rename 's/^/Swarmops\.Frontend\./' *.dll +#for F in *; do +# if [ -d "$F" ]; then + # $F is a directory +# cd $F +# find . -iname '*.resources' -exec al /target:lib /culture:$F /version:1.0.0.0 /embed:{} /out:../{}.dll \; +# cd .. +# elif [[ $F == *.resources ]]; then +# echo "al -target:lib -embed:$F -out:$F.dll" +# al /target:lib /embed:$F /version:1.0.0.0 /out:$F.dll +# fi +#done find . -iname '*.resources' -delete @@ -34,4 +42,3 @@ cd .. rsync -av --remove-source-files --recursive App_GlobalResources/ bin/ rm -r App_GlobalResources/ cd .. -