Prowl icon indicating copy to clipboard operation
Prowl copied to clipboard

[Editor] Docker/container image

Open brmassa opened this issue 1 year ago • 1 comments

Imagine users creating their one games using Prowl and every time they commit, GitHub/GitLab would automatically build the executables for Windows/Mac/Linux. Cool right? It's done using containers.

Tasks:

  • (prerequisite) Implement local build command line from #151
  • certify that, even on Linux, it's possible to build a project to a Windows target
  • add a new GitHub action at .github/workflows to create the containers with tags latest and vX.X,X

IMPORTANT Unlike just building and testing (that are done on every commit), the container creation should be only on main and/or releases. Consider implementing a release routine, even in the "beta" stage.

brmassa avatar Sep 13 '24 08:09 brmassa

When dotnet creates the final executable with dotnet publish, it compiles most of the code to IL but also adds a small bootstrapper that is OS-dependent (Windows, Linux, Mac, OS). So despite the source code being the same, the windows executable will not work on Linux or Mac and vice-versa. That is different from only using dotnet build or dotnet run, that does not create an executable, but only the dll and require the dotnet to bootstrap it.

All container images are Linux based. If one run dotnet publish it will, by default, create a Linux app. There is an argument --runtime (see https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build) to allow compiling a Windows and other plataforms.

It will be even more important when implementing Android and IOS targets, because they will need Native AOT.

brmassa avatar Sep 13 '24 09:09 brmassa