paimon-launcher.pro 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. QT += quick widgets
  2. CONFIG += c++14
  3. # You can make your code fail to compile if it uses deprecated APIs.
  4. # In order to do so, uncomment the following line.
  5. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  6. SOURCES += \
  7. src/Async.cpp \
  8. src/main.cpp \
  9. src/FileIO.cpp \
  10. src/Process.cpp
  11. HEADERS += \
  12. src/Async.h \
  13. src/FileIO.h \
  14. src/Process.h
  15. RESOURCES += \
  16. qml/qml.qrc \
  17. images/images.qrc
  18. OTHER_FILES += \
  19. scripts/* \
  20. images/icons/* \
  21. images/appicon/* \
  22. images/bg/* \
  23. README.md
  24. BASEVERSION = $$system(cat $$PWD/VERSION)
  25. COMMIT = $$system(git -C $$PWD rev-parse --short HEAD)
  26. VERSION = "$$BASEVERSION ($$COMMIT)"
  27. DEFINES += VERSION=\\\"\"$$VERSION\"\\\"
  28. # Additional import path used to resolve QML modules in Qt Creator's code model
  29. QML_IMPORT_PATH =
  30. # Additional import path used to resolve QML modules just for Qt Quick Designer
  31. QML_DESIGNER_IMPORT_PATH =
  32. # Default rules for deployment.
  33. qnx: target.path = /tmp/$${TARGET}/bin
  34. else: unix:!android: target.path = /opt/$${TARGET}/bin
  35. !isEmpty(target.path): INSTALLS += target
  36. DESTDIR = $$OUT_PWD/root/usr/bin
  37. copy_scripts.commands = $(COPY_DIR) $$PWD/scripts $$OUT_PWD/root/usr
  38. first.depends = $(first) copy_scripts
  39. export(first.depends)
  40. QMAKE_EXTRA_TARGETS += first copy_scripts
  41. copy_tools.commands = $(COPY_DIR) $$PWD/tools $$OUT_PWD/root/usr/bin
  42. first.depends += copy_tools
  43. export(copy_tools.commands)
  44. QMAKE_EXTRA_TARGETS += copy_tools
  45. APPIMAGE=$$(APPIMAGE)
  46. !isEmpty(APPIMAGE) {
  47. message("AppImage")
  48. copy_share.commands = $(COPY_DIR) $$PWD/share $$OUT_PWD/root/usr
  49. first.depends += copy_share
  50. export(copy_share.commands)
  51. QMAKE_EXTRA_TARGETS += copy_share
  52. copy_qml.commands = \
  53. $(MKDIR) $$OUT_PWD/root/usr/qml; \
  54. $(MKDIR) $$OUT_PWD/root/usr/lib; \
  55. $(COPY_DIR) \
  56. $$(QTDIR)/qml/Qt \
  57. $$(QTDIR)/qml/QtQml \
  58. $$(QTDIR)/qml/QtQuick \
  59. $$(QTDIR)/qml/QtQuick.2 \
  60. $$(QTDIR)/qml/QtGraphicalEffects \
  61. $$OUT_PWD/root/usr/qml; \
  62. $(COPY_FILE) \
  63. $$(QTDIR)/lib/libQt5QmlWorkerScript.so.5 \
  64. $$(QTDIR)/lib/libQt5QmlModels.so.5 \
  65. $$(QTDIR)/lib/libQt5Quick.so.5 \
  66. $$(QTDIR)/lib/libQt5QuickTemplates2.so.5 \
  67. $$(QTDIR)/lib/libQt5QuickControls2.so.5 \
  68. $$OUT_PWD/root/usr/lib
  69. first.depends += copy_qml
  70. export(copy_qml.commands)
  71. QMAKE_EXTRA_TARGETS += copy_qml
  72. QMAKE_POST_LINK = VERSION=$$BASEVERSION-$$COMMIT linuxdeploy-x86_64.AppImage --appdir $$OUT_PWD/root --plugin qt --output appimage
  73. }