mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-15 08:02:34 -05:00
WPS editor:
* Simplify Makefile * Get rid of buildall.* * Change library loading behaviour to work with MODEL_NAME Screenshot: * Simplify Makefile config-*.h: * Add MODEL_NAME git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18407 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ebe3e032b9
commit
561df3827e
49 changed files with 160 additions and 143 deletions
|
|
@ -3,6 +3,8 @@
|
||||||
*/
|
*/
|
||||||
#define TARGET_TREE /* this target is using the target tree system */
|
#define TARGET_TREE /* this target is using the target tree system */
|
||||||
|
|
||||||
|
#define MODEL_NAME "Sandisk Sansa c100 series"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 30
|
#define MODEL_NUMBER 30
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 20
|
#define MODEL_NUMBER 20
|
||||||
#define MODEL_NAME "Sandisk Sansa c200"
|
#define MODEL_NAME "Sandisk Sansa c200 series"
|
||||||
|
|
||||||
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
|
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 24
|
#define MODEL_NUMBER 24
|
||||||
|
|
||||||
|
#define MODEL_NAME "Cowon iAudio D2"
|
||||||
|
|
||||||
/* Produce a dual-boot bootloader.bin for mktccboot */
|
/* Produce a dual-boot bootloader.bin for mktccboot */
|
||||||
#define TCCBOOT
|
#define TCCBOOT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
#define CREATIVE_ZV 1
|
#define CREATIVE_ZV 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Creative Zen Vision"
|
||||||
|
|
||||||
/* This makes it part of the Creative Zen Vision family :) */
|
/* This makes it part of the Creative Zen Vision family :) */
|
||||||
#define CREATIVE_ZVx 1
|
#define CREATIVE_ZVx 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
#define CREATIVE_ZVM 1
|
#define CREATIVE_ZVM 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Creative Zen Vision: M"
|
||||||
|
|
||||||
/* This makes it part of the Creative Zen Vision family :) */
|
/* This makes it part of the Creative Zen Vision family :) */
|
||||||
#define CREATIVE_ZVx 1
|
#define CREATIVE_ZVx 1
|
||||||
|
|
||||||
|
|
@ -160,7 +162,7 @@
|
||||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||||
#define BOOTDIR "/.rockbox"
|
#define BOOTDIR "/.rockbox"
|
||||||
|
|
||||||
#define CONFIG_USBOTG USBOTG_ISP1583
|
#define CONFIG_USBOTG USBOTG_ISP1583
|
||||||
#define HAVE_USBSTACK
|
#define HAVE_USBSTACK
|
||||||
#define USB_VENDOR_ID 0x041e
|
#define USB_VENDOR_ID 0x041e
|
||||||
#define USB_PRODUCT_ID 0x4133
|
#define USB_PRODUCT_ID 0x4133
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
#define CREATIVE_ZVM60GB 1
|
#define CREATIVE_ZVM60GB 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Creative Zen Vision:M 60GB"
|
||||||
|
|
||||||
/* This makes it part of the Creative Zen Vision family :) */
|
/* This makes it part of the Creative Zen Vision family :) */
|
||||||
#define CREATIVE_ZVx 1
|
#define CREATIVE_ZVx 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 16
|
#define MODEL_NUMBER 16
|
||||||
#define MODEL_NAME "Sandisk Sansa e200"
|
#define MODEL_NAME "Sandisk Sansa e200 series"
|
||||||
|
|
||||||
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
|
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
#define MODEL_NAME "Archos FM Recorder"
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
#define HAVE_RECORDING
|
#define HAVE_RECORDING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#define TOSHIBA_GIGABEAT_S 1
|
#define TOSHIBA_GIGABEAT_S 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Toshiba Gigabeat S"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 21
|
#define MODEL_NUMBER 21
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define TOSHIBA_GIGABEAT_F 1
|
#define TOSHIBA_GIGABEAT_F 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Toshiba Gigabeat F"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 18
|
#define MODEL_NUMBER 18
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
*/
|
*/
|
||||||
#define IRIVER_H100_SERIES 1
|
#define IRIVER_H100_SERIES 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "iriver iHP-100 series"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 1
|
#define MODEL_NUMBER 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
*/
|
*/
|
||||||
#define IRIVER_H100_SERIES 1
|
#define IRIVER_H100_SERIES 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "iriver H120/H140"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 0
|
#define MODEL_NUMBER 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
*/
|
*/
|
||||||
#define IRIVER_H300_SERIES 1
|
#define IRIVER_H300_SERIES 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "iriver H300 series"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 2
|
#define MODEL_NUMBER 2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* This config file is for the iriver H10 20Gb
|
* This config file is for the Philips GoGear HDD1630
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TARGET_TREE /* this target is using the target tree system */
|
#define TARGET_TREE /* this target is using the target tree system */
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 25
|
#define MODEL_NUMBER 25
|
||||||
|
|
||||||
|
#define MODEL_NAME "iAudio M3"
|
||||||
|
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 17
|
#define MODEL_NUMBER 17
|
||||||
|
|
||||||
|
#define MODEL_NAME "iAudio M5"
|
||||||
|
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 10
|
#define MODEL_NUMBER 10
|
||||||
|
|
||||||
|
#define MODEL_NAME "iAudio X5"
|
||||||
|
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IRIVER_IFP7XX_SERIES 1
|
#define IRIVER_IFP7XX_SERIES 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "iriver iFP-799"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 6
|
#define MODEL_NUMBER 6
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod 1g/2g"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 19
|
#define MODEL_NUMBER 19
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod 3g"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 7
|
#define MODEL_NUMBER 7
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod 4g Grayscale"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 8
|
#define MODEL_NUMBER 8
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod Color/Photo"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 3
|
#define MODEL_NUMBER 3
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod Mini 1g"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 9
|
#define MODEL_NUMBER 9
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod Mini 2g"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 11
|
#define MODEL_NUMBER 11
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod Nano 1g"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 4
|
#define MODEL_NUMBER 4
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
#define IPOD_ARCH 1
|
#define IPOD_ARCH 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Apple iPod Video"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 5
|
#define MODEL_NUMBER 5
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 27
|
#define MODEL_NUMBER 27
|
||||||
|
|
||||||
|
#define MODEL_NAME "Logik DAX MP3/DAB"
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
//#define HAVE_RECORDING
|
//#define HAVE_RECORDING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 29
|
#define MODEL_NUMBER 29
|
||||||
|
|
||||||
|
#define MODEL_NAME "Sandisk Sansa m200 series"
|
||||||
|
|
||||||
/* Enable FAT16 support */
|
/* Enable FAT16 support */
|
||||||
#define HAVE_FAT16SUPPORT
|
#define HAVE_FAT16SUPPORT
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
/*
|
/*
|
||||||
* This config file is for iAudio X5
|
* This config file is for Meizu M6SL
|
||||||
*/
|
*/
|
||||||
#define TARGET_TREE /* this target is using the target tree system */
|
#define TARGET_TREE /* this target is using the target tree system */
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 1
|
#define MODEL_NUMBER 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Meizu M6SL"
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
//#define HAVE_RECORDING
|
//#define HAVE_RECORDING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#define CONFIG_SDRAM_START 0x00900000
|
#define CONFIG_SDRAM_START 0x00900000
|
||||||
|
|
||||||
#define OLYMPUS_MROBE_500 1
|
#define OLYMPUS_MROBE_500 1
|
||||||
|
#define MODEL_NAME "Olympus M:Robe 500i"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 22
|
#define MODEL_NUMBER 22
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
#define ONDA_VX747 1
|
#define ONDA_VX747 1
|
||||||
|
|
||||||
|
#define MODEL_NAME "Onda VX747"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 30
|
#define MODEL_NUMBER 30
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
#define HAVE_RECORDING
|
#define HAVE_RECORDING
|
||||||
|
|
||||||
|
#define MODEL_NAME "Ondio FM"
|
||||||
|
|
||||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
/* Define bitmask of input sources - recordable bitmask can be defined
|
||||||
explicitly if different */
|
explicitly if different */
|
||||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN)
|
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* define this if you have a bitmap LCD display */
|
/* define this if you have a bitmap LCD display */
|
||||||
#define HAVE_LCD_BITMAP
|
#define HAVE_LCD_BITMAP
|
||||||
|
|
||||||
|
#define MODEL_NAME "Ondio SP"
|
||||||
|
|
||||||
/* define this if you can flip your LCD */
|
/* define this if you can flip your LCD */
|
||||||
#define HAVE_LCD_FLIP
|
#define HAVE_LCD_FLIP
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
#define MODEL_NAME "Archos Player/Studio"
|
||||||
|
|
||||||
/* define this if you have a charcell LCD display */
|
/* define this if you have a charcell LCD display */
|
||||||
#define HAVE_LCD_CHARCELLS
|
#define HAVE_LCD_CHARCELLS
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
#define MODEL_NAME "Archos Recorder"
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
#define HAVE_RECORDING
|
#define HAVE_RECORDING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
/* define this if you use an ATA controller */
|
/* define this if you use an ATA controller */
|
||||||
#define HAVE_ATA
|
#define HAVE_ATA
|
||||||
|
|
||||||
|
#define MODEL_NAME "Archos Recorder v2"
|
||||||
|
|
||||||
/* define this if you have recording possibility */
|
/* define this if you have recording possibility */
|
||||||
#define HAVE_RECORDING
|
#define HAVE_RECORDING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
#define TARGET_TREE /* this target is using the target tree system */
|
#define TARGET_TREE /* this target is using the target tree system */
|
||||||
|
|
||||||
|
#define MODEL_NAME "Tatung Elio TPJ-1022"
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
#define MODEL_NUMBER 15
|
#define MODEL_NUMBER 15
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
@echo off
|
|
||||||
echo qmake...
|
|
||||||
qmake
|
|
||||||
echo Building gui...
|
|
||||||
mingw32-make 1>nul
|
|
||||||
echo Building libs...
|
|
||||||
cd libwps
|
|
||||||
call buildall.bat 2>nul
|
|
||||||
cd ..
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
qmake && make
|
|
||||||
cd libwps
|
|
||||||
./buildall.sh 2> /dev/null
|
|
||||||
|
|
@ -17,14 +17,14 @@ QImage QWpsDrawer::backdrop;
|
||||||
proxy_api QWpsDrawer::api;
|
proxy_api QWpsDrawer::api;
|
||||||
|
|
||||||
QWpsDrawer::QWpsDrawer( QWpsState *ws,QTrackState *ms, QWidget *parent )
|
QWpsDrawer::QWpsDrawer( QWpsState *ws,QTrackState *ms, QWidget *parent )
|
||||||
: QWidget(parent),wpsState(ws),trackState(ms),showGrid(false),mCurTarget("h10_5gb") {
|
: QWidget(parent),wpsState(ws),trackState(ms),showGrid(false),mCurTarget(qApp->applicationDirPath()+"/libwps_IRIVER_H10_5GB") {
|
||||||
|
|
||||||
tryResolve();
|
tryResolve();
|
||||||
newTempWps();
|
newTempWps();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWpsDrawer::tryResolve() {
|
bool QWpsDrawer::tryResolve() {
|
||||||
QLibrary lib(qApp->applicationDirPath()+"/libwps_"+mCurTarget);
|
QLibrary lib(mCurTarget);
|
||||||
lib_wps_init = (pfwps_init)lib.resolve("wps_init");
|
lib_wps_init = (pfwps_init)lib.resolve("wps_init");
|
||||||
lib_wps_display = (pfwps_display)lib.resolve("wps_display");
|
lib_wps_display = (pfwps_display)lib.resolve("wps_display");
|
||||||
lib_wps_refresh = (pfwps_refresh)lib.resolve("wps_refresh");
|
lib_wps_refresh = (pfwps_refresh)lib.resolve("wps_refresh");
|
||||||
|
|
@ -47,7 +47,7 @@ bool QWpsDrawer::tryResolve() {
|
||||||
api.load_wps_backdrop = &QWpsDrawer::load_wps_backdrop;
|
api.load_wps_backdrop = &QWpsDrawer::load_wps_backdrop;
|
||||||
api.read_bmp_file = &QWpsDrawer::read_bmp_file;
|
api.read_bmp_file = &QWpsDrawer::read_bmp_file;
|
||||||
api.debugf = &qlogger;
|
api.debugf = &qlogger;
|
||||||
qDebug()<<(qApp->applicationDirPath()+"/libwps_"+mCurTarget+" resolved");
|
qDebug()<<(mCurTarget+" resolved");
|
||||||
}
|
}
|
||||||
return mResolved;
|
return mResolved;
|
||||||
}
|
}
|
||||||
|
|
@ -222,7 +222,7 @@ QString QWpsDrawer::getModelName(QString libraryName) {
|
||||||
QList<QString> QWpsDrawer::getTargets() {
|
QList<QString> QWpsDrawer::getTargets() {
|
||||||
QList<QString> list ;
|
QList<QString> list ;
|
||||||
QDir d = QDir(qApp->applicationDirPath());
|
QDir d = QDir(qApp->applicationDirPath());
|
||||||
QFileInfoList libs = d.entryInfoList(QStringList("libwps*"));
|
QFileInfoList libs = d.entryInfoList(QStringList("libwps_*"));
|
||||||
qDebug() << libs.size()<<"libs found";
|
qDebug() << libs.size()<<"libs found";
|
||||||
for (int i = 0; i < libs.size(); i++) {
|
for (int i = 0; i < libs.size(); i++) {
|
||||||
QString modelName = getModelName(libs[i].absoluteFilePath());
|
QString modelName = getModelName(libs[i].absoluteFilePath());
|
||||||
|
|
@ -230,15 +230,24 @@ QList<QString> QWpsDrawer::getTargets() {
|
||||||
if (modelName == "unknown")
|
if (modelName == "unknown")
|
||||||
continue;
|
continue;
|
||||||
list.append(modelName);
|
list.append(modelName);
|
||||||
|
libs_array[i].target_name = modelName;
|
||||||
|
libs_array[i].lib = libs[i].absoluteFilePath();
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
bool QWpsDrawer::setTarget(QString target) {
|
bool QWpsDrawer::setTarget(QString target) {
|
||||||
QLibrary lib(qApp->applicationDirPath()+"/libwps_"+mCurTarget);
|
foreach(lib_t cur_lib, libs_array)
|
||||||
//lib.unload();
|
{
|
||||||
if (getModelName("libwps_"+target)!="unknown") {
|
if(cur_lib.target_name == target)
|
||||||
mCurTarget = target;
|
{
|
||||||
return tryResolve();
|
QLibrary lib(cur_lib.lib);
|
||||||
|
//lib.unload();
|
||||||
|
if (getModelName(cur_lib.lib) != "unknown")
|
||||||
|
{
|
||||||
|
mCurTarget = cur_lib.lib;
|
||||||
|
return tryResolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
|
#include <QMap>
|
||||||
|
|
||||||
#include "wpsstate.h"
|
#include "wpsstate.h"
|
||||||
|
|
||||||
|
|
@ -38,6 +39,13 @@ class QWpsDrawer : public QWidget {
|
||||||
QString mCurTarget;
|
QString mCurTarget;
|
||||||
static QString mTmpWpsString;
|
static QString mTmpWpsString;
|
||||||
|
|
||||||
|
struct lib_t
|
||||||
|
{
|
||||||
|
QString target_name;
|
||||||
|
QString lib;
|
||||||
|
};
|
||||||
|
QMap<int, lib_t> libs_array;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void paintEvent(QPaintEvent * event);
|
virtual void paintEvent(QPaintEvent * event);
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,13 @@
|
||||||
#
|
#
|
||||||
ROOT=../../..
|
ROOT=../../..
|
||||||
|
|
||||||
OS = w32
|
ifneq ($or($(findstring MINGW,$(shell uname)),$(findstring Windows_NT,$(OS))),)
|
||||||
CC = gcc
|
|
||||||
MKDIR = mkdir -p
|
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
|
||||||
OS = w32
|
OS = w32
|
||||||
CC = mingw32-gcc
|
CC = mingw32-gcc
|
||||||
COPY = copy
|
COPY = copy
|
||||||
RM = rm
|
RM = del
|
||||||
|
EXT = .dll
|
||||||
|
LDFLAGS = -DBUILD_DLL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring Linux,$(shell uname)),Linux)
|
ifeq ($(findstring Linux,$(shell uname)),Linux)
|
||||||
|
|
@ -24,39 +22,48 @@ ifeq ($(findstring Linux,$(shell uname)),Linux)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
COPY = cp
|
COPY = cp
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
EXT = .so
|
||||||
|
LDFLAGS = -fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TARGETS=IRIVER_H10 \
|
||||||
|
IRIVER_H10_5GB \
|
||||||
|
IPOD_COLOR \
|
||||||
|
IPOD_NANO \
|
||||||
|
IPOD_VIDEO \
|
||||||
|
GIGABEAT_F \
|
||||||
|
GIGABEAT_S \
|
||||||
|
SANSA_E200 \
|
||||||
|
SANSA_C200
|
||||||
|
|
||||||
SOURCES= \
|
SOURCES= \
|
||||||
src/api.c \
|
src/api.c \
|
||||||
src/dummies.c \
|
src/dummies.c \
|
||||||
src/lcd.c \
|
src/lcd.c \
|
||||||
src/proxy.c \
|
src/proxy.c \
|
||||||
$(ROOT)/apps/gui/scrollbar.c \
|
$(ROOT)/apps/gui/scrollbar.c \
|
||||||
$(ROOT)/apps/gui/gwps-common.c \
|
$(ROOT)/apps/gui/gwps-common.c \
|
||||||
$(ROOT)/apps/gui/wps_parser.c \
|
$(ROOT)/apps/gui/wps_parser.c \
|
||||||
$(ROOT)/apps/gui/wps_debug.c \
|
$(ROOT)/apps/gui/wps_debug.c \
|
||||||
$(ROOT)/apps/recorder/peakmeter.c \
|
$(ROOT)/apps/recorder/peakmeter.c \
|
||||||
$(ROOT)/apps/recorder/icons.c \
|
$(ROOT)/apps/recorder/icons.c \
|
||||||
$(ROOT)/apps/misc.c \
|
$(ROOT)/apps/misc.c \
|
||||||
$(ROOT)/apps/status.c \
|
$(ROOT)/apps/status.c \
|
||||||
$(ROOT)/firmware/common/ctype.c \
|
$(ROOT)/firmware/common/ctype.c \
|
||||||
$(ROOT)/firmware/common/timefuncs.c \
|
$(ROOT)/firmware/common/timefuncs.c \
|
||||||
$(ROOT)/firmware/common/unicode.c \
|
$(ROOT)/firmware/common/unicode.c \
|
||||||
$(ROOT)/firmware/font.c \
|
$(ROOT)/firmware/font.c \
|
||||||
$(ROOT)/firmware/font_cache.c \
|
$(ROOT)/firmware/font_cache.c \
|
||||||
$(ROOT)/firmware/id3.c \
|
$(ROOT)/firmware/id3.c \
|
||||||
$(ROOT)/firmware/lru.c \
|
$(ROOT)/firmware/lru.c \
|
||||||
$(ROOT)/firmware/mp3data.c \
|
$(ROOT)/firmware/mp3data.c \
|
||||||
$(ROOT)/firmware/replaygain.c
|
$(ROOT)/firmware/replaygain.c
|
||||||
|
# $(ROOT)/apps/recorder/bmp.c
|
||||||
# $(ROOT)/apps/recorder/bmp.c
|
# $(ROOT)/apps/abrepeat.c \
|
||||||
# $(ROOT)/apps/abrepeat.c \
|
# $(ROOT)/apps/action.c \
|
||||||
# $(ROOT)/apps/action.c \
|
# $(ROOT)/apps/cuesheet.c \
|
||||||
# $(ROOT)/apps/cuesheet.c \
|
# $(ROOT)/apps/gui/statusbar.c \
|
||||||
# $(ROOT)/apps/gui/statusbar.c \
|
# $(ROOT)/apps/gui/gwps.c \
|
||||||
# $(ROOT)/apps/gui/gwps.c \
|
|
||||||
|
|
||||||
INCLUDE=-I src/include \
|
INCLUDE=-I src/include \
|
||||||
-I $(ROOT)/apps/gui \
|
-I $(ROOT)/apps/gui \
|
||||||
|
|
@ -68,34 +75,14 @@ INCLUDE=-I src/include \
|
||||||
|
|
||||||
CFLAGS = -g -Wall -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE
|
CFLAGS = -g -Wall -D__PCTOOL__ -DWPSEDITOR -DDEBUG -DROCKBOX_DIR_LEN=1 -DBUTTON_REMOTE
|
||||||
|
|
||||||
all:
|
RESULTS := $(patsubst %,libwps_%$(EXT),$(TARGETS))
|
||||||
@echo To build, run the buildall.sh script
|
|
||||||
|
|
||||||
build: build-$(OS)
|
all: $(RESULTS)
|
||||||
|
@$(COPY) $(RESULTS) ../gui/bin/
|
||||||
|
|
||||||
build-w32: $(SOURCES)
|
libwps_%$(EXT): $(SOURCES)
|
||||||
@echo CC [$(TARGET)]
|
@echo CC [$(subst libwps_,,$(subst $(EXT),,$@))]
|
||||||
@$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -DBUILD_DLL $(SOURCES) -shared -o libwps_$(MODEL).dll
|
@$(CC) $(INCLUDE) $(CFLAGS) -D$(subst libwps_,,$(subst $(EXT),,$@)) $(LDFLAGS) -shared -o $@ $+
|
||||||
|
|
||||||
build-linux: $(SOURCES)
|
clean:
|
||||||
@echo CC [$(TARGET)]
|
$(RM) $(RESULTS)
|
||||||
@$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -shared -Wl,-soname,libwps_$(MODEL).so,-olibwps_$(MODEL).so -fPIC $(SOURCES)
|
|
||||||
|
|
||||||
clean: clean-$(OS)
|
|
||||||
|
|
||||||
clean-w32:
|
|
||||||
$(RM) "libwps_$(MODEL).dll"
|
|
||||||
|
|
||||||
clean-linux:
|
|
||||||
$(RM) "libwps_$(MODEL).so"
|
|
||||||
|
|
||||||
shared: shared-$(OS)
|
|
||||||
|
|
||||||
shared-w32: $(SOURCES)
|
|
||||||
@echo CC [IRIVER_H10_5GB]
|
|
||||||
@$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -DBUILD_DLL -shared $(SOURCES) -o ../gui/bin/libwps_h10_5gb.dll
|
|
||||||
|
|
||||||
shared-linux: $(SOURCES)
|
|
||||||
@echo CC [IRIVER_H10_5GB]
|
|
||||||
@$(CC) $(INCLUDE) $(CFLAGS) -DIRIVER_H10_5GB -DTARGET_MODEL=\"h10_5gb\" -shared -Wl,-soname,libwps_h10_5gb.so,-olibwps_h10_5gb.so -fPIC $(SOURCES)
|
|
||||||
@$(COPY) libwps_h10_5gb.so ../gui/bin/libwps_h10_5gb.so
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
@echo off
|
|
||||||
FOR /F "tokens=1,2* delims=, " %%i in (targets.txt) do @mingw32-make MODEL=%%j TARGET=%%i build 2>nul
|
|
||||||
echo Copying files...
|
|
||||||
xcopy /I /Y *.dll ..\gui\bin
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
cat targets.txt | (
|
|
||||||
while read target model
|
|
||||||
do
|
|
||||||
make MODEL=$model TARGET=$target build
|
|
||||||
done
|
|
||||||
cp *.dll ../gui/bin
|
|
||||||
cp *.so ../gui/bin
|
|
||||||
)
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
cat targets.txt | (
|
|
||||||
while read target model
|
|
||||||
do
|
|
||||||
make MODEL=$model TARGET=$target clean
|
|
||||||
done
|
|
||||||
)
|
|
||||||
|
|
@ -23,8 +23,8 @@ pfdebugf dbgf = 0;
|
||||||
static char pluginbuf[PLUGIN_BUFFER_SIZE];
|
static char pluginbuf[PLUGIN_BUFFER_SIZE];
|
||||||
|
|
||||||
const char* get_model_name(){
|
const char* get_model_name(){
|
||||||
#ifdef TARGET_MODEL
|
#ifdef MODEL_NAME
|
||||||
return TARGET_MODEL;
|
return MODEL_NAME;
|
||||||
#else
|
#else
|
||||||
return "unknown";
|
return "unknown";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
IRIVER_H10 h10
|
|
||||||
IRIVER_H10_5GB h10_5gb
|
|
||||||
IPOD_COLOR ipodcolor
|
|
||||||
IPOD_NANO ipodnano
|
|
||||||
IPOD_VIDEO ipodvideo
|
|
||||||
GIGABEAT_F gigabeatf
|
|
||||||
GIGABEAT_S gigabeats
|
|
||||||
SANSA_E200 e200
|
|
||||||
SANSA_C200 c200
|
|
||||||
|
|
@ -8,31 +8,17 @@
|
||||||
#
|
#
|
||||||
ROOT=../../..
|
ROOT=../../..
|
||||||
|
|
||||||
OS = w32
|
|
||||||
CC = gcc
|
|
||||||
|
|
||||||
ifeq ($(findstring MINGW,$(shell uname)),MINGW)
|
|
||||||
OS = w32
|
|
||||||
CC = mingw32-gcc
|
|
||||||
RM = rm
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(findstring Linux,$(shell uname)),Linux)
|
|
||||||
OS = linux
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
endif
|
|
||||||
|
|
||||||
|
COMMON = main.c gd_bmp.c
|
||||||
|
|
||||||
|
INCLUDE = -I ../libwps/src \
|
||||||
COMMON= main.c gd_bmp.c
|
-I $(ROOT)/apps/gui \
|
||||||
|
-I $(ROOT)/firmware/export \
|
||||||
INCLUDE=-I ../libwps/src \
|
-I $(ROOT)/apps/recorder \
|
||||||
-I $(ROOT)/apps/gui \
|
-I $(ROOT)/apps \
|
||||||
-I $(ROOT)/firmware/export \
|
-I .
|
||||||
-I $(ROOT)/apps/recorder \
|
|
||||||
-I $(ROOT)/apps \
|
|
||||||
-I .
|
|
||||||
|
|
||||||
CFLAGS = -g -Wall
|
CFLAGS = -g -Wall
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,4 @@
|
||||||
SUBDIRS =gui/src/QPropertyEditor gui
|
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
|
SUBDIRS = gui/src/QPropertyEditor gui libwps
|
||||||
|
libwps.commands = @$(MAKE) -C libwps
|
||||||
|
QMAKE_EXTRA_TARGETS += libwps
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue