MiKl Posted March 24, 2014 Posted March 24, 2014 Hi Loblo, can you explain the process a little bit more in detail, perhaps with VLC 2.13 as an example ?? Thx, MiKl
loblo Posted March 24, 2014 Posted March 24, 2014 You can still get it here: http://www.sosej.cz/Software/Kompresni-nastroje/Upxfrontend/ (wasn't easy to find as it's quite old and homepage is gone). You don't need to use this one particularly btw, Guipex and probably many others would be just as convenient, I just happen to use this one most often out of habit.
DougB Posted March 27, 2014 Posted March 27, 2014 @loblo: Hey, thanks for the tip! I think i might need some clarification too. > try compressing them and the bundled dlls with UPX with the> strip or copy overlay option enabled.According to the UPX documentation, --overlay=copy *is* the default. The documentation also says that --overlay=strip is "DANGEROUS" (their capitalization). It says: "Be warned, this may make the compressed program crash or otherwise unusable." Anyway, i tried your suggestion using the latest Windows UPX (v3.91 CLI) on these programs:1) latest generic MPlayer.exe (svn36986) from Sherpya: http://oss.netfarm.it/mplayer-win32.php2) the same from RedXii: http://code.google.com/p/mplayer-for-windows/3) latest VLC Media Player (v2.1.3): http://download.videolan.org/pub/videolan/vlc/Lo and behold... it worked for both of the MPlayer builds! Interestingly, i only used the UPX defaults (no command-line switches). But UPX compression didn't work for VLC. After UPXing, it did make it past it's own DLLs (which crashed in the original versions), but then it choked on a system DLL: VLC caused an invalid page fault in module KERNEL32.DLLThen i re-tried it (on fresh copies of VLC binaries of course), using the command switches shown in your screen capture... same result. I also tried it with the previously-mentioned --overlay=strip switch, but it just crashed immediately. So maybe we're part way there.... This is an intriguing workaround. - Doug B.
loblo Posted March 27, 2014 Posted March 27, 2014 (edited) Doug, your observations about the copy overlay switch appear to be accurate, thanks the correction.As for VLC, I also compress the integrality of the plugins, if I only compress files in the root folder it crashes in Kernel32 for me too.In case this still would not work, I checked the UPX cli version I am using with the frontend and it's 3.07. VLC is in KernelEx default compatibility mode.And yes this is intriguing, I don't know why it works but it does (on most newer gcc compiled executable files apparently) which is very cool. Edited March 27, 2014 by loblo
DougB Posted March 30, 2014 Posted March 30, 2014 Well, i'll be a... CONFIRMED! VLC v2.1.3 loads (and plays) using the UPX workaround. And i *did* have to compress the plugins to get it to fly. (Which would have been a tedious task were it not for 4-DOS's GLOBAL (internal) command -- it runs a given command in the current directory/folder and all subdirectories/subfolders.) But again, all i needed to use were the UPX defaults -- no switches. (Well, ok... i admit i did use the --best switch.) Hats off to loblo for discovering this "magical" solution! Maybe we should call it the "Loblo Compression Fix" (LCF)?" - Doug B.P.S. Here's the UPX (Ultimate Packer for eXecutables) homepage: http://upx.sourceforge.net/
loblo Posted March 30, 2014 Posted March 30, 2014 (edited) Hats off to loblo for discovering this "magical" solution! Maybe we should call it the "Loblo Compression Fix" (LCF)?" Thanks but let's rather call it the UPX fix and it would be nice if somebody could figure out why it works as there is certainly nothing "magic" about it. Edited March 30, 2014 by loblo
Flasche Posted March 30, 2014 Posted March 30, 2014 Hats off to loblo for discovering this "magical" solution! Maybe we should call it the "Loblo Compression Fix" (LCF)?" Thanks but let's rather call it the UPX fix and it would be nice if somebody could figure out why it works as there is certainly nothing "magic" about it.Good job loblo posted a link to your first post to the solution in the Vlc forums. 1
MiKl Posted March 30, 2014 Posted March 30, 2014 Simply amazing - thanks Loblo !!!!!DougB, vlc works here too. But did you also received an 'error' message from UPX on some of the dll's ?? Just to make sure that I did everything 'completely' right.
DougB Posted March 31, 2014 Posted March 31, 2014 @loblo:> Thanks but let's rather call it the UPX fixOf course. I was just trying to be a little light -- i was happy! > and it would be nice if somebody could figure out why it worksAgreed. > as there is certainly nothing "magic" about it.Again, i was just having fun (note the quotes). Something unexplained might appear as "magic"... until it is understood. @Mikl:> But did you also received an 'error' message from UPX on some of the dll's ??Yes, i did get some error messages from UPX. The messages flew by pretty quickly (i did it from the command line, and didn't bother to redirect output to a file), but i did notice that it said that some of the files were non-compressable. In that case, UPX just leaves them alone -- it doesn't change them. If your VLC is working, then it seems like you're good to go! - Doug B.
loblo Posted March 31, 2014 Posted March 31, 2014 All files get compressed here using the frontend with UPX 3.07 and also with UPX 3.91 which I have updated to make sure it was not down to UPX version. Be aware that a plugin that does not get compressed might very well mean here that it won't load and hence some loss of functionality. I suggest you try to use UPX settings as per my screenshot above and see if it performs differently/better.
DougB Posted April 3, 2014 Posted April 3, 2014 Ok, i did a new UPX compression right after a fresh bootup of Windows and found that loblo was correct -- all the DLL and EXE files did compress ok. I also tried compressing them 5 different ways (each on fresh copies of the VLC binaries, of course). All produced working VLCs (in limited testing -- playing a few video files of differing formats and a DVD), Here are the command-line switches that i tried: UPX UPX -1 UPX --best UPX --lzma UPX --lzma --bestOut of curiosity, i compared size of the plugins folder for each. As expected, -1 produced the largest files, no-switch was next largest. But surprisingly (to me anyway), the LZMA-compressed binaries were (in total) smaller than --best (almost 2.2mb less). However, between them, the best individual-file compression method varied between DLLs -- for some --best was better, for others --lzma was better. Finally, just for larfs, i did a combination of --lzma --best, but that only diminished total file size by about 270k over --lzma alone. I think what might have happened regarding my previous post is that i ran un-compressed VLC first (which crashed), then tried compressing the binaries, but some DLLs might have still been in memory, so their files wouldn't compress. Just a guess. Whatever, the good news is that this method works! Now... let's figure out why? - Doug B.
dencorso Posted April 3, 2014 Posted April 3, 2014 Just to make sure I'm understanding what you're doing: you're compressing each file independently, right?Or are you making a monolithic upx containing all those files (that is, in case that is even possible).Glad to have you back, loblo!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now