Page 2 of 2

Posted: Fri 04 Dec 2009, 08:43
by YoN
Hi Trio,

I use conveniently on 4.3.1 japanese version. I like your converter.

As hope in the future, if possible, I think that it only has visually to understand the progress report on message splash window "Please wait until this box is closed" screen under conversion.
For instance, it is "Percent display" or "Graph bar display".

Posted: Sun 06 Dec 2009, 00:20
by disciple
I'm a bit too late, aren't I :)

Bug #1: does not work if extension is .SFS instead of .sfs
Bug #2: does not work if paths have spaces.

This quick hack works for me:

Code: Select all

#!/bin/sh
#SFS Converter - 3 to 4, 4 to 3
#Trio Tjandradjaja - GPL 2009


case $1 in
-convert)

[ ! "$SFS" ] && Xdialog --title "SFS Converter Splash" --msgbox "Please drag & drop an sfs" 10 40 && exit 0

EXTENSION=sfs
if [ `echo "$SFS" |tail -c 4` = "SFS" ] ; then EXTENSION=SFS; fi
CHECKSFS=`echo "$SFS" | sed 's/^.*\.//'`
BASENAME=`basename "$SFS" ".$EXTENSION"`
if [ "$CHECKSFS" = "$EXTENSION" ]; then
	TYPE=`disktype "$SFS" | grep 'version 4'`
	if [ ! "$TYPE" ] ; then
	Xdialog --title "SFS Converter Splash" --msgbox "Converting sfs v 3.x to 4.x
	Please wait until this box is closed
	Trio Tj - GPL 2009" 10 40 &
	p=$!
	cd "$DIR"
	unsquashfs3 "$SFS"
	mksquashfs4 "squashfs-root" "$BASENAME-sfs4.$EXTENSION"
	rm -rf "squashfs-root"
	md5sum "$BASENAME-sfs4.$EXTENSION" > "$BASENAME-sfs4.$EXTENSION-md5.txt"
	kill $p
	else
	Xdialog --title "SFS Converter Splash" --msgbox "Converting sfs v 4.x to 3.x
	Please wait until this box is closed
	Trio Tj - GPL 2009" 10 40 &
	p=$!
	cd "$DIR"
	unsquashfs4 "$SFS"
	mksquashfs3 "squashfs-root" "$BASENAME-sfs3.$EXTENSION"
	rm -rf "squashfs-root"
	md5sum "$BASENAME-sfs3.$EXTENSION" > "$BASENAME-sfs3.$EXTENSION-md5.txt"
	kill $p
	fi
else
Xdialog --title "SFS Converter Splash" --msgbox "Not a valid sfs file" 10 40
fi
;;

-version)
Xdialog --title "SFS Version Info" --msgbox "INFO:
	`disktype "$SFS"`" 15 50 &
;;
-help)
defaulttextviewer /usr/local/sfsconvert/README.txt &
;;

esac
It would also be a nice enhancement to add a checkbox so the user can choose not to add -sfs4 in the name... although it doesn't really matter as it isn't an app you use every day :)
Also, a checkbox to rename the original sfs would be nice - that way if you're upgrading to a new puppy you can just replace all your old squashfiles with new ones, keeping a backup, and won't need to rename them manually.

Posted: Sun 13 Dec 2009, 14:26
by Diamond
Please help!
Sfs converter don't work for me,i am using puppy 4.0. All I get is txt file.
How to use this hack ?
Thanx!

Posted: Mon 14 Dec 2009, 05:36
by disciple
I imagine it is because you only have the squashfs tools from Puppy 4.0, so can't extract or create newer squashfiles... or have you got the newer tools from somewhere?

SFS CONVERTER-1.3 sfs 3 to 4 vice versa

Posted: Wed 16 Dec 2009, 22:47
by yerc1
Diamond wrote:Please help!
Sfs converter don't work for me,i am using puppy 4.0. All I get is txt file.
How to use this hack ?
Thanx!
The utility works well for me except for converting an OpenOffice sfs with lzma compression - the one I use for the NOP variant. Is lzma compression the issue or is it the huge size of the sfs file? I don't know, but i'm sharing this for others to take note of when using this wonderful utility and also for trio to have a look at... :D

Posted: Thu 17 Dec 2009, 09:37
by disciple
Probably the lzma... was there plenty of space on the drive you converted it on?
How did it fail?

BTW Diamond, you could try using the squashfs tools from 4.3, although I'm not certain that they will work in 4.0. Does anyone know? Or has anyone packaged them for 4.0?

Also, for information: I discovered that Puppy 4.3 can't use files with .SFS extensions (rather than .sfs), even though 4.1x can.

Posted: Sat 19 Dec 2009, 06:36
by Q5sys
This is great for people that are using 4.3 or newer, but is not much use for people on earlier systems. I'm running 4.1.2, so I cant use this; which sucks cause I really need to.
I guess my only choice is to install a 4.3 system somewhere for the sole purpose of converting newer SFS4 files to SFS so I can use them on my older system. Kinda an obtuse way to get around the problem, but apparently the only solution. While I dont mind doing it for my purpose (trying to install a newer kernel), Im sure there are a ton of people that once they hit this roadblock will just give up. Installing an entire OS no matter how small just to convert one or two files is a lot of effort.

But the general idea of this converter is great. I just wish there was a way that we all could benefit from it. Thanks to the OP who created this program! :) If it wasnt for you work I wouldnt be able to do what I want to do, even though it'll be work intensive.

Posted: Sat 19 Dec 2009, 08:06
by disciple
Actually, it seems that you can install and use the new squashfs tools in an older puppy. Get them from here ftp://ibiblio.org/pub/linux/distributio ... 0-pup4.pet

Posted: Tue 29 Dec 2009, 22:35
by yerc1
disciple wrote:Probably the lzma... was there plenty of space on the drive you converted it on?
How did it fail?
hi disciple,

there was 1 gb free on the drive i converted on.
with the lzma'd sfs (OpenOffice), the resulting file was only the one for checking checksum.
the rest of the sfs files (not using lzma compression) converted ok.

thanks

Posted: Sat 09 Jan 2010, 15:38
by trio
Updated to Version 1.4 -- see main page

Posted: Fri 15 Jan 2010, 12:21
by trio
Updated - v 1.4-1: Version Info now also tells you compatibility of your sfs with your kernel

could you make a newer version four newest kernels ?

Posted: Wed 30 Jul 2014, 07:51
by Pelo
cause kernel is 3.2.48, Sfs convert unable to convert :?

kde357j-4.sfs: 51 M

Posted: Tue 01 Dec 2015, 10:52
by Pelo
system for esmourguit works, tested with slacko 5.7 :) kde357j-4.sfs: 51 M