diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 7afd973..dadc8b5 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -1,6 +1,9 @@
/* plugins common to all models */
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
chessclock.c
+#endif
credits.c
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
cube.c
dict.c
jackpot.c
@@ -8,27 +11,36 @@ keybox.c
logo.c
lrcplayer.c
mosaique.c
+#endif
properties.c
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
random_folder_advance_config.c
rockblox.c
+#endif
search.c
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
settings_dumper.c
snow.c
+#endif
sort.c
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
stats.c
#ifdef HAVE_TOUCHSCREEN
stopwatch.lua
#else
stopwatch.c
#endif
+#endif
theme_remove.c
vbrfix.c
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
md5sum.c
dice.c
disktidy.c
flipit.c
shopper.c
resistor.c
+#endif


#ifdef USB_ENABLE_HID
@@ -48,8 +60,10 @@ lamp.c
pitch_detector.c
#endif

+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
mp3_encoder.c
wav2wv.c
+#endif
#endif /* CONFIG_CODEC */


@@ -79,7 +93,9 @@ rockboy.c
zxbox.c
chessbox.c
goban.c
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
pictureflow.c
+#endif

#endif /* PLUGIN_BUFFER_SIZE <= 0x20000 && HAVE_LCD_BITMAP */

@@ -135,13 +151,16 @@ wavrecord.c


#if CONFIG_CODEC == SWCODEC || !defined(SIMULATOR) /* Not for hwcodec sims */
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
metronome.c
#endif
+#endif



#ifdef HAVE_LCD_BITMAP /* Not for the Archos Player */

+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
boomshine.lua
rockblox1d.c
brickmania.c
@@ -176,15 +195,20 @@ starfield.c
vu_meter.c
wormlet.c

+
/* Plugins needing the grayscale lib on low-depth LCDs */
fire.c
plasma.c
+#endif

#ifdef HAVE_LCD_COLOR
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
clix.c
codebuster.c
#endif
+#endif

+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
#if (LCD_WIDTH > 112) && (LCD_HEIGHT > 64)
fireworks.c
#endif
@@ -194,6 +218,7 @@ rockpaint.c
#endif

rocklife.c
+#endif

#endif /* HAVE_LCD_BITMAP */

@@ -206,12 +231,16 @@ nim.c

#if LCD_DEPTH > 1 /* non-mono bitmap targets */

+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
matrix.c
+#endif

#if (LCD_WIDTH > 138)
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
invadrox.c
superdom.c
#endif
+#endif

#endif /* LCD_DEPTH > 1 */

diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index c497c49..52c9810 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -1,6 +1,8 @@
/* For all targets */
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
shortcuts
text_viewer
+#endif

/* For various targets... */

@@ -12,6 +14,7 @@ clock
/* For all targets with a bitmap display */
#ifdef HAVE_LCD_BITMAP

+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
#if (CONFIG_KEYPAD != ONDIO_PAD) /* not enough buttons */ \
&& (CONFIG_KEYPAD != SANSA_M200_PAD) /* not enough buttons */ \
&& (LCD_PIXELFORMAT != HORIZONTAL_PACKING) /* TODO */ \
@@ -20,7 +23,9 @@ clock
(LCD_HEIGHT == 128) && (LCD_DEPTH == 2))
rockboy
#endif
+#endif

+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
#ifdef HAVE_TAGCACHE
pictureflow
#endif
@@ -46,10 +51,12 @@ frotz
zxbox
#endif
#endif
+#endif /* (CONFIG_PLATFORM & PLATFORM_HOSTED) */

#endif /* HAVE_LCD_BITMAP */

/* For all big enough colour screens, iriver H1x0 and iAudio M5 */
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
#if defined(HAVE_LCD_COLOR) && LCD_HEIGHT > 96\
|| defined(IRIVER_H100_SERIES) || defined(IAUDIO_M5)
pacbox
@@ -60,12 +67,15 @@ pacbox
&& (MEMORYSIZE > 2 && !defined(RB_PROFILE))
doom
#endif
+#endif /* (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0 */

/* For all the swcodec targets */
#if CONFIG_CODEC == SWCODEC

#if MEMORYSIZE > 2 /* we need a lot of RAM for instruments */
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
midi
+#endif
mikmod
#endif

@@ -79,12 +89,16 @@ pdbox
#endif

#if !defined(RB_PROFILE) && MEMORYSIZE > 2 /* mpegplayer allocates at least 2MB of RAM */
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
mpegplayer
#endif
+#endif

#endif /* CONFIG_CODEC == SWCODEC */

/* Lua needs at least 160 KB to work in */
#if PLUGIN_BUFFER_SIZE >= 0x80000
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) == 0
lua
#endif
+#endif
diff --git a/apps/plugins/lib/simple_viewer.c b/apps/plugins/lib/simple_viewer.c
index 16cbcb3..ece7d34 100644
--- a/apps/plugins/lib/simple_viewer.c
+++ b/apps/plugins/lib/simple_viewer.c
@@ -48,8 +48,13 @@ static bool isbrchr(const unsigned char *str, int len)
while(*p)
{
int n = rb->utf8seek(p, 1);
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED) /* DIRTY HACK, need to find real cause */
+ if (len == n && !strncmp(p, str, len))
+ return true;
+#else
if (len == n && !rb->strncmp(p, str, len))
return true;
+#endif
p += n;
}
return false;
diff --git a/tools/configure b/tools/configure
index 6be8f61..b46a2e3 100755
--- a/tools/configure
+++ b/tools/configure
@@ -2879,7 +2879,7 @@ fi
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
appextra="recorder:gui:radio"
- plugins=""
+ plugins="yes"
swcodec="yes"
# architecture, manufacturer and model for the target-tree build
t_cpu="hosted"