TheQwertiest / foo_spider_monkey_panel

foobar2000 component that allows to use JavaScript to create CUI/DUI panels
https://theqwertiest.github.io/foo_spider_monkey_panel/
MIT License
274 stars 21 forks source link

Where did build instructions for mozjs using MSVC++ go? #182

Closed AudriusButkevicius closed 2 years ago

AudriusButkevicius commented 2 years ago

Stackoverflow post links here, but wiki is gone.

And the project page now talks about clang.

TheQwertiest commented 2 years ago

Newer mozjs can't be built with MSVC anymore and can only be built using clang.

The build process for esr68 is described here (it might be outdated though): https://theqwertiest.github.io/foo_spider_monkey_panel/docs/for_developers/building_spidermonkey/

There are no instructions for esr91 yet, but the build process can be reproduced with the following script: https://bitbucket.org/TheQwertiest/mozjs/src/master/build_scripts/setup.py The script is quite messy, but it does the job :)

AudriusButkevicius commented 2 years ago

I'm confused as the es68 build instructions talk about llvm, so I assumed its not usable with msvc.

Re esr91, is that the last version still buildable with msvc? Or is that version used in this project that uses clang?

TheQwertiest commented 2 years ago

To clarify:

About clang:

AudriusButkevicius commented 2 years ago

Sorry, I know my question is very unclear.

Effectively I am after the latest version I can build using msvc (the compiler), as I want to produce a static lib I can link against in my project that uses a recent toolchain, hence I need to build mozjs using a recent toolchain, because seems I can't statically link objects produced by a different toolchain (clang) or even different versioned (v140 vs v142) toolchain.

I know a dll would make it easier, but that sadly doesm't work in my case :(.

I take it last possible version is esr52 and the instructions are as per the link above.

TheQwertiest commented 2 years ago

Tbh, I'm not sure if mozjs could be embedded statically at all (I've never tried it). But yes, your best would be to try esr 52.

and the instructions are as per the link above.

Instructions above were only tested on esr68, so I'm not sure if it's applicable to esr52. Additionally, you might need to use some of the older versions of MozillaBuild, since the latest one was not compatible even with ESR68.

TheQwertiest commented 2 years ago

Oh, and I've found my old instructions for esr60: https://github.com/TheQwertiest/foo_spider_monkey_panel/blob/60cf366fc2437c2ddd0c4f5ac6adc6e227b35f7e/docs/for_developers/building_spidermonkey.md

AudriusButkevicius commented 2 years ago

Any clue/recollection of versions of mozbuild for 60? So far that seems to be the biggest sticking point for me.

Also, instructions above suggest esr60 is possible?

Sorry. i know this is turning into a trivia, I'm know its not related to your project, but I suspect the only person on the internet that knows about this 🤣

TheQwertiest commented 2 years ago

Any clue/recollection of versions of mozbuild for 60?

No, sorry. You could try searching and comparing the release dates for esr and mozbuild

Also, instructions above suggest esr60 is possible?

Yea, it seems, that I've built esr60 with msvc as well

AudriusButkevicius commented 2 years ago

Thanks for all the info.