hi fred,
the original code is very large.
if i run the packer and create a file on windows and read the file on windows, everything works fine. but if i read the file, which is created on windows, in mac, it doesn't work. if i run packer and create a file on mac and read it on mac, everything is also working fine. but if i try to read the file, which is created on mac, in windows, it also fail.
but i tested it only with the UseBriefLZPacker(). Now i will check it with zip.
thanks for your reply fred.
Code:
Global myplace.s, mytemp.s
myplace = GetPathPart(ProgramFilename())
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
#sysexec = ".exe"
#syschar = "\"
; ***
If Right( myplace, 1 ) <> "\" : myplace + "\" : EndIf
; ***
If FileSize("C:\TEMP") <> -2
CreateDirectory("C:\TEMP")
EndIf
; ***
mytemp = "C:\TEMP\"
CompilerDefault
#sysexec = ""
#syschar = "/"
; ***
If Right( myplace, 1 ) <> "/" : myplace + "/" : EndIf
; ***
mytemp = myplace + "temp"
; ***
If FileSize(mytemp) <> -2
CreateDirectory(mytemp)
EndIf
; ***
If Right( mytemp, 1 ) <> "/" : mytemp + "/" : EndIf
CompilerEndSelect
Procedure SaveMyWork( path.s )
Define targetLoc.s = SaveFileRequester(...)
; ...
UseBriefLZPacker()
If CreatePack(0, targetLoc)
Foreach MyWorkFiles()
AddPackFile( 0, MyWorkFiles(), GetFilePart( MyWorkFiles() ) )
Next
EndIf
ClosePack(0)
EndIf
; ...
EndProcedure
Procedure LoadMyWork( path.s )
Define sourceLoc.s = OpenFileRequester(...)
Define fn.s
UseBriefLZPacker()
If OpenPack(0, path)
If ExaminePack(0)
While NextPackEntry(0)
fn = mytemp + PackEntryName(0)
UncompressPackFile(0,fn)
Wend
EndIf
ClosePack(0)
EndIf
EndProcedure