Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all articles
Browse latest Browse all 750

Can Au3Stripper results be further optimized?

$
0
0

I’ve been using the Au3Stripper with great success. But as I bring individual scripts to completion, I’ve noticed what appears to be some excess baggage on board the produced sources. For example:

Global Const $__WINVER = __WINVER() Func __WINVER() Local $tOSVI = DllStructCreate($tagOSVERSIONINFO) DllStructSetData($tOSVI, 1, DllStructGetSize($tOSVI)) Local $aRet = DllCall('kernel32.dll', 'bool', 'GetVersionExW', 'struct*', $tOSVI) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, 0) Return BitOR(BitShift(DllStructGetData($tOSVI, 2), -8), DllStructGetData($tOSVI, 3)) EndFunc

.

An SciTE search of the resulting stripped source shows that $__WINVER isn’t referenced. And I’ve found several other constants that also aren’t referenced. For my finished “production” scripts, I’d like to remove every unused element.

 

So my question is this:

 

Is my best approach to just take the stripped version as a "pre-compile candidate”, then manually tweak it to the minimum—and then save it as my production source before a final compile?

 

Or, is there an easier way to reach the minimum code?

 

BTW, I intend to eventually replace constants with their literal values. But that step needs to be taken carefully ... and I don’t want to do it too soon.  That leaves UDFs and and Au3Stripper-determined "defaults" as the elements to focus on.

 

Thanks in advance for any help.

 

 

Attached Thumbnails

  • Strip Results.png

Viewing all articles
Browse latest Browse all 750

Latest Images

Trending Articles



Latest Images