Rearrange the contents of Qt project files. Fixes several issues.

Use ARM to define a mobile platform instead of GLES.
Allow ARM devices such as Raspberry Pi to access previously desktop-only features like SDL.
Detect if the users Linux distro has opted to use QtMultimedia. In this situation, use it instead of QtMobility which should save a download.
Organise libraries in a way that makes more sense.
Only compile translations for Linux desktop, which will use these translations.
Use the constant macros define on all platforms.
Clean up some redundant comments and add some new ones.
Add Qt support back for Blackberry (ffmpeg) and raspberry pi (requires ffmpeg).
This commit is contained in:
Sacha 2013-10-22 00:06:23 +10:00
parent 598e06faa8
commit 8aae02154a
3 changed files with 69 additions and 80 deletions

View File

@ -1,56 +1,60 @@
TARGET = PPSSPPQt TARGET = PPSSPPQt
QT += core gui opengl
win32|greaterThan(QT_MAJOR_VERSION,4) {
QT += multimedia
} else {
CONFIG += mobility
MOBILITY += multimedia
}
greaterThan(QT_MAJOR_VERSION,4): QT += widgets
VERSION = 0.9.1 VERSION = 0.9.1
# Main Qt modules
QT += core gui opengl
include(Settings.pri) include(Settings.pri)
# Extra Qt modules
linux: CONFIG += link_pkgconfig
win32|greaterThan(QT_MAJOR_VERSION,4) {
QT += multimedia
} else {
linux:packagesExist(QtMultimedia) {
QT += multimedia
} else {
CONFIG += mobility
MOBILITY += multimedia
}
}
greaterThan(QT_MAJOR_VERSION,4): QT += widgets
mobile_platform: MOBILITY += sensors mobile_platform: MOBILITY += sensors
symbian: MOBILITY += systeminfo symbian: MOBILITY += systeminfo
# Libs # PPSSPP Libs
symbian { win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/release/
LIBS += -lCore.lib -lCommon.lib -lNative.lib -llibglib -lhwrmvibraclient else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/debug/
# For now you have to copy these to the Symbian lib dir using ffmpeg/symbian-install.sh else:unix: LIBS += -L$$OUT_PWD
LIBS += -lavformat.lib -lavcodec.lib -lavutil.lib -lswresample.lib -lswscale.lib else:symbian: XT=".lib"
} LIBS += -lCore$${XT} -lCommon$${XT} -lNative$${XT}
qnx: LIBS += -L. -lCore -lCommon -lNative -lscreen -lz
# FFMPEG Path
win32: FFMPEG_DIR = ../ffmpeg/Windows/$${QMAKE_TARGET.arch}/lib/
linux: FFMPEG_DIR = ../ffmpeg/linux/$${QMAKE_TARGET.arch}/lib/
qnx: FFMPEG_DIR = ../ffmpeg/blackberry/armv7/lib/
symbian:FFMPEG_DIR = -l
# External (platform-dependant) libs
unix: LIBS += $${FFMPEG_DIR}libavformat.a $${FFMPEG_DIR}libavcodec.a $${FFMPEG_DIR}libavutil.a $${FFMPEG_DIR}libswresample.a $${FFMPEG_DIR}libswscale.a
else: LIBS += $${FFMPEG_DIR}avformat.lib $${FFMPEG_DIR}avcodec.lib $${FFMPEG_DIR}avutil.lib $${FFMPEG_DIR}swresample.lib $${FFMPEG_DIR}swscale.lib
win32 { win32 {
CONFIG(release, debug|release) { LIBS += -lwinmm -lws2_32 -lShell32 -lAdvapi32
LIBS += -L$$OUT_PWD/release contains($$QMAKE_TARGET.arch, x86_64): LIBS += $$files(../dx9sdk/Lib/x64/*.lib)
} else { else: LIBS += $$files(../dx9sdk/Lib/x86/*.lib)
LIBS += -L$$OUT_PWD/debug
}
FFMPEG_DIR = ../ffmpeg/Windows/$${QMAKE_TARGET.arch}/lib/
LIBS += -lCore -lCommon -lNative -lwinmm -lws2_32 -lShell32 -lAdvapi32
contains($$QMAKE_TARGET.arch, x86_64) {
LIBS += $$files(../dx9sdk/Lib/x64/*.lib)
} else {
LIBS += $$files(../dx9sdk/Lib/x86/*.lib)
}
LIBS += $${FFMPEG_DIR}avformat.lib $${FFMPEG_DIR}avcodec.lib $${FFMPEG_DIR}avutil.lib $${FFMPEG_DIR}swresample.lib $${FFMPEG_DIR}swscale.lib
} }
linux { linux {
LIBS += -L. -lCore -lCommon -lNative -ldl
PRE_TARGETDEPS += ./libCommon.a ./libCore.a ./libNative.a PRE_TARGETDEPS += ./libCommon.a ./libCore.a ./libNative.a
!mobile_platform { packagesExist(sdl) {
CONFIG += link_pkgconfig DEFINES += QT_HAS_SDL
packagesExist(sdl) { PKGCONFIG += sdl
DEFINES += QT_HAS_SDL
PKGCONFIG += sdl
}
FFMPEG_DIR = ../ffmpeg/linux/$${QMAKE_TARGET.arch}/lib/
LIBS += $${FFMPEG_DIR}libavformat.a $${FFMPEG_DIR}libavcodec.a $${FFMPEG_DIR}libavutil.a $${FFMPEG_DIR}libswresample.a $${FFMPEG_DIR}libswscale.a
} }
# put this at the end avoids problems with some compilers
LIBS += -lz
} }
qnx: LIBS += -lscreen
symbian: LIBS += -llibglib -lhwrmvibraclient
# Avoids problems with some compilers
unix: LIBS += -lz
# Main # Main
SOURCES += ../native/base/QtMain.cpp SOURCES += ../native/base/QtMain.cpp
@ -68,16 +72,24 @@ SOURCES += ../UI/*Screen.cpp \
HEADERS += ../UI/*.h HEADERS += ../UI/*.h
INCLUDEPATH += .. ../Common ../native INCLUDEPATH += .. ../Common ../native
# Temporarily only use new UI for Linux desktop # Use forms UI for Linux desktop
linux:!mobile_platform { linux:!mobile_platform {
MOC_DIR = moc
UI_DIR = ui
RCC_DIR = rcc
SOURCES += *.cpp SOURCES += *.cpp
HEADERS += *.h HEADERS += *.h
FORMS += *.ui FORMS += *.ui
RESOURCES += resources.qrc RESOURCES += resources.qrc
INCLUDEPATH += ../Qt INCLUDEPATH += ../Qt
# Translations
TRANSLATIONS = $$files(languages/ppsspp_*.ts)
lang.name = lrelease ${QMAKE_FILE_IN}
lang.input = TRANSLATIONS
lang.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
lang.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN}
lang.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += lang
PRE_TARGETDEPS += compiler_lang_make_all
} else { } else {
# Desktop handles the Init separately # Desktop handles the Init separately
SOURCES += ../UI/NativeApp.cpp SOURCES += ../UI/NativeApp.cpp
@ -90,29 +102,11 @@ symbian {
SOURCES += ../UI/ui_atlas.cpp SOURCES += ../UI/ui_atlas.cpp
} }
# Translations
TRANSLATIONS = $$files(languages/ppsspp_*.ts)
lang.name = lrelease ${QMAKE_FILE_IN}
lang.input = TRANSLATIONS
lang.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
lang.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN}
lang.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += lang
PRE_TARGETDEPS += compiler_lang_make_all
# Packaging # Packaging
symbian { symbian {
# App UID:
TARGET.UID3 = 0xE0095B1D TARGET.UID3 = 0xE0095B1D
# App Name:
DEPLOYMENT.display_name = PPSSPP DEPLOYMENT.display_name = PPSSPP
# App Vendor:
vendor_deploy.pkg_prerules = "%{\"Qtness\"}" ":\"Qtness\"" vendor_deploy.pkg_prerules = "%{\"Qtness\"}" ":\"Qtness\""
# App Icon:
ICON = ../assets/icon.svg ICON = ../assets/icon.svg
# Folders: # Folders:
@ -121,12 +115,9 @@ symbian {
shaders.sources = ../assets/shaders shaders.sources = ../assets/shaders
shaders.path = E:/PPSSPP/PSP shaders.path = E:/PPSSPP/PSP
lang.sources = $$files(../lang/*.ini) lang.sources = $$files(../lang/*.ini)
# Unsupported languages on Symbian. # Unsupported languages on Symbian. Slashes differ depending on host.
contains(QMAKE_HOST.os, "Windows") { contains(QMAKE_HOST.os, "Windows"): lang.sources -= ..\\lang/ja_JP.ini ..\\lang/ko_KR.ini ..\\lang/zh_CN.ini ..\\lang/zh_TW.ini
lang.sources -= ..\\lang/ja_JP.ini ..\\lang/ko_KR.ini ..\\lang/zh_CN.ini ..\\lang/zh_TW.ini else: lang.sources -= ../lang/ja_JP.ini ../lang/ko_KR.ini ../lang/zh_CN.ini ../lang/zh_TW.ini
} else {
lang.sources -= ../lang/ja_JP.ini ../lang/ko_KR.ini ../lang/zh_CN.ini ../lang/zh_TW.ini
}
lang.path = E:/PPSSPP/lang lang.path = E:/PPSSPP/lang
DEPLOYMENT += vendor_deploy assets shaders lang DEPLOYMENT += vendor_deploy assets shaders lang

View File

@ -1,5 +1,5 @@
DEFINES += USING_QT_UI USE_FFMPEG DEFINES += USING_QT_UI USE_FFMPEG
unix:!qnx:!symbian:!macx: CONFIG += linux unix:!qnx:!macx: CONFIG += linux
# Global specific # Global specific
INCLUDEPATH += ../ext/zlib ../native/ext/glew ../Common INCLUDEPATH += ../ext/zlib ../native/ext/glew ../Common
@ -11,6 +11,7 @@ win32-msvc* {
PRECOMPILED_SOURCE = ../Windows/stdafx.cpp PRECOMPILED_SOURCE = ../Windows/stdafx.cpp
INCLUDEPATH += .. ../ffmpeg/Windows/$${QMAKE_TARGET.arch}/include INCLUDEPATH += .. ../ffmpeg/Windows/$${QMAKE_TARGET.arch}/include
} else { } else {
DEFINES += __STDC_CONSTANT_MACROS
QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-variable -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers -Wno-unused-parameter QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-variable -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers -Wno-unused-parameter
QMAKE_CXXFLAGS += -std=c++0x -ffast-math -fno-strict-aliasing QMAKE_CXXFLAGS += -std=c++0x -ffast-math -fno-strict-aliasing
QMAKE_CFLAGS_RELEASE -= -O2 QMAKE_CFLAGS_RELEASE -= -O2
@ -27,40 +28,37 @@ contains(QT_ARCH, windows)|count(xarch, 1) {
else { # Assume ARM else { # Assume ARM
DEFINES += ARM DEFINES += ARM
CONFIG += arm CONFIG += arm
CONFIG += mobile_platform
} }
gleslib = $$lower($$QMAKE_LIBS_OPENGL) gleslib = $$lower($$QMAKE_LIBS_OPENGL)
gleslib = $$find(gleslib, "gles") gleslib = $$find(gleslib, "gles")
contains(MEEGO_EDITION,harmattan)|!count(gleslib,0) { contains(MEEGO_EDITION,harmattan)|!count(gleslib,0) {
DEFINES += USING_GLES2 DEFINES += USING_GLES2
CONFIG += mobile_platform
} }
# Platform specific # Platform specific
contains(MEEGO_EDITION,harmattan): { contains(MEEGO_EDITION,harmattan) {
# Does not yet support FFMPEG # Does not yet support FFMPEG
DEFINES -= USE_FFMPEG DEFINES -= USE_FFMPEG
DEFINES += MEEGO_EDITION_HARMATTAN "_SYS_UCONTEXT_H=1" DEFINES += MEEGO_EDITION_HARMATTAN "_SYS_UCONTEXT_H=1"
} }
linux:!mobile_platform: { linux:!mobile_platform {
DEFINES += __STDC_CONSTANT_MACROS contains(QT_ARCH, x86_64): QMAKE_TARGET.arch = x86_64
contains(QT_ARCH, x86_64) { else: QMAKE_TARGET.arch = x86
QMAKE_TARGET.arch = x86_64
} else {
QMAKE_TARGET.arch = x86
}
INCLUDEPATH += ../ffmpeg/linux/$${QMAKE_TARGET.arch}/include INCLUDEPATH += ../ffmpeg/linux/$${QMAKE_TARGET.arch}/include
} }
linux:mobile_platform: INCLUDEPATH += ../ffmpeg/linux/arm/include
qnx { qnx {
# Use mkspec: unsupported/qws/qnx-armv7-g++ # Use mkspec: unsupported/qws/qnx-armv7-g++
DEFINES += BLACKBERRY "_QNX_SOURCE=1" "_C99=1" DEFINES += BLACKBERRY "_QNX_SOURCE=1" "_C99=1"
INCLUDEPATH += ../ffmpeg/blackberry/armv7/include
} }
symbian { symbian {
# Does not seem to be a way to change to armv6 compile so just override in variants.xml (see README) # Does not seem to be a way to change to armv6 compile so just override in variants.xml (see README)
MMP_RULES -= "ARMFPU softvfp+vfpv2" MMP_RULES -= "ARMFPU softvfp+vfpv2"
MMP_RULES += "ARMFPU vfpv2" MMP_RULES += "ARMFPU vfpv2"
DEFINES += __STDC_CONSTANT_MACROS
#"BOOST_COMPILER_CONFIG=<boost/mpl/aux_/config/gcc.hpp>" #"BOOST_COMPILER_CONFIG=<boost/mpl/aux_/config/gcc.hpp>"
QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment
INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis $$EPOCROOT/epoc32/include/stdapis/glib-2.0 INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis $$EPOCROOT/epoc32/include/stdapis/glib-2.0

2
native

@ -1 +1 @@
Subproject commit fff83ed237576c2132e5240de11963660b3f0315 Subproject commit 887d140d55087bb1a829ef9bd1f9d1afdf7adb73