I use this script to compile Qt-Projects on Linux through wine. When executed without any arguments it spawns a shell that has the most important build-commands wrapped to call the ones installed in wine.

windev

#!/bin/bash
export WINEPREFIX="$HOME/.opt/windev"

MINGW='C:\Qt\Qt5.2.0\Tools\mingw48_32\bin'
QTROOT='C:\Qt\Qt5.2.0\5.2.0\mingw48_32\bin'
INNOSETUP='C:\Program Files (x86)\Inno Setup 5'

SYSTEM='c:\windows;c:\windows\system'
export Path="$SYSTEM;$MINGW;$QTROOT;$INNOSETUP"
export WINEDEBUG=-all

qmake() {
	wine qmake.exe $@
}
export -f qmake

cmake() {
	wine cmake.exe $@
}
export -f cmake

gcc() {
	wine gcc.exe $@
}
export -f gcc

g++() {
	wine g++.exe $@
}
export -f g++

make() {
	wine mingw32-make.exe $@
}
export -f make

iscc() {
	wine iscc.exe $@
}
export -f iscc

case "$1" in

	'')
		bash --rcfile <(echo 'source ~/.bashrc; PS1="\u@\e[0;31mwindev\e[0m:\w> "')
		;;

	*.exe)
		wine $@
		;;

	*)
		$@
		;;
esac

No comments yet.

Leave a Comment

I respect your privacy
I don't run any trackers on this site.

Your questionable browsing-history should remain between you and the NSA ;-)
Contact