How can I read the minified script

Get help using Construct 2

Post » Mon Dec 05, 2016 10:09 am

Hello my friends,
My question is, how can I understand what variable/function standing behind minified ones?
I'll explain.
I have the source code, .capx, everything... But when I publish to production, I minify my script for obvious reasons.
Later I'm getting a report that one of the ugly "...nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Cb,Db,Eb,Fb,Gb,Hb..." minified variables/function have a problem.
For example "ab" can't get a value of "null"... I want to understand what "ab" standing for.

@Ashley, Is it possible to get some kind of dictionary when exporting and minifying the script? So later, only I, by having the dictionary, will understand what each minified variable stands for.

If not, I have a request for that feature in Construct2

Please help,
Thank you.
B
60
S
31
G
6
Posts: 124
Reputation: 7,856

Post » Mon Dec 05, 2016 11:05 am

It's deliberately designed to be difficult to reverse-engineer, because lots of users are concerned about people reverse-engineering their work. For diagnostics you probably want to export with minify disabled.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Mon Dec 05, 2016 12:30 pm

Ashley wrote:It's deliberately designed to be difficult to reverse-engineer

Of course it should be un-reverse-engineerable as possible, but I don't want to reverse-engineer. I dont need it, I have the source files.
While exporting I want to get for my self a file that would make sense of the minified script, it should not go to export, probably should be saved in same directory where the .capx file is.

It is a feature for developer maintaining his own code, not for intellectual theft.
B
60
S
31
G
6
Posts: 124
Reputation: 7,856

Post » Mon Dec 05, 2016 12:45 pm

Ashley wrote: For diagnostics you probably want to export with minify disabled.


I did, but I had to go through two hours of work to understand what "Ug"(minified) in the production bug was standing for in the regular code.
Eventualy it was "hasCurrentMatMV", it was "null" probably because someone have problems with GLShaderProgram/shaderProgram, probably bad videocard drivers or no videocard at all.
Should I report a bug on that? That the fall-back did not worked or something...
"hasCurrentMatMV" problem - already mentioned on the forum 10 times, but never solved because no one reported a bug.
B
60
S
31
G
6
Posts: 124
Reputation: 7,856

Post » Mon Dec 05, 2016 12:53 pm

If you can reproduce it then yes please file a bug following all the guidelines to the Bugs forum. If it reproduces in the C2 preview that makes it a lot easier to work with, and disabling minification also makes exported projects easier to work with. If it really is a problem with minification, you can export with minify disabled, and do the minification yourself with Closure Compiler which supports debug mode, source maps, and other diagnostic tools.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Mon Dec 05, 2016 2:12 pm

I can't reproduce it : (
The problem not in the minifier, because people complained on that issue even with minifier turned off: https://www.scirra.com/forum/black-screen-on-chromebook_t179925 It happened on "Samsung Galaxy J3 (2016)" of the player, very low cost phone that tries to look like Samsung Galaxy S6, but lacks the power.
I'm afraid the cause is in Mali-400 or Mali-T720 videocard/drivers, so Construct getting information that the device supports webGL, and failing in the process, with no fallback.
B
60
S
31
G
6
Posts: 124
Reputation: 7,856


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], ivanski1983 and 13 guests

cron