Solved get login name in qmake script
-
I am porting some Perl code to qmake. The Perl code gets the current login name with
my($login_name) = lc getlogin;
and uses that login name for replacing some text in a configuration file. I have translated the Perl code into a
QMAKE_POST_LINK
action that does the same textual replacement, but within myQMAKE_POST_LINK
action i now also need that same login name.This should work on both Windows and Linux. Is there a way to get that login name in a qmake
.pro
file? -
Something like this:
MYUSERNAME=NO_USERNAME win32 { MYUSERNAME = $$(USERNAME) } unix { MYUSERNAME = $$(USER) } message(The username is $$MYUSERNAME)
-
Yes, thanks. That was also what I have figured out in the meanwhile :-)