Skip to content

Commit

Permalink
#4 qmake project defs + app description/icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Davis committed Mar 8, 2020
1 parent c77b547 commit 6036e33
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 22 deletions.
Binary file added tfctrl.ico
Binary file not shown.
74 changes: 52 additions & 22 deletions tfctrl.pro
Original file line number Diff line number Diff line change
@@ -1,22 +1,45 @@
QT += quick widgets core charts qml
# Application icon, version, description, etc.:
RC_ICONS = tfctrl.ico

CONFIG += c++11
win32:VERSION = 0.1.0.0
else:VERSION = 0.1.0

QMAKE_TARGET_COMPANY = mstrthealias
QMAKE_TARGET_DESCRIPTION = Teensy Fan Controller configuration UI (tfctrl)
QMAKE_TARGET_COPYRIGHT = "\\251 2020 Jack Davis"
QMAKE_TARGET_PRODUCT = Teensy Fan Controller

# Build config
CONFIG += release windeployqt x11 windows
QT += widgets core qml quick quickcontrols2 quicktemplates2


# Include headers for libraries (that this project builds directly):
INCLUDEPATH += ../HIDAPI ../nanopb


## HIDAPI dep: include HIDAPI source in build, to simplify building dependent HIDAPI project
#macx: SOURCES += ../HIDAPI/mac/hid.c
#unix: !macx: SOURCES += ../HIDAPI/linux/hid.c
#win32: SOURCES += ../HIDAPI/windows/hid.c
## HIDAPI requires linking against libhidapi or OS HID
#win32:LIBS += -lhid -lsetupapi
#linux:LIBS += -lhidapi-hidraw
## Note: dependent project builds require top level qmake project (TEMPLATE=subdir):
##SUBDIRS += ../HIDAPI
##tfctrl.subdir = ../HIDAPI
##tfctrl.depends = ../HIDAPI
win32:LIBS += -lhid -lsetupapi -L../HIDAPI/windows -lHIDAPI
linux:LIBS += -lhidapi-hidraw -L../HIDAPI/linux -lHIDAPI

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
RESOURCES += qml.qrc

HEADERS += \
back_end.h \
hid_pnp.h \
log_list_model.h \
runtime_config_inc.h

SOURCES += \
../nanopb/pb_common.c \
Expand All @@ -29,21 +52,28 @@ SOURCES += \
main.cpp \
runtime_config_inc.cpp

RESOURCES += qml.qrc
# `make install` path:
qnx: target.path = /tmp/$${TARGET}/bin
else: win32: target.path = installer/packages/com.github.mstrthealias/data
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target



# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Refer to the documentation for the
# deprecated API to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =

# Additional import path used to resolve QML modules just for Qt Quick Designer
QML_DESIGNER_IMPORT_PATH =

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

HEADERS += \
back_end.h \
hid_pnp.h \
log_list_model.h \
runtime_config_inc.h
37 changes: 37 additions & 0 deletions tfctrl_resource.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#include <windows.h>

IDI_ICON1 ICON DISCARDABLE "C:\\Users\\jd\\Desktop\\tfc-project\\ui_qt5\\tfctrl.ico"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,1,0,0
PRODUCTVERSION 0,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "mstrthealias\0"
VALUE "FileDescription", "Teensy Fan Controller configuration UI (tfctrl)\0"
VALUE "FileVersion", "0.1.0.0\0"
VALUE "LegalCopyright", "\251 2020 Jack Davis\0"
VALUE "OriginalFilename", "tfctrl.exe\0"
VALUE "ProductName", "Teensy Fan Controller\0"
VALUE "ProductVersion", "0.1.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200
END
END
/* End of Version info */

0 comments on commit 6036e33

Please sign in to comment.