mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
support FMOD
This commit is contained in:
parent
1f69f715aa
commit
78328cb9fe
2
QQt.pro
2
QQt.pro
@ -10,6 +10,6 @@
|
|||||||
#比较方便
|
#比较方便
|
||||||
CONFIG += debug_and_release
|
CONFIG += debug_and_release
|
||||||
CONFIG += build_all
|
CONFIG += build_all
|
||||||
CONFIG += silent
|
#CONFIG += silent
|
||||||
|
|
||||||
include(src/qqt.pri)
|
include(src/qqt.pri)
|
||||||
|
@ -26,9 +26,6 @@ defineReplace(get_add_header_FMOD){
|
|||||||
#basic
|
#basic
|
||||||
command += $${path}
|
command += $${path}
|
||||||
#这里添加$${path}下的子文件夹
|
#这里添加$${path}下的子文件夹
|
||||||
command += $${path}/fsbank/inc
|
|
||||||
command += $${path}/studio/inc
|
|
||||||
command += $${path}/lowlevel/inc
|
|
||||||
|
|
||||||
return ($$command)
|
return ($$command)
|
||||||
}
|
}
|
||||||
@ -51,22 +48,9 @@ defineTest(add_header_FMOD){
|
|||||||
#这个地方add_library_no_bundle代表包括macOS下,都不使用bundle,只是动态库或者静态库。
|
#这个地方add_library_no_bundle代表包括macOS下,都不使用bundle,只是动态库或者静态库。
|
||||||
defineTest(add_library_FMOD){
|
defineTest(add_library_FMOD){
|
||||||
#链接Library
|
#链接Library
|
||||||
add_library_at_subdir(FMOD, fsbank$${LIBRARYVER}$${DEBUG}, fsbank/lib)
|
add_library(FMOD, fmod$${LIBRARYVER}$${DEBUG})
|
||||||
add_library_at_subdir(FMOD, fsbank64$${LIBRARYVER}$${DEBUG}, fsbank/lib)
|
add_library(FMOD, fmodL$${LIBRARYVER}$${DEBUG})
|
||||||
add_library_at_subdir(FMOD, fsbvorbis$${LIBRARYVER}$${DEBUG}, fsbank/lib)
|
|
||||||
add_library_at_subdir(FMOD, fsbvorbis64$${LIBRARYVER}$${DEBUG}, fsbank/lib)
|
|
||||||
|
|
||||||
add_library_at_subdir(FMOD, fmod$${LIBRARYVER}$${DEBUG}, lowlevel/lib)
|
|
||||||
add_library_at_subdir(FMOD, fmod64$${LIBRARYVER}$${DEBUG}, lowlevel/lib)
|
|
||||||
add_library_at_subdir(FMOD, fmodL$${LIBRARYVER}$${DEBUG}, lowlevel/lib)
|
|
||||||
add_library_at_subdir(FMOD, fmodL64$${LIBRARYVER}$${DEBUG}, lowlevel/lib)
|
|
||||||
#添加这个SDK下的其他的library
|
#添加这个SDK下的其他的library
|
||||||
|
|
||||||
add_library_at_subdir(FMOD, fmodstudio$${LIBRARYVER}$${DEBUG}, studio/lib)
|
|
||||||
add_library_at_subdir(FMOD, fmodstudio64$${LIBRARYVER}$${DEBUG}, studio/lib)
|
|
||||||
add_library_at_subdir(FMOD, fmodstudioL$${LIBRARYVER}$${DEBUG}, studio/lib)
|
|
||||||
add_library_at_subdir(FMOD, fmodstudioL64$${LIBRARYVER}$${DEBUG}, studio/lib)
|
|
||||||
|
|
||||||
return (1)
|
return (1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +73,8 @@ defineTest(add_link_library_FMOD){
|
|||||||
#注意Android也需要这个函数,使用这个函数Android才会发布Library到运行时。上边的只是链接作用。
|
#注意Android也需要这个函数,使用这个函数Android才会发布Library到运行时。上边的只是链接作用。
|
||||||
#_Qt 代表这个lib是基于Qt的 依赖Qt
|
#_Qt 代表这个lib是基于Qt的 依赖Qt
|
||||||
defineTest(add_deploy_library_FMOD) {
|
defineTest(add_deploy_library_FMOD) {
|
||||||
add_deploy_library(FMOD, FMOD$${LIBRARYVER}$${DEBUG})
|
add_deploy_library(FMOD, fmod$${LIBRARYVER}$${DEBUG})
|
||||||
|
add_deploy_library(FMOD, fmodL$${LIBRARYVER}$${DEBUG})
|
||||||
return (1)
|
return (1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ contains(BUILD, Release) {
|
|||||||
#######################################################################################
|
#######################################################################################
|
||||||
#定义内部函数
|
#定义内部函数
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
#修改
|
||||||
defineReplace(get_add_header_Template){
|
defineReplace(get_add_header_Template){
|
||||||
path = $$1
|
path = $$1
|
||||||
isEmpty(1)|!isEmpty(2) : error("get_add_header_Template(path) requires one arguments.")
|
isEmpty(1)|!isEmpty(2) : error("get_add_header_Template(path) requires one arguments.")
|
||||||
@ -46,6 +47,7 @@ defineTest(add_header_Template){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#这个地方add_library_no_bundle代表包括macOS下,都不使用bundle,只是动态库或者静态库。
|
#这个地方add_library_no_bundle代表包括macOS下,都不使用bundle,只是动态库或者静态库。
|
||||||
|
#修改
|
||||||
defineTest(add_library_Template){
|
defineTest(add_library_Template){
|
||||||
#链接Library
|
#链接Library
|
||||||
add_library(Template, Template$${LIBRARYVER}$${DEBUG})
|
add_library(Template, Template$${LIBRARYVER}$${DEBUG})
|
||||||
@ -58,6 +60,7 @@ defineTest(add_library_Template){
|
|||||||
#定义外部函数
|
#定义外部函数
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
#链接Template的WorkFlow
|
#链接Template的WorkFlow
|
||||||
|
#留意
|
||||||
defineTest(add_link_library_Template){
|
defineTest(add_link_library_Template){
|
||||||
#链接Library
|
#链接Library
|
||||||
add_library_Template()
|
add_library_Template()
|
||||||
@ -72,6 +75,7 @@ defineTest(add_link_library_Template){
|
|||||||
#发布依赖library
|
#发布依赖library
|
||||||
#注意Android也需要这个函数,使用这个函数Android才会发布Library到运行时。上边的只是链接作用。
|
#注意Android也需要这个函数,使用这个函数Android才会发布Library到运行时。上边的只是链接作用。
|
||||||
#_Qt 代表这个lib是基于Qt的 依赖Qt
|
#_Qt 代表这个lib是基于Qt的 依赖Qt
|
||||||
|
#留意
|
||||||
defineTest(add_deploy_library_Template) {
|
defineTest(add_deploy_library_Template) {
|
||||||
add_deploy_library_Qt(Template, Template$${LIBRARYVER}$${DEBUG})
|
add_deploy_library_Qt(Template, Template$${LIBRARYVER}$${DEBUG})
|
||||||
return (1)
|
return (1)
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
LibQQt的版本演变。
|
LibQQt的版本演变。
|
||||||
|
|
||||||
|
| 时间| LibQQt库 | Multi-link技术 |
|
||||||
|
| :---- | :---- | :---- |
|
||||||
|
| 2017年1月1日 | v1.0 | - |
|
||||||
|
| 2017年12月1日 | v2.0 | v1.0 |
|
||||||
|
| 2018年6月1日 | v2.4 | v2.0 |
|
||||||
|
|
||||||
|
|
||||||
## v2.2.1 [详情](changelog/v2.2.1.md)
|
## v2.2.1 [详情](changelog/v2.2.1.md)
|
||||||
## v2.2 [详情](changelog/v2.2.md)
|
## v2.2 [详情](changelog/v2.2.md)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#only link QQt, this pri file.
|
#only link QQt, this pri file.
|
||||||
|
|
||||||
#this link need Qt Creator set default build directory, replace
|
#this link need Qt Creator set default build directory, replace
|
||||||
#%{JS: Util.asciify("/your/local/path/to/build/root/%{CurrentProject:Name}/%{Qt:Version}/%{CurrentKit:FileSystemName}/%{CurrentBuild:Name}")}
|
#%{JS: Util.asciify("/your/local/path/to/build/root/%{CurrentProject:Name}/%{CurrentKit:FileSystemName}/%{Qt:Version}")}
|
||||||
|
|
||||||
#auto link QQt when build source
|
#auto link QQt when build source
|
||||||
#auto copy QQt when deploy app
|
#auto copy QQt when deploy app
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#base manager包揽所有app和lib启动的函数
|
#base manager包揽所有app和lib启动的函数
|
||||||
#V2.0
|
#V2.0
|
||||||
#和同目录下pri组一同拷贝使用,不拷贝可以使用。建议不拷贝使用,可以跟进技术更新。
|
#和同目录下pri组一同拷贝使用,不拷贝可以使用。建议不拷贝使用,可以跟进技术更新。
|
||||||
|
#设计难度:控制难度,丰富接口。
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
#简介
|
#简介
|
||||||
#在这个管理器里,App和Lib工程其实是区分开的。
|
#在这个管理器里,App和Lib工程其实是区分开的。
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
#add_deploy_library.pri
|
#add_deploy_library.pri
|
||||||
#提供app发布library函数,只是app工程使用
|
#提供app发布library函数,只是app工程使用
|
||||||
#-------------------------------------------------------------
|
#-------------------------------------------------------------
|
||||||
|
#add_deploy_library
|
||||||
|
#add_deploy_libraries
|
||||||
|
#add_deploy_library_Qt
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#内部用函数
|
#内部用函数
|
||||||
|
@ -107,112 +107,6 @@ defineTest(add_library_no_bundle) {
|
|||||||
return (1)
|
return (1)
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#内部用函数
|
|
||||||
#获取命令
|
|
||||||
################################################################################
|
|
||||||
defineReplace(get_add_library_at_subdir) {
|
|
||||||
libname = $$1
|
|
||||||
librealname = $$2
|
|
||||||
libsubdir = $$3
|
|
||||||
isEmpty(1): error("get_add_library_at_subdir(libname, librealname, libsubdir) requires at last one argument")
|
|
||||||
!isEmpty(4): error("get_add_library_at_subdir(libname, librealname, libsubdir) requires at most three argument")
|
|
||||||
isEmpty(2): librealname = $${libname}
|
|
||||||
|
|
||||||
CUR_LIB_PWD = $${LIB_SDK_ROOT}/$${libname}/$${QSYS_STD_DIR}/lib/$${libsubdir}
|
|
||||||
equals(QMAKE_HOST.os, Windows) {
|
|
||||||
CUR_LIB_PWD~=s,/,\\,g
|
|
||||||
}
|
|
||||||
message(link $${librealname} from $$CUR_LIB_PWD)
|
|
||||||
|
|
||||||
LINK =
|
|
||||||
contains(DEFINES, __DARWIN__) {
|
|
||||||
LINK += -F$${CUR_LIB_PWD}
|
|
||||||
LINK += -framework $${librealname}
|
|
||||||
} else {
|
|
||||||
LINK += -L$${CUR_LIB_PWD}
|
|
||||||
#win can't with the blank! error: -l QQt
|
|
||||||
LINK += -l$${librealname}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ($${LINK})
|
|
||||||
}
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#公开给外部用函数
|
|
||||||
#执行命令
|
|
||||||
################################################################################
|
|
||||||
#从LIB_SDK_ROOT按照标准路径QSYS_STD_DIR链接
|
|
||||||
#[libname/5.9.2/macOS/Debug/lib/librealname.dylib/.a]
|
|
||||||
#这个跨平台的,但是一般只有Mac下才需要。可是用这个跨平台没问题。
|
|
||||||
defineTest(add_library_at_subdir) {
|
|
||||||
libname = $$1
|
|
||||||
librealname = $$2
|
|
||||||
libsubdir = $$3
|
|
||||||
isEmpty(1): error("add_library_at_subdir(libname, librealname, libsubdir) requires at last one argument")
|
|
||||||
!isEmpty(3): error("add_library_at_subdir(libname, librealname, libsubdir) requires at most three argument")
|
|
||||||
isEmpty(2): librealname = $${libname}
|
|
||||||
|
|
||||||
command = $$get_add_library_no_bundle($${libname}, $${librealname}, $${libsubdir})
|
|
||||||
#message (LIBS += $$command)
|
|
||||||
LIBS += $${command}
|
|
||||||
|
|
||||||
export(LIBS)
|
|
||||||
|
|
||||||
return (1)
|
|
||||||
}
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#内部用函数
|
|
||||||
#获取命令
|
|
||||||
################################################################################
|
|
||||||
defineReplace(get_add_library_no_bundle_at_subdir) {
|
|
||||||
libname = $$1
|
|
||||||
librealname = $$2
|
|
||||||
libsubdir = $$3
|
|
||||||
isEmpty(1): error("get_add_library_no_bundle_at_subdir(libname, librealname, libsubdir) requires at last one argument")
|
|
||||||
!isEmpty(4): error("get_add_library_no_bundle_at_subdir(libname, librealname, libsubdir) requires at most three argument")
|
|
||||||
isEmpty(2): librealname = $${libname}
|
|
||||||
|
|
||||||
CUR_LIB_PWD = $${LIB_SDK_ROOT}/$${libname}/$${QSYS_STD_DIR}/lib/$${libsubdir}
|
|
||||||
equals(QMAKE_HOST.os, Windows) {
|
|
||||||
CUR_LIB_PWD~=s,/,\\,g
|
|
||||||
}
|
|
||||||
message(link $${librealname} from $$CUR_LIB_PWD)
|
|
||||||
|
|
||||||
LINK =
|
|
||||||
#注意:macOS下使用-L -l...也就是链接.dylib .a
|
|
||||||
LINK += -L$${CUR_LIB_PWD}
|
|
||||||
#win can't with the blank! error: -l QQt
|
|
||||||
LINK += -l$${librealname}
|
|
||||||
|
|
||||||
return ($${LINK})
|
|
||||||
}
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
#公开给外部用函数
|
|
||||||
#执行命令
|
|
||||||
################################################################################
|
|
||||||
#从LIB_SDK_ROOT按照标准路径QSYS_STD_DIR链接
|
|
||||||
#[libname/5.9.2/macOS/Debug/lib/librealname.dylib/.a]
|
|
||||||
#这个跨平台的,但是一般只有Mac下才需要。可是用这个跨平台没问题。
|
|
||||||
defineTest(add_library_no_bundle_at_subdir) {
|
|
||||||
libname = $$1
|
|
||||||
librealname = $$2
|
|
||||||
libsubdir = $$3
|
|
||||||
isEmpty(1): error("add_library_no_bundle_at_subdir(libname, librealname, libsubdir) requires at last one argument")
|
|
||||||
!isEmpty(3): error("add_library_no_bundle_at_subdir(libname, librealname, libsubdir) requires at most three argument")
|
|
||||||
isEmpty(2): librealname = $${libname}
|
|
||||||
|
|
||||||
command = $$get_add_library_no_bundle($${libname}, $${librealname}, $${libsubdir})
|
|
||||||
#message (LIBS += $$command)
|
|
||||||
LIBS += $${command}
|
|
||||||
|
|
||||||
export(LIBS)
|
|
||||||
|
|
||||||
return (1)
|
|
||||||
}
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#内部用函数
|
#内部用函数
|
||||||
#获取命令
|
#获取命令
|
||||||
|
@ -51,7 +51,7 @@ message(Build $${TARGET} on $${QMAKE_HOST.os} \(Operating System=$${QMAKE_HOST.o
|
|||||||
isEmpty(QSYS_PRIVATE) : message(Build $${TARGET} Qt Kit page FileSystem Name is decided by env variable QSYS. Please set it. )
|
isEmpty(QSYS_PRIVATE) : message(Build $${TARGET} Qt Kit page FileSystem Name is decided by env variable QSYS. Please set it. )
|
||||||
|
|
||||||
isEmpty(QSYS_PRIVATE) {
|
isEmpty(QSYS_PRIVATE) {
|
||||||
message(1. you should change qt default build directory to your-pc-build-station/%{CurrentProject:Name}/%{Qt:Version}/%{CurrentKit:FileSystemName}/%{CurrentBuild:Name})
|
message(1. you should change qt default build directory to your-pc-build-station/%{CurrentProject:Name}/%{CurrentKit:FileSystemName}/%{Qt:Version})
|
||||||
message(2. env variable QSYS is required! pleace check app_platform.pri)
|
message(2. env variable QSYS is required! pleace check app_platform.pri)
|
||||||
error(error occured! please check build output panel.)
|
error(error occured! please check build output panel.)
|
||||||
}
|
}
|
||||||
|
@ -497,7 +497,6 @@ defineTest(add_sdk_from_subdirs){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if you want to use QQt with QT += QQt please open this feature
|
#if you want to use QQt with QT += QQt please open this feature
|
||||||
#unimplete: CONFIG += add_sdk_to_Qt
|
|
||||||
defineTest(add_sdk_to_Qt){
|
defineTest(add_sdk_to_Qt){
|
||||||
#isEmpty(1):error(add_sdk_to_Qt(libname, libsrcdir, libdstdir) need at last one argument)
|
#isEmpty(1):error(add_sdk_to_Qt(libname, libsrcdir, libdstdir) need at last one argument)
|
||||||
|
|
||||||
@ -615,6 +614,7 @@ defineTest(del_sdk){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#获取sdk name
|
#获取sdk name
|
||||||
|
#修饰TARGET _d _debug
|
||||||
defineReplace(add_sdk_name){
|
defineReplace(add_sdk_name){
|
||||||
#isEmpty(1):error(add_sdk_name(target_name) need one argument)
|
#isEmpty(1):error(add_sdk_name(target_name) need one argument)
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#Suggest Qt 5.9.2/4.8.6/4.8.7
|
#Suggest Qt 5.9.2/4.8.6/4.8.7
|
||||||
#please dont use Qt 5.9.1, it is broken with android and ios.
|
#please dont use Qt 5.9.1, it is broken with android and ios.
|
||||||
#please dont modify this pro
|
#please dont modify this pro
|
||||||
#use LibQQt you need change Qt Creator default build directory: your-pc-build-station/%{CurrentProject:Name}/%{Qt:Version}/%{CurrentKit:FileSystemName}/%{CurrentBuild:Name}
|
#use LibQQt you need change Qt Creator default build directory: your-pc-build-station/%{CurrentProject:Name}/%{CurrentKit:FileSystemName}/%{Qt:Version}
|
||||||
#in Qt kit page, set kit's File System Name. (Creator Ver.>v3.5)
|
#in Qt kit page, set kit's File System Name. (Creator Ver.>v3.5)
|
||||||
#in project build page, def env QSYS
|
#in project build page, def env QSYS
|
||||||
#in app_configure.pri (auto createed) define QQT_BUILD_ROOT= and QQT_SDK_ROOT= and or APP_DEPLOY_ROOT
|
#in app_configure.pri (auto createed) define QQT_BUILD_ROOT= and QQT_SDK_ROOT= and or APP_DEPLOY_ROOT
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include <QApplication>
|
#include <QQtApplication>
|
||||||
|
|
||||||
int main ( int argc, char* argv[] )
|
int main ( int argc, char* argv[] )
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QQtApplication a ( argc, argv );
|
||||||
|
a.setWriteLogSystem ( true );
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
#include "fmod.hpp"
|
||||||
|
#include <qqtcore.h>
|
||||||
|
|
||||||
MainWindow::MainWindow ( QWidget* parent ) :
|
MainWindow::MainWindow ( QWidget* parent ) :
|
||||||
QMainWindow ( parent ),
|
QMainWindow ( parent ),
|
||||||
ui ( new Ui::MainWindow )
|
ui ( new Ui::MainWindow )
|
||||||
{
|
{
|
||||||
ui->setupUi ( this );
|
ui->setupUi ( this );
|
||||||
|
int busy = 0;
|
||||||
|
FMOD::File_GetDiskBusy ( &busy );
|
||||||
|
pline() << busy;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user