Had to go to the source code to see the -d option, so it's missing from the readme.
I've run into a problem:
Code:
#!/bin/sh
SH_IVTOOL=/mnt/ext1/system/bin/sh_ivtool.app
EXT=".txt .ini .php"
FILE=`$SH_IVTOOL -f "/mnt/ext2/Folder" "$EXT"`
if [ $? -eq 0 ]; then
echo $FILE > /mnt/ext1/applications/MPlayer/test.txt
fi
The file selection pops up properly and sh_ivtool exits with error code 0, but $FILE remains empty.
Tried it first with sh_ivtool popping a message containing $FILE but the result is empty.
Edit: Also I believe it would be more consistent and proper if -q returned its answer rather than relying on stderr , especially since right now the answer would be considered 'no' even if the user aborted.
Edit2: Same thing if i build sh_ivtool for the emulator, the selected file shows on the terminal screen (with some errors) but if you try and redirect or capture the result (stdout or stderr) either by redirection or into a variable it evaporates.
Edit3: Examples of those errors:
-d
Code:
./sh_ivtool -d "Choose one"
** Message: Command 501 selected
./system/mnt/ext1
hw_close
(<unknown>:17654): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(<unknown>:17654): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
Code:
./sh_ivtool -d "Choose one" > test.txt
** Message: Command 501 selected
hw_close
(<unknown>:17655): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(<unknown>:17655): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
-f
Code:
./sh_ivtool -f "/home/main/" ".m3u"
** Message: Command 501 selected
/home/main/0.m3u
hw_close
(<unknown>:17660): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(<unknown>:17660): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().
Code:
./sh_ivtool -f "/home/main/" ".m3u" > test.txt
** Message: Command 501 selected
hw_close
(<unknown>:17673): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(<unknown>:17673): Gtk-WARNING **: A floating object was finalized. This means that someone
called g_object_unref() on an object that had only a floating
reference; the initial floating reference is not owned by anyone
and must be removed with g_object_ref_sink().