--- modules/gui/qt4/Modules.am	Sun Sep  9 19:29:16 2007
+++ modules/gui/qt4/Modules.am	Tue Sep 11 16:59:47 2007
@@ -77,8 +77,8 @@
 	rm -f $@ $@.tmp
 	echo "#define Q_(a,b) QString::fromUtf8(_(a))" > $@.tmp
 	$(UIC) -tr "Q_" $< >> $@.tmp
-	sed -i -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp
-	mv -f $@.tmp $@
+	sed -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp >$@
+	rm -f $@.tmp
 
 dialogs/help.cpp: dialogs/about.hpp
 
--- Makefile.am	Sat Sep  8 14:49:00 2007
+++ Makefile.am	Tue Sep 11 16:58:24 2007
@@ -736,8 +736,11 @@
 		done; \
 	done
 	unix2dos $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg;
-	sed -i 's%share/osdmenu%osdmenu%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg
-	sed -i 's%/%\\%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg 
+	for file in $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg; do \
+		sed 's%share/osdmenu%osdmenu%g' $$file >$$file.tmp; \
+		sed 's%/%\\%g' $$file.tmp >$$file; \
+		rm -f $$file.tmp; \
+	done
 
 
 package-win32-base: package-win32-base-debug package-win-common-strip
@@ -750,6 +753,8 @@
 	    MAKENSIS="makensis -DVERSION=${VERSION}"; \
 	elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
 	    MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis /DVERSION=${VERSION}"; \
+	elif [ -x "${PROGRAMFILES}/NSIS/makensis" ]; then \
+	    MAKENSIS="${PROGRAMFILES}/NSIS/makensis -DVERSION=${VERSION}"; \
 	elif wine --version >dev/null 2>&1; then \
 	    MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe /DVERSION=${VERSION}"; \
 	else \
