dedmen / ArmaScriptCompiler

GNU General Public License v3.0
27 stars 12 forks source link

Add Linux/GCC compatibility #27

Closed jonpas closed 1 year ago

jonpas commented 1 year ago

Not tested on MSVC at all.

overfl0 commented 1 year ago

Code is using__debugbreak() which is MSVC-specific.

What about using https://github.com/nemequ/portable-snippets/blob/master/debug-trap/debug-trap.h mentioned in https://stackoverflow.com/questions/173618/is-there-a-portable-equivalent-to-debugbreak-debugbreak ?

Or cherry-picking

__asm__ volatile("int $0x03");

from it?

dedmen commented 1 year ago

I use these in most of my newer projects. Could replace the debugbreaks by these helper methods

https://github.com/intercept/interceptAR/blob/master/src/common/util.hpp#L170-L207

lz compression is optional, it can be turned off, though that would make all linux compiled scripts be less size efficient

jonpas commented 1 year ago

Could replace the debugbreaks by these helper methods

Macro-ize and use other method for GCC.

lz compression is optional, it can be turned off

lzokay probably isn't the only library doing this, could be replaced with something else.


Approve workflows so we can see if Windows builds are being broken with this.

jonpas commented 1 year ago

Merging this into https://github.com/dedmen/ArmaScriptCompiler/pull/, ref. https://github.com/Dahlgren/ArmaScriptCompiler/pull/2.