Can't UPX BMax exe's?

BlitzMax Forums/BlitzMax Programming/Can't UPX BMax exe's?

Gabriel(Posted 2005) [#1]
I've never had a problem UPX'ing B3D exes, but my BMax exe's won't have it. Or more accurately, UPX won't have them. Is there any way around it? I guess it's not too important as the final versions will usually be getting a Software Passport wrap, which won't allow UPX'ing, but it's nice to keep down the size for beta's and demos.


Yan(Posted 2005) [#2]
Hmm...It works okay here using UPX v1.25w (--best).


Robert(Posted 2005) [#3]
UPX seems to work happily on the BlitzMAX executables I have tried it with - what errors are you getting?


TartanTangerine (was Indiepath)(Posted 2005) [#4]
Works for me too.

It's also worth pointing out that you can use UPX with Software Passport. Just make sure you UPX the .exe before you wrap it. We have done this successfully with every release of geom, and in fact the alpha version of caboodle is UPX'd then wrapped, and that's BMAX.


Azathoth(Posted 2005) [#5]
Are you using incbin?


TartanTangerine (was Indiepath)(Posted 2005) [#6]
Yes, we used incbin for the GFX on the Alpha of Caboodle. No issues there.


Gabriel(Posted 2005) [#7]
Yep, I'm using IncBin, but that doesn't seem to be the problem. UPX should be able to compress EXE's with attached resources.

It just complains that the BMax exe is a malformed exe and doesn't compress it. Since I can't Software Passport UPX'ed exe's either, I'm wondering if it's the version of UPX I have that's the problem, since that's the only common factor. In fact.. hmm.. I have 1.24W, so I guess I'll try 1.25W if that's the one you're all using.


TartanTangerine (was Indiepath)(Posted 2005) [#8]
Hmmmn, I got 1.24w and that works okay. I have the latest version of software passport pro as well.

I use these upx settings : upx -9 -o


Gabriel(Posted 2005) [#9]
Those are the same settings I've been using. I've upgraded to 1.25W now and it now compresses BMax exe's without complaining, so that's the original problem solved. If the compressed exe's from 1.25W now work with SP as well, that will be a bonus.


TartanTangerine (was Indiepath)(Posted 2005) [#10]
Good luck. Must be a demo coming soon then :D


Gabriel(Posted 2005) [#11]
Yep. Well two actually. One of our own in the next few days hopefully, and one we're going to be publishing for another Blitz developer a little after that. Just thought it would be a good time to make sure the downloads are as small as they can be.


TartanTangerine (was Indiepath)(Posted 2005) [#12]
OT: Great news, we got two coming soon as well. One is ours and another is a fellow blitzer - great to see biz is working out for us both. Cheers *chink*


Gabriel(Posted 2005) [#13]
Actually on further investigation, I'm gonna have to take it back. BlitzMax occasionally makes an EXE that UPX will compile, but mostly it doesn't. Even with the latest version of UPX, BMax exe's are rarely compliant.


TartanTangerine (was Indiepath)(Posted 2005) [#14]
Thats real odd since I never have a problem UPX'in the .exes


Mark Tiffany(Posted 2005) [#15]
Could it be down to the frameworks / imports / modules each of you are using?


Gabriel(Posted 2005) [#16]
Could it be down to the frameworks / imports / modules each of you are using?


I don't know, I guess so. Having said that, I'm pretty sure I've compiled the same program twice ( albeit with a few changes, but no changes to framework, import, modules ) and had one exe which upx'ed and one which didn't.

But if it's remotely possible, here's my list


Framework brl.d3d7max2d
Import  brl.freeaudioaudio
Import  brl.linkedlist
Import  brl.math
Import  brl.oggloader
Import  brl.pixmap
Import  brl.ramstream
Import  brl.filesystem
Import  brl.random
Import  brl.retro
Import  brl.pngloader
Import  brl.graphics
Import  brl.system
Import  brl.freetypefont