qt


Qt: Run a script BEFORE make


I have a script, runScript.sh, that I would like to have run (to setup some environment variables and such) BEFORE making the application.
Using advice from Running a program/script from QMake, in my .pro file, I have on the first line,
QMAKE_POST_LINK += ./runScript.sh
which will, on a make, compile and link my application and THEN run the script.
I've seen examples of how to set the script up as a target in the .pro file,but I am not sure if I quite grasp the concept. Could someone explain it better or (even better) does anyone know how to do what I'm trying to do simpler (I was hoping for a "QMAKE_PRE_LINK" but that does not seem to exist lol)?
Using Qt-4.8.4 & qmake 2.03
Link you've posted explaines that very well.
extralib.target = extra
extralib.commands = echo "Building extralib.."; \ # Run your programs here
make -w -C ../my_libraries/extralib; \
echo "Done building extralib."; \
extralib.depends =
QMAKE_EXTRA_TARGETS += extralib
PRE_TARGETDEPS = extra
So, that could just be rewritten as
extralib.target = extra
extralib.commands = echo "Setuping the envirovment.."; \
export MYVAR="/usr/src/whatever" \
export SECONDVAR="/home/user" \
./runScript.sh
extralib.depends =
QMAKE_EXTRA_TARGETS += extralib
PRE_TARGETDEPS = extra

Related Links

Setting initial size of QTabWidget
QDir hangs on accessing CIFS remote folder when disconnected
Connect to a SLOT in Qt
Custom drawing of a QSlider (Qt)
Warning while building project using Qt 5.1 on OSX
Qlabel and Qtimer (need to make image blink)
Range of QVector
how to pass qobject as argument from signal to slot in qt connect
setViewportMargins() and “locked” rows and columns
Unable to connect signal to slot in another class
TCP network communication security risks
QT getting the screen resolution without the extended monitor
Gtk skip_taskbar_hint (seen in Glade-ui-Designer) äquivalent in Qt
change text in another class by button
Use boost build bjam for building Qt stuff
I want to use gdb with my Qt project..But I received “Permission denied” message?

Categories

HOME
qt
cocoapods
amazon-web-services
svn
lambda
weblogic12c
typelite
semantic-web
bing-search
twitter-fabric
tcp
implicit-conversion
openfoam
clone
supercollider
mithril.js
responsive-design
eddystone
tiff
squid
c#-7.0
l20n
jqxgrid
robolectric
coroutine
cmake-gui
tableview
pyopencl
introspection
beego
clipboard
points
gravity-forms-plugin
spring-annotations
sales
region
locks
d3.js-v4
windows2012
john-the-ripper
caesar-cipher
creation
ftp-server
hidden-markov-models
iscroll
python-jira
data-uri
hdiv
axis
spongycastle
dredd
visual-format-language
iptv
ptvs
cognos-tm1
google-shopping-api
controllers
google-identity-toolkit
gcloud-node
callouts
msbuild-4.0
accessibilityservice
gulp-uglify
ruby-on-rails-4.1
enaml
phpredis
actionpack
quercus
fiware-bosun
fasterxml
jquery-mobile-flipswitch
angular-ui-select
jini
cloo
visual-c++-2005
codahale-metrics
sly-scroller
chefspec
jquery-dialog
struts2-json-plugin
wndproc
struts2-s2hibernate
quartz-core
glx
haiku
libxslt
tabbarcontroller
getimagesize
jquery-effects
iphone-sdk-3.1.3

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile