Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / [WIP] Beta release of WadPacker: Single file, cross platform protected media for T1

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 22nd Nov 2017 21:11
I requested the unzip to memblock

Zipping is pretty useful for size and a (very basic) encryption.
I looked into the possibility of doing an in memory plugin, which will work great in Windows of course.

I think the zip functions in AppGameKit need to be expanded. The library must surely have loads of unexposed options, including passwords, different compression methods and strengths and of course streams!
Alex_2015
7
Years of Service
User Offline
Joined: 13th Sep 2017
Location: Somewhere in Putin's Russia
Posted: 23rd Dec 2017 14:14
Hi nz0!
Thanks for your wadpacker utility.
I've been trying to use it with my little app and stumbled in to a problem.
Everything works just fine but only on the very machine where the app was compiled. While testing on other PCs I get the error message.
At the same time I am able to run the app on a test PC from a flash stick. The problem occurs only when when the app is run from the HDD.
What am I doing wrong?
Thanks in advance.

https://imgur.com/a/Nkr2C

Attachments

Login to view attachments
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 26th Dec 2017 03:02
Does that strange char path make sense to you?
I think the write path is strangled because of restrictions somewhere.

which app are we talking about here - the packer or the agk application trying to use the data?
Alex_2015
7
Years of Service
User Offline
Joined: 13th Sep 2017
Location: Somewhere in Putin's Russia
Posted: 30th Dec 2017 20:39
Yes, we are talking about the agk application trying to use the data. The packer works fine.
It seems that I was able to locate the problem. That strange nonsense part of the path that you paid your attention to, is actually a folder named with Cyrillic (russian) letters (that's because me and the test PCs are all located in Russia).
Since my previous post I was able to run my app (with wadpacker packed resources) on 3rd party PCs. And that was achieved by avoiding of Cyrillic named folders.
E.g. my wadpacked AppGameKit app will run from C:\MyApps\NewApp, but it won't if one of the folders is renamed into Cyrillic C:\MyApps\НовыйАпп
This applies only to agk apps with wadpacker protected resources. Regular agk app runs from Cyrillic named folders easily.

Any ideas on how to go around this problem except of advising every user to avoid copying the app to Cyrillic named folders?
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jan 2018 00:37
The folder name has a quote char in it - [P"PjP]..
Is this a real Cyrillic char or a conversion mistake in the error message? What should the user name folder actually be called?

If I look at line 348 in the wadpacker lib, it's using the AppGameKit "ExtractZip" command with the file which does exist because it's detected with if GetFileExists("extract.tmp") at line 345.

Perhaps the problem is with the AppGameKit "ExtractZip" command and Cyrillic folder path? Could you verify that?
You could also look in that folder when it breaks and see if there's an actual file there to be sure, but the GetFileExists("extract.tmp") already returned true in the code.

Sorry for not responding sooner - the subscribe notifier doesn't seem to be sending emails when a thread gets updated.


Alex_2015
7
Years of Service
User Offline
Joined: 13th Sep 2017
Location: Somewhere in Putin's Russia
Posted: 7th Jan 2018 16:12
Yes, it looks like "ExtractZip" command itself has problems with Cyrillic folder paths. I have tested it today and when trying to handle a zip file from a folder containing at least one Cyrillic symbol in its path, ExctractZip command leads to the same error ("Could not open the zip file").

I guess the case may be considered closed (from the Wadpacker standpoint, not from AGK's ) yet I will give answers to all of your questions:

1) This part of folder path: [P"PjP] is probably indeed a conversion mistake. This is not how it is supposed to normally look in proper Cyrillic letters.

2) Yes, "extract.tmp" is there.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Jan 2018 23:30
I'm assuming that the zip portions are a 3rd party library which TGC use for AGK.
If Paul is going to fix this, then I would hope he would add the extra functionality I have previously asked for.

I would say raise a fault case, but I don't know of any formal bug raising process these days, other than post in the release thread and hope it gets seen.

There's a slim possibility of a workaround: if you can use "ExtractZip" to unzip a file in a folder with Cyrillic chars by supplying the full path to the file (rather than the relative path currently used) this may force it to work?
If it does, then i will look at a way to add "force full path" to the library options.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 8th Jan 2018 23:18 Edited at: 8th Jan 2018 23:26
I tried a few tricks to get this to work with no luck.
It does indeed seem that the translation goes bad in the ExtractZip command and no variation of the pathing options we have available can solve it.
Perhaps copying the file to somewhere else may solve it? I'll have a look..

[edit] Copying it somewhere else (for windows) would stop Wadpacker working on other platforms. Same if I used a plugin with my own zip library.

Alex_2015
7
Years of Service
User Offline
Joined: 13th Sep 2017
Location: Somewhere in Putin's Russia
Posted: 11th Jan 2018 18:25
It's sad but I appreciate your efforts anyway!
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 16th Jan 2018 12:05
Hi

I have tried your wadpacker, it's interesting.

I have my own encryption/decryption functions, but the matter is with lots of files, like png.
It's very easy to copy it from the directory when we decrypt it, even with wadpacker.

On windows, I have easily get the png when AGk was loading the images . And it's the same with the other files (ogg...). I think On android it's not as simple, because we have to be rooted, but the guys who want to stole the file are rooted I think ^^.

Do you know how we could use CreateImageFromMemblock() instead of copy the file on the disk and use loadimage() with file copied ?



AGK2 tier1 - http://www.dracaena-studio.com
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 17th Jan 2018 01:40
Hi Blendman,

I think I mentioned in earlier posts we have the options if we only go windows so I could use a 3rd party DLL for in-memory zip functions or Paul extends the options so we can do unzip -> memblock.
I could make a encryption only so no zip and use memblocks for all
or I could make some other simple encryption on top of all this.

The idea was to deter the average hacker and to keep content size down. I could look into further encryption or see if Paul adds the requested features to the zip implementation or I risk making the solution windows only, which is no good.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 17th Jan 2018 01:41
@Alex I raised an issue on the current release thread. I don't know any other way to raise an issue at the moment.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 17th Jan 2018 05:53 Edited at: 17th Jan 2018 05:54
Awesome! You created it. I remember when this came up in another thread and you said you would make such a thing. Looking forward to checking it out tomorrow.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 17th Jan 2018 09:18
Hi Nzo

I think TGC should add a feature like : encrypt/compress the media (in the final export for android and other systems), like the other tools have (unity...).

I have found a solution to use memblock with images, but the matter are :
- the size of the image is multiplied by 10 ! OK we can use Zip, but the final size is bigger (not x10 but x1 .2)
- the time to use the memblock is very long, so for about 200 to 400 images, it will be very long to "uncompress" and create the image with CreateImageFromMemblock. If yo load a game we have to wait 5 to 10 minutes (load the image by memblock), I guess it's too long for players ^^.

AGK2 tier1 - http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-11-23 11:23:55
Your offset time is: 2024-11-23 11:23:55