ianfab / fairyground

playground for Fairy-Stockfish in the browser
https://fairyground.vercel.app/
GNU General Public License v3.0
20 stars 5 forks source link

Release maker bug fix & script update #58

Closed yjf2002ghty closed 3 months ago

yjf2002ghty commented 3 months ago

Fixed a bug in index.js and updated scripts so that developers can build on their machine.

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fairyground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 21, 2024 0:53am
yjf2002ghty commented 3 months ago

The macOS build hasn't been tested yet. I will reopen it after finishing the test.

yjf2002ghty commented 3 months ago

Test on macOS has completed. I've also improved the code and documents. All build scripts worked on their platforms. In terms of the executables, I tried to run the executable on a macOS virtual machine, but it is killed on launch due to signature problems (Even pkg no longer gives warnings). The solution for this is to pay ~$100 to get an Apple Developer qualification and sign it with the Apple Developer certificate. But I don't want to pay that. I've pointed out this in the document and warnings in the scripts. If developers want to make a macOS version, they need to be an Apple Developer. I recommend not to release the macOS versions if we cannot find any user who is an Apple Developer. In this case only Windows and Linux versions are released.

@ianfab

ianfab commented 3 months ago

Thanks for looking into it. That sounds reasonable, Windows and Linux should be good enough.

yjf2002ghty commented 3 months ago

If we don't get an Apple Developer qualification, then the only way is to tell mac users to install node.js environment. But we can help them simplify this process, such as putting "node_modules" into the release (probably into an archive as I found that it can reach a compress ratio of 25%, which is 1/4 of original size, by using 7z-LZMA2 algorithms) and making a script that helps them automatically download node executables. The bundle.js can be prebuilt so users don't need to build them again.

The only reason we need this executable is that if we directly open the html file the browser won't load fairy stockfish due to Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy settings, and these settings can be only changed by either a HTTPS server or a HTTP server on localhost.