mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Horrible hack to get timestamps not to hang on windows
Turns out date is a valid command on windowndows, and running it waits for user input. That hangs qmake. This hack is a valid batch command that returns 0 and at the same time a valid bash command that tries to run date or return 0 I'm so sorry.
This commit is contained in:
parent
59b26f3d33
commit
d834eaca33
4
qtox.pro
4
qtox.pro
|
@ -46,7 +46,9 @@ RESOURCES += res.qrc
|
|||
|
||||
GIT_VERSION = $$system(git rev-parse HEAD 2> /dev/null || echo "built without git")
|
||||
DEFINES += GIT_VERSION=\"\\\"$$quote($$GIT_VERSION)\\\"\"
|
||||
TIMESTAMP = $$system(date +"%s" || echo 0)
|
||||
# date works on linux/mac, but it would hangs qmake on windows
|
||||
# This hack returns 0 on batch (windows), but executes "date +%s" or return 0 if it fails on bash (linux/mac)
|
||||
TIMESTAMP = $$system($1 2>null||echo 0||a;rm null;date +%s||echo 0) # I'm so sorry
|
||||
DEFINES += TIMESTAMP=$$TIMESTAMP
|
||||
DEFINES += LOG_TO_FILE
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user