Rick Posted June 18, 2010 Share Posted June 18, 2010 If I set a password to a pak file, how can I have my program read the data in these files? I've tried SetZipStreamPassword("abstract::pak_file_here.pak", "my_pw_here") but couldn't get it to work. Quote Link to comment Share on other sites More sharing options...
macklebee Posted June 18, 2010 Share Posted June 18, 2010 have you tried SetZipStreamPassword("zip::pak_file_here.pak", "my_pw_here")? I dont know if it will work, but thats the format hinted at in the wiki... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Rick Posted June 18, 2010 Author Share Posted June 18, 2010 I get the same Zip data error if I do that. I would assume as long as I call this before it tries to access anything in the zip/pak file I would be fine. I call this right after Graphics() is set. Quote Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 Still looking for someone who has done this before to lend a hand. Would love to get a game demo out but need to know how I can do this. Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2010 Share Posted June 21, 2010 Earlier it worked so that you could only set the zip password for the first pak file you load. I don't know if this bug has been fixed, and if not, then it should still work that way. So you can only have the first pak file encrypted, all others must be without password. You set the zip password seperately for each pak file, and you can set the zip password for multiple pak files in a row, if the bug has been fixed. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 I only have 1 pak file at the moment for testing purposes. I just zipped up 1 model and it's scripts, textures, & materials and gave it a password then renamed it to pak, but I get Zip data error on the console when loading them. Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2010 Share Posted June 21, 2010 I think you can't zip up lua files at all. I had the same problem in LCP1. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 I thought that also, but that seems to have been fixed. Another post I had Josh said it was fixed and if I zip the lua files along with the model and don't give it a password everything works fine. Quote Link to comment Share on other sites More sharing options...
Canardia Posted June 21, 2010 Share Posted June 21, 2010 Well you need to make a systematic test, which can be used as bug report for Josh then also, by adding each component of the model one at a time and see where it breaks. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 Or Josh could try to see if it works and if it doesn't he could fix it OK, OK, I'll do that and report a bug if I can't get it working. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 21, 2010 Share Posted June 21, 2010 Use this syntax: SetZipStreamPassword("pak_file_here.pak", "my_pw_here") Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted June 21, 2010 Author Share Posted June 21, 2010 I can't seem to get that working. The .pak file reads in fine without a password, but with a password I get Zip data error with that syntax. I place it right after the Graphics() call. The way I make the password is right click the .zip file and select explore. Then from the file menu there is a set password command. Not sure if there is another way or that's wrong or something. SetZipStreamPassword("Swat.pak", "password"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.