Problems with zipstream on MAC

BlitzMax Forums/BlitzMax Programming/Problems with zipstream on MAC

Midimaster(Posted 2009) [#1]
[Edit: works now! no problem any more]


Hi MAC-Users

I use Koriolis ZipStream in all my projects. But now I will convert it to MAC OSX and it seems not to work.

The example works fine on windows, but on MAC it crashes:

Incbin "pack.zip"
Graphics 800,600

Path$="zip::pack.zip//"
'Path$="zip::incbin::pack.zip//"

Picture:TImage=LoadImage(Path + "picture.png")

DrawImage Picture, 0,0
Flip
WaitKey


I added koriolis.mod folder and put inside both zipstream.mod and bufferedstream.mod

I run "Build modules" on my Blitzmax 1.32 on Mac Intel

But the code crashs. I also tried to do it with additional INCBIN-Feature, but the same


Can anyone help me, or tell me, that it is really running on a MAC?


thank you

midimaster


Blueapples(Posted 2010) [#2]
I'm also having this problem. Code like this works fine:
Global zipFile:String = AppDir + "/data.davey"
Print zipFile + " filetype:'" + FileType(zipFile) + "'"
Global dataPrefix:String = "zip::" + zipFile + "//"

Print "Loading map " + dataPrefix + file + " filetype:" + FileType(DATA_PREFIX + file)
Local data:String = LoadText(dataPrefix + file)
Print "data len:" + Len(data)

Output of above:
/Users/isaac/Documents/Projects/BlitzMax/Davey/data.davey filetype:'1'
Loading map zip::/Users/isaac/Documents/Projects/BlitzMax/Davey/data.davey//test.txt filetype:0
data len:8726

But loading PNG images at least doesn't work:
image = dataPrefix + cmd.get("image")
Print "id:'" + j + "' file:'" + image + "' filetype:'" + FileType(image) + "'"
images[j] = LoadImage(dataPrefix + image)
If images[j] = Null Then
	Print "****ERROR Image not found: '" + image + "'"
	infoError = True
End

Output of trying to load a PNG file:
id:'0' file:'zip::/Users/isaac/Documents/Projects/BlitzMax/Davey/data.davey//blank.png' filetype:'0'
****ERROR Image not found: 'zip::/Users/isaac/Documents/Projects/BlitzMax/Davey/data.davey//blank.png'



Blueapples(Posted 2010) [#3]
Just tried it with a JPG, doesn't seem to make a difference. LoadImage just doesn't work with alternative stream types? That's sort of hard to believe...


Blueapples(Posted 2010) [#4]
Well never mind, I got it working. I was accidentally including my dataPrefix twice when loading the image, as seen in the second code block. Oops!