summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-04 14:49:53 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-04 14:49:53 +0000
commit561df3827e091c5646648a50b94278843a7554aa (patch)
tree997ea7525cf3140f47b5a05ce7669cbf4ffaa7b8
parentebe3e032b9dcc4aec2aac7892a190477700bb6c9 (diff)
downloadrockbox-561df3827e091c5646648a50b94278843a7554aa.tar.gz
rockbox-561df3827e091c5646648a50b94278843a7554aa.tar.bz2
rockbox-561df3827e091c5646648a50b94278843a7554aa.zip
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
-rw-r--r--firmware/export/config-c100.h2
-rw-r--r--firmware/export/config-c200.h2
-rw-r--r--firmware/export/config-cowond2.h2
-rw-r--r--firmware/export/config-creativezv.h2
-rw-r--r--firmware/export/config-creativezvm.h4
-rw-r--r--firmware/export/config-creativezvm60gb.h2
-rw-r--r--firmware/export/config-e200.h2
-rw-r--r--firmware/export/config-fmrecorder.h2
-rw-r--r--firmware/export/config-gigabeat-s.h2
-rw-r--r--firmware/export/config-gigabeat.h2
-rw-r--r--firmware/export/config-h100.h2
-rw-r--r--firmware/export/config-h120.h2
-rw-r--r--firmware/export/config-h300.h2
-rwxr-xr-xfirmware/export/config-hdd1630.h2
-rw-r--r--firmware/export/config-iaudiom3.h2
-rw-r--r--firmware/export/config-iaudiom5.h2
-rw-r--r--firmware/export/config-iaudiox5.h2
-rw-r--r--firmware/export/config-ifp7xx.h2
-rw-r--r--firmware/export/config-ipod1g2g.h2
-rw-r--r--firmware/export/config-ipod3g.h2
-rw-r--r--firmware/export/config-ipod4g.h2
-rw-r--r--firmware/export/config-ipodcolor.h2
-rw-r--r--firmware/export/config-ipodmini.h2
-rw-r--r--firmware/export/config-ipodmini2g.h2
-rw-r--r--firmware/export/config-ipodnano.h2
-rw-r--r--firmware/export/config-ipodvideo.h2
-rw-r--r--firmware/export/config-logikdax.h2
-rw-r--r--firmware/export/config-m200.h2
-rw-r--r--firmware/export/config-meizu-m6sl.h4
-rw-r--r--firmware/export/config-mrobe500.h1
-rw-r--r--firmware/export/config-ondavx747.h2
-rw-r--r--firmware/export/config-ondiofm.h2
-rw-r--r--firmware/export/config-ondiosp.h2
-rw-r--r--firmware/export/config-player.h2
-rw-r--r--firmware/export/config-recorder.h2
-rw-r--r--firmware/export/config-recorderv2.h2
-rw-r--r--firmware/export/config-tpj1022.h2
-rw-r--r--utils/wpseditor/buildall.bat9
-rwxr-xr-xutils/wpseditor/buildall.sh4
-rw-r--r--utils/wpseditor/gui/src/qwpsdrawer.cpp27
-rw-r--r--utils/wpseditor/gui/src/qwpsdrawer.h8
-rw-r--r--utils/wpseditor/libwps/Makefile113
-rw-r--r--utils/wpseditor/libwps/buildall.bat4
-rwxr-xr-xutils/wpseditor/libwps/buildall.sh9
-rw-r--r--utils/wpseditor/libwps/cleanall.sh7
-rw-r--r--utils/wpseditor/libwps/src/proxy.c4
-rw-r--r--utils/wpseditor/libwps/targets.txt9
-rw-r--r--utils/wpseditor/screenshot/Makefile28
-rw-r--r--utils/wpseditor/wpseditor.pro4
49 files changed, 160 insertions, 143 deletions
diff --git a/firmware/export/config-c100.h b/firmware/export/config-c100.h
index 91e21d0f3b..5bf0fc83a6 100644
--- a/firmware/export/config-c100.h
+++ b/firmware/export/config-c100.h
@@ -3,6 +3,8 @@
*/
#define TARGET_TREE /* this target is using the target tree system */
+#define MODEL_NAME "Sandisk Sansa c100 series"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 30
diff --git a/firmware/export/config-c200.h b/firmware/export/config-c200.h
index d7b8e7e824..bb8adae505 100644
--- a/firmware/export/config-c200.h
+++ b/firmware/export/config-c200.h
@@ -5,7 +5,7 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 20
-#define MODEL_NAME "Sandisk Sansa c200"
+#define MODEL_NAME "Sandisk Sansa c200 series"
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h
index 841390b479..1bcb406837 100644
--- a/firmware/export/config-cowond2.h
+++ b/firmware/export/config-cowond2.h
@@ -6,6 +6,8 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 24
+#define MODEL_NAME "Cowon iAudio D2"
+
/* Produce a dual-boot bootloader.bin for mktccboot */
#define TCCBOOT
diff --git a/firmware/export/config-creativezv.h b/firmware/export/config-creativezv.h
index bf7b45b4a9..78055018d1 100644
--- a/firmware/export/config-creativezv.h
+++ b/firmware/export/config-creativezv.h
@@ -28,6 +28,8 @@
#define CREATIVE_ZV 1
+#define MODEL_NAME "Creative Zen Vision"
+
/* This makes it part of the Creative Zen Vision family :) */
#define CREATIVE_ZVx 1
diff --git a/firmware/export/config-creativezvm.h b/firmware/export/config-creativezvm.h
index 647e8e986c..c2abcda7f5 100644
--- a/firmware/export/config-creativezvm.h
+++ b/firmware/export/config-creativezvm.h
@@ -28,6 +28,8 @@
#define CREATIVE_ZVM 1
+#define MODEL_NAME "Creative Zen Vision: M"
+
/* This makes it part of the Creative Zen Vision family :) */
#define CREATIVE_ZVx 1
@@ -160,7 +162,7 @@
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"
-#define CONFIG_USBOTG USBOTG_ISP1583
+#define CONFIG_USBOTG USBOTG_ISP1583
#define HAVE_USBSTACK
#define USB_VENDOR_ID 0x041e
#define USB_PRODUCT_ID 0x4133
diff --git a/firmware/export/config-creativezvm60gb.h b/firmware/export/config-creativezvm60gb.h
index e9ad101a34..93fb2e5ec0 100644
--- a/firmware/export/config-creativezvm60gb.h
+++ b/firmware/export/config-creativezvm60gb.h
@@ -28,6 +28,8 @@
#define CREATIVE_ZVM60GB 1
+#define MODEL_NAME "Creative Zen Vision:M 60GB"
+
/* This makes it part of the Creative Zen Vision family :) */
#define CREATIVE_ZVx 1
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index 3a4ab69082..f187c973f5 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -5,7 +5,7 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 16
-#define MODEL_NAME "Sandisk Sansa e200"
+#define MODEL_NAME "Sandisk Sansa e200 series"
#define HW_SAMPR_CAPS (SAMPR_CAP_44)
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index c3c894edb9..fd85e51b46 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -1,6 +1,8 @@
/* define this if you use an ATA controller */
#define HAVE_ATA
+#define MODEL_NAME "Archos FM Recorder"
+
/* define this if you have recording possibility */
#define HAVE_RECORDING
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h
index cafb202ebe..1f40339065 100644
--- a/firmware/export/config-gigabeat-s.h
+++ b/firmware/export/config-gigabeat-s.h
@@ -7,6 +7,8 @@
#define TOSHIBA_GIGABEAT_S 1
+#define MODEL_NAME "Toshiba Gigabeat S"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 21
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h
index cf64baab12..27bd51e3ab 100644
--- a/firmware/export/config-gigabeat.h
+++ b/firmware/export/config-gigabeat.h
@@ -5,6 +5,8 @@
#define TOSHIBA_GIGABEAT_F 1
+#define MODEL_NAME "Toshiba Gigabeat F"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 18
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 987f9a686e..f250c5f862 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -9,6 +9,8 @@
*/
#define IRIVER_H100_SERIES 1
+#define MODEL_NAME "iriver iHP-100 series"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 1
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index afb848898c..9cea95eb6f 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -4,6 +4,8 @@
*/
#define IRIVER_H100_SERIES 1
+#define MODEL_NAME "iriver H120/H140"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 0
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index c9b473a2f3..4aae255daa 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -4,6 +4,8 @@
*/
#define IRIVER_H300_SERIES 1
+#define MODEL_NAME "iriver H300 series"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 2
diff --git a/firmware/export/config-hdd1630.h b/firmware/export/config-hdd1630.h
index 19ca190a57..5b89bded21 100755
--- a/firmware/export/config-hdd1630.h
+++ b/firmware/export/config-hdd1630.h
@@ -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 */
diff --git a/firmware/export/config-iaudiom3.h b/firmware/export/config-iaudiom3.h
index 1541f7cee5..b8dc52c91e 100644
--- a/firmware/export/config-iaudiom3.h
+++ b/firmware/export/config-iaudiom3.h
@@ -6,6 +6,8 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 25
+#define MODEL_NAME "iAudio M3"
+
/* define this if you use an ATA controller */
#define HAVE_ATA
diff --git a/firmware/export/config-iaudiom5.h b/firmware/export/config-iaudiom5.h
index e54fb15231..a5b0f3d7bd 100644
--- a/firmware/export/config-iaudiom5.h
+++ b/firmware/export/config-iaudiom5.h
@@ -6,6 +6,8 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 17
+#define MODEL_NAME "iAudio M5"
+
/* define this if you use an ATA controller */
#define HAVE_ATA
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index 0d6e50053f..c29d4242fe 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -6,6 +6,8 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 10
+#define MODEL_NAME "iAudio X5"
+
/* define this if you use an ATA controller */
#define HAVE_ATA
diff --git a/firmware/export/config-ifp7xx.h b/firmware/export/config-ifp7xx.h
index 41193e251d..bea4374fc1 100644
--- a/firmware/export/config-ifp7xx.h
+++ b/firmware/export/config-ifp7xx.h
@@ -5,6 +5,8 @@
#define IRIVER_IFP7XX_SERIES 1
+#define MODEL_NAME "iriver iFP-799"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 6
diff --git a/firmware/export/config-ipod1g2g.h b/firmware/export/config-ipod1g2g.h
index 6781fe608f..cbb5267331 100644
--- a/firmware/export/config-ipod1g2g.h
+++ b/firmware/export/config-ipod1g2g.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod 1g/2g"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 19
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h
index d5f403c1a9..6c78f408bf 100644
--- a/firmware/export/config-ipod3g.h
+++ b/firmware/export/config-ipod3g.h
@@ -6,6 +6,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod 3g"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 7
diff --git a/firmware/export/config-ipod4g.h b/firmware/export/config-ipod4g.h
index ad03f41b90..c5c592dfca 100644
--- a/firmware/export/config-ipod4g.h
+++ b/firmware/export/config-ipod4g.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod 4g Grayscale"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 8
diff --git a/firmware/export/config-ipodcolor.h b/firmware/export/config-ipodcolor.h
index 9a7c055d53..cda0857b19 100644
--- a/firmware/export/config-ipodcolor.h
+++ b/firmware/export/config-ipodcolor.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod Color/Photo"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 3
diff --git a/firmware/export/config-ipodmini.h b/firmware/export/config-ipodmini.h
index 15aa95bce5..b5c566f4c5 100644
--- a/firmware/export/config-ipodmini.h
+++ b/firmware/export/config-ipodmini.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod Mini 1g"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 9
diff --git a/firmware/export/config-ipodmini2g.h b/firmware/export/config-ipodmini2g.h
index c861f5ae13..6a6ab7b07a 100644
--- a/firmware/export/config-ipodmini2g.h
+++ b/firmware/export/config-ipodmini2g.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod Mini 2g"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 11
diff --git a/firmware/export/config-ipodnano.h b/firmware/export/config-ipodnano.h
index ced2c47b4e..bfdf7fdc30 100644
--- a/firmware/export/config-ipodnano.h
+++ b/firmware/export/config-ipodnano.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod Nano 1g"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 4
diff --git a/firmware/export/config-ipodvideo.h b/firmware/export/config-ipodvideo.h
index d15494cfd1..4c56d74c72 100644
--- a/firmware/export/config-ipodvideo.h
+++ b/firmware/export/config-ipodvideo.h
@@ -5,6 +5,8 @@
#define IPOD_ARCH 1
+#define MODEL_NAME "Apple iPod Video"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 5
diff --git a/firmware/export/config-logikdax.h b/firmware/export/config-logikdax.h
index 175bf7ccdf..c66a2ab581 100644
--- a/firmware/export/config-logikdax.h
+++ b/firmware/export/config-logikdax.h
@@ -6,6 +6,8 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 27
+#define MODEL_NAME "Logik DAX MP3/DAB"
+
/* define this if you have recording possibility */
//#define HAVE_RECORDING
diff --git a/firmware/export/config-m200.h b/firmware/export/config-m200.h
index 875debd257..f7ab78d87e 100644
--- a/firmware/export/config-m200.h
+++ b/firmware/export/config-m200.h
@@ -6,6 +6,8 @@
/* For Rolo and boot loader */
#define MODEL_NUMBER 29
+#define MODEL_NAME "Sandisk Sansa m200 series"
+
/* Enable FAT16 support */
#define HAVE_FAT16SUPPORT
diff --git a/firmware/export/config-meizu-m6sl.h b/firmware/export/config-meizu-m6sl.h
index 96c163ce11..f10f548dd3 100644
--- a/firmware/export/config-meizu-m6sl.h
+++ b/firmware/export/config-meizu-m6sl.h
@@ -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 */
/* For Rolo and boot loader */
#define MODEL_NUMBER 1
+#define MODEL_NAME "Meizu M6SL"
+
/* define this if you have recording possibility */
//#define HAVE_RECORDING
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h
index 285a53a014..b9b8ee65ab 100644
--- a/firmware/export/config-mrobe500.h
+++ b/firmware/export/config-mrobe500.h
@@ -27,6 +27,7 @@
#define CONFIG_SDRAM_START 0x00900000
#define OLYMPUS_MROBE_500 1
+#define MODEL_NAME "Olympus M:Robe 500i"
/* For Rolo and boot loader */
#define MODEL_NUMBER 22
diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h
index 9f5c800d3c..66570d4622 100644
--- a/firmware/export/config-ondavx747.h
+++ b/firmware/export/config-ondavx747.h
@@ -28,6 +28,8 @@
#define ONDA_VX747 1
+#define MODEL_NAME "Onda VX747"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 30
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h
index d750b2d756..8d3b040745 100644
--- a/firmware/export/config-ondiofm.h
+++ b/firmware/export/config-ondiofm.h
@@ -1,6 +1,8 @@
/* define this if you have recording possibility */
#define HAVE_RECORDING
+#define MODEL_NAME "Ondio FM"
+
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN)
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h
index 43dbaaf06b..fc99bf459d 100644
--- a/firmware/export/config-ondiosp.h
+++ b/firmware/export/config-ondiosp.h
@@ -1,6 +1,8 @@
/* define this if you have a bitmap LCD display */
#define HAVE_LCD_BITMAP
+#define MODEL_NAME "Ondio SP"
+
/* define this if you can flip your LCD */
#define HAVE_LCD_FLIP
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index 2fefcbdcac..186bd5a58d 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -1,6 +1,8 @@
/* define this if you use an ATA controller */
#define HAVE_ATA
+#define MODEL_NAME "Archos Player/Studio"
+
/* define this if you have a charcell LCD display */
#define HAVE_LCD_CHARCELLS
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index bd9bd07d58..b86e31630a 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -1,6 +1,8 @@
/* define this if you use an ATA controller */
#define HAVE_ATA
+#define MODEL_NAME "Archos Recorder"
+
/* define this if you have recording possibility */
#define HAVE_RECORDING
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index 50066918b1..fd00b78887 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -1,6 +1,8 @@
/* define this if you use an ATA controller */
#define HAVE_ATA
+#define MODEL_NAME "Archos Recorder v2"
+
/* define this if you have recording possibility */
#define HAVE_RECORDING
diff --git a/firmware/export/config-tpj1022.h b/firmware/export/config-tpj1022.h
index 5a633ecee1..ea235edc24 100644
--- a/firmware/export/config-tpj1022.h
+++ b/firmware/export/config-tpj1022.h
@@ -4,6 +4,8 @@
#define TARGET_TREE /* this target is using the target tree system */
+#define MODEL_NAME "Tatung Elio TPJ-1022"
+
/* For Rolo and boot loader */
#define MODEL_NUMBER 15
diff --git a/utils/wpseditor/buildall.bat b/utils/wpseditor/buildall.bat
deleted file mode 100644
index b813a38510..0000000000
--- a/utils/wpseditor/buildall.bat
+++ /dev/null
@@ -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 ..
diff --git a/utils/wpseditor/buildall.sh b/utils/wpseditor/buildall.sh
deleted file mode 100755
index c891900813..0000000000
--- a/utils/wpseditor/buildall.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-qmake && make
-cd libwps
-./buildall.sh 2> /dev/null
diff --git a/utils/wpseditor/gui/src/qwpsdrawer.cpp b/utils/wpseditor/gui/src/qwpsdrawer.cpp
index a506d5c03b..096d835491 100644
--- a/utils/wpseditor/gui/src/qwpsdrawer.cpp
+++ b/utils/wpseditor/gui/src/qwpsdrawer.cpp
@@ -17,14 +17,14 @@ QImage QWpsDrawer::backdrop;
proxy_api QWpsDrawer::api;
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();
newTempWps();
}
bool QWpsDrawer::tryResolve() {
- QLibrary lib(qApp->applicationDirPath()+"/libwps_"+mCurTarget);
+ QLibrary lib(mCurTarget);
lib_wps_init = (pfwps_init)lib.resolve("wps_init");
lib_wps_display = (pfwps_display)lib.resolve("wps_display");
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.read_bmp_file = &QWpsDrawer::read_bmp_file;
api.debugf = &qlogger;
- qDebug()<<(qApp->applicationDirPath()+"/libwps_"+mCurTarget+" resolved");
+ qDebug()<<(mCurTarget+" resolved");
}
return mResolved;
}
@@ -222,7 +222,7 @@ QString QWpsDrawer::getModelName(QString libraryName) {
QList<QString> QWpsDrawer::getTargets() {
QList<QString> list ;
QDir d = QDir(qApp->applicationDirPath());
- QFileInfoList libs = d.entryInfoList(QStringList("libwps*"));
+ QFileInfoList libs = d.entryInfoList(QStringList("libwps_*"));
qDebug() << libs.size()<<"libs found";
for (int i = 0; i < libs.size(); i++) {
QString modelName = getModelName(libs[i].absoluteFilePath());
@@ -230,15 +230,24 @@ QList<QString> QWpsDrawer::getTargets() {
if (modelName == "unknown")
continue;
list.append(modelName);
+ libs_array[i].target_name = modelName;
+ libs_array[i].lib = libs[i].absoluteFilePath();
}
return list;
}
bool QWpsDrawer::setTarget(QString target) {
- QLibrary lib(qApp->applicationDirPath()+"/libwps_"+mCurTarget);
- //lib.unload();
- if (getModelName("libwps_"+target)!="unknown") {
- mCurTarget = target;
- return tryResolve();
+ foreach(lib_t cur_lib, libs_array)
+ {
+ if(cur_lib.target_name == target)
+ {
+ QLibrary lib(cur_lib.lib);
+ //lib.unload();
+ if (getModelName(cur_lib.lib) != "unknown")
+ {
+ mCurTarget = cur_lib.lib;
+ return tryResolve();
+ }
+ }
}
return false;
}
diff --git a/utils/wpseditor/gui/src/qwpsdrawer.h b/utils/wpseditor/gui/src/qwpsdrawer.h
index 65e98723f5..eec4300286 100644
--- a/utils/wpseditor/gui/src/qwpsdrawer.h
+++ b/utils/wpseditor/gui/src/qwpsdrawer.h
@@ -5,6 +5,7 @@
#include <QPixmap>
#include <QPointer>
#include <QTemporaryFile>
+#include <QMap>
#include "wpsstate.h"
@@ -37,6 +38,13 @@ class QWpsDrawer : public QWidget {
QString mWpsString;
QString mCurTarget;
static QString mTmpWpsString;
+
+ struct lib_t
+ {
+ QString target_name;
+ QString lib;
+ };
+ QMap<int, lib_t> libs_array;
protected:
diff --git a/utils/wpseditor/libwps/Makefile b/utils/wpseditor/libwps/Makefile
index c5d0a39de1..879cc8e4db 100644
--- a/utils/wpseditor/libwps/Makefile
+++ b/utils/wpseditor/libwps/Makefile
@@ -8,15 +8,13 @@
#
ROOT=../../..
-OS = w32
-CC = gcc
-MKDIR = mkdir -p
-
-ifeq ($(findstring MINGW,$(shell uname)),MINGW)
+ifneq ($or($(findstring MINGW,$(shell uname)),$(findstring Windows_NT,$(OS))),)
OS = w32
CC = mingw32-gcc
COPY = copy
- RM = rm
+ RM = del
+ EXT = .dll
+ LDFLAGS = -DBUILD_DLL
endif
ifeq ($(findstring Linux,$(shell uname)),Linux)
@@ -24,39 +22,48 @@ ifeq ($(findstring Linux,$(shell uname)),Linux)
CC = gcc
COPY = cp
RM = rm -f
+ EXT = .so
+ LDFLAGS = -fPIC
endif
-
+TARGETS=IRIVER_H10 \
+ IRIVER_H10_5GB \
+ IPOD_COLOR \
+ IPOD_NANO \
+ IPOD_VIDEO \
+ GIGABEAT_F \
+ GIGABEAT_S \
+ SANSA_E200 \
+ SANSA_C200
SOURCES= \
- src/api.c \
- src/dummies.c \
- src/lcd.c \
- src/proxy.c \
- $(ROOT)/apps/gui/scrollbar.c \
- $(ROOT)/apps/gui/gwps-common.c \
- $(ROOT)/apps/gui/wps_parser.c \
- $(ROOT)/apps/gui/wps_debug.c \
- $(ROOT)/apps/recorder/peakmeter.c \
- $(ROOT)/apps/recorder/icons.c \
- $(ROOT)/apps/misc.c \
- $(ROOT)/apps/status.c \
- $(ROOT)/firmware/common/ctype.c \
- $(ROOT)/firmware/common/timefuncs.c \
- $(ROOT)/firmware/common/unicode.c \
- $(ROOT)/firmware/font.c \
- $(ROOT)/firmware/font_cache.c \
- $(ROOT)/firmware/id3.c \
- $(ROOT)/firmware/lru.c \
- $(ROOT)/firmware/mp3data.c \
- $(ROOT)/firmware/replaygain.c
-
-# $(ROOT)/apps/recorder/bmp.c
-# $(ROOT)/apps/abrepeat.c \
-# $(ROOT)/apps/action.c \
-# $(ROOT)/apps/cuesheet.c \
-# $(ROOT)/apps/gui/statusbar.c \
-# $(ROOT)/apps/gui/gwps.c \
+ src/api.c \
+ src/dummies.c \
+ src/lcd.c \
+ src/proxy.c \
+ $(ROOT)/apps/gui/scrollbar.c \
+ $(ROOT)/apps/gui/gwps-common.c \
+ $(ROOT)/apps/gui/wps_parser.c \
+ $(ROOT)/apps/gui/wps_debug.c \
+ $(ROOT)/apps/recorder/peakmeter.c \
+ $(ROOT)/apps/recorder/icons.c \
+ $(ROOT)/apps/misc.c \
+ $(ROOT)/apps/status.c \
+ $(ROOT)/firmware/common/ctype.c \
+ $(ROOT)/firmware/common/timefuncs.c \
+ $(ROOT)/firmware/common/unicode.c \
+ $(ROOT)/firmware/font.c \
+ $(ROOT)/firmware/font_cache.c \
+ $(ROOT)/firmware/id3.c \
+ $(ROOT)/firmware/lru.c \
+ $(ROOT)/firmware/mp3data.c \
+ $(ROOT)/firmware/replaygain.c
+# $(ROOT)/apps/recorder/bmp.c
+# $(ROOT)/apps/abrepeat.c \
+# $(ROOT)/apps/action.c \
+# $(ROOT)/apps/cuesheet.c \
+# $(ROOT)/apps/gui/statusbar.c \
+# $(ROOT)/apps/gui/gwps.c \
INCLUDE=-I src/include \
-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
-all:
- @echo To build, run the buildall.sh script
-
-build: build-$(OS)
-
-build-w32: $(SOURCES)
- @echo CC [$(TARGET)]
- @$(CC) $(INCLUDE) $(CFLAGS) -D$(TARGET) -DTARGET_MODEL=\"$(MODEL)\" -DBUILD_DLL $(SOURCES) -shared -o libwps_$(MODEL).dll
-
-build-linux: $(SOURCES)
- @echo CC [$(TARGET)]
- @$(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"
+RESULTS := $(patsubst %,libwps_%$(EXT),$(TARGETS))
-shared: shared-$(OS)
+all: $(RESULTS)
+ @$(COPY) $(RESULTS) ../gui/bin/
-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
+libwps_%$(EXT): $(SOURCES)
+ @echo CC [$(subst libwps_,,$(subst $(EXT),,$@))]
+ @$(CC) $(INCLUDE) $(CFLAGS) -D$(subst libwps_,,$(subst $(EXT),,$@)) $(LDFLAGS) -shared -o $@ $+
-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
+clean:
+ $(RM) $(RESULTS)
diff --git a/utils/wpseditor/libwps/buildall.bat b/utils/wpseditor/libwps/buildall.bat
deleted file mode 100644
index fb66b41904..0000000000
--- a/utils/wpseditor/libwps/buildall.bat
+++ /dev/null
@@ -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
diff --git a/utils/wpseditor/libwps/buildall.sh b/utils/wpseditor/libwps/buildall.sh
deleted file mode 100755
index 0f32bb9b9a..0000000000
--- a/utils/wpseditor/libwps/buildall.sh
+++ /dev/null
@@ -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
-)
diff --git a/utils/wpseditor/libwps/cleanall.sh b/utils/wpseditor/libwps/cleanall.sh
deleted file mode 100644
index 15b733a6a7..0000000000
--- a/utils/wpseditor/libwps/cleanall.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-cat targets.txt | (
- while read target model
- do
- make MODEL=$model TARGET=$target clean
- done
-)
diff --git a/utils/wpseditor/libwps/src/proxy.c b/utils/wpseditor/libwps/src/proxy.c
index 8f9218e3ff..1e4804cd11 100644
--- a/utils/wpseditor/libwps/src/proxy.c
+++ b/utils/wpseditor/libwps/src/proxy.c
@@ -23,8 +23,8 @@ pfdebugf dbgf = 0;
static char pluginbuf[PLUGIN_BUFFER_SIZE];
const char* get_model_name(){
-#ifdef TARGET_MODEL
- return TARGET_MODEL;
+#ifdef MODEL_NAME
+ return MODEL_NAME;
#else
return "unknown";
#endif
diff --git a/utils/wpseditor/libwps/targets.txt b/utils/wpseditor/libwps/targets.txt
deleted file mode 100644
index 547a2ba42c..0000000000
--- a/utils/wpseditor/libwps/targets.txt
+++ /dev/null
@@ -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
diff --git a/utils/wpseditor/screenshot/Makefile b/utils/wpseditor/screenshot/Makefile
index 18a6de35a5..f9309f58a5 100644
--- a/utils/wpseditor/screenshot/Makefile
+++ b/utils/wpseditor/screenshot/Makefile
@@ -8,31 +8,17 @@
#
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
RM = rm -f
-endif
-
-
-COMMON= main.c gd_bmp.c
+COMMON = main.c gd_bmp.c
-INCLUDE=-I ../libwps/src \
- -I $(ROOT)/apps/gui \
- -I $(ROOT)/firmware/export \
- -I $(ROOT)/apps/recorder \
- -I $(ROOT)/apps \
- -I .
+INCLUDE = -I ../libwps/src \
+ -I $(ROOT)/apps/gui \
+ -I $(ROOT)/firmware/export \
+ -I $(ROOT)/apps/recorder \
+ -I $(ROOT)/apps \
+ -I .
CFLAGS = -g -Wall
diff --git a/utils/wpseditor/wpseditor.pro b/utils/wpseditor/wpseditor.pro
index 0e9ecbbf51..df954ed68a 100644
--- a/utils/wpseditor/wpseditor.pro
+++ b/utils/wpseditor/wpseditor.pro
@@ -1,2 +1,4 @@
-SUBDIRS =gui/src/QPropertyEditor gui
TEMPLATE = subdirs
+SUBDIRS = gui/src/QPropertyEditor gui libwps
+libwps.commands = @$(MAKE) -C libwps
+QMAKE_EXTRA_TARGETS += libwps