Easy Linux/Docker Build Script

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

User avatar
Basilisk-Dev
Lunatic
Lunatic
Posts: 323
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Easy Linux/Docker Build Script

Unread post by Basilisk-Dev » 2023-08-24, 14:29

Over the past few days I've been working on a way for people who are not developers or are not familiar with the Basilisk build process and the mach build system to easily compile Linux builds of Basilisk on their own.

I wrote a shell script that itself runs a shell script inside of a Docker container. This second shell script that runs inside of the container builds Basilisk in the Linux system inside the container. It shares the host Basilisk directory with the container so the build inside the container will appear on your host filesystem.

If you have a mozconfig already it uses your mozconfig. If you do not have a mozconfig then it provides you with a mozconfig based on the Basilisk release mozconfig with changes to use unofficial branding and disable autoupdates.

The builds generated by this script are built on Slackware 14.2 with GCC 9.2. Most Linux distro versions released since mid-2016 should be able to run builds generated by this script provided that their glibc package is new enough.

I've also created a Wiki on the Basilisk repo and documented the operation of the shell script. If you would like to try it please see the documentation for more information.

Currently this script is x86_64 only.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Easy Linux/Docker Build Script

Unread post by athenian200 » 2023-08-24, 22:15

I'm pretty impressed with your build script. I've thought about creating something like that before, but the issue for me is I'd want to be able to do it cross-platform and not just for Linux. Though I will admit, Linux is much more friendly to compiling custom stuff out of the box.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Basilisk-Dev
Lunatic
Lunatic
Posts: 323
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: Easy Linux/Docker Build Script

Unread post by Basilisk-Dev » 2023-08-25, 14:15

athenian200 wrote:
2023-08-24, 22:15
I'm pretty impressed with your build script. I've thought about creating something like that before, but the issue for me is I'd want to be able to do it cross-platform and not just for Linux. Though I will admit, Linux is much more friendly to compiling custom stuff out of the box.
That's a concern I had as well. I looked into automating a Windows setup on a Windows desktop and I don't think it's possible in an elegant way that doesn't fill the user's system up with a bunch of developer tools. I'm also not sure if it's possible to automate the installation of Visual Studio.

Windows Server does support Windows running inside of containers similar to Docker but most users would be using Windows Desktop, not Server.

I suppose I could write a shell script that is ran in the MozillaBuild Bash shell, but if the user is at the point that they have all the other dependencies setup then at that point all that would be left is to copy a mozconfig in place and run mach build.

I do think it's possible to automate Windows builds in GitHub actions since the GitHub Actions runners include Visual Studio. I am planning to try to implement that soon.

For SunOS and FreeBSD I could create a Solaris Zone/FreeBSD Jail and automate the configuration inside of that Jail/Zone, but I don't use either of those OS and don't want to write a script that might break at some point in the future if I am not actively testing it and verifying it works.

For MacOS I have no clue. I don't have any hardware to test with and have no clue how to build UXP applications (or any other applications) on that OS.
Basilisk Project Owner

viewtopic.php?f=61&p=230756