Compiling Serpent with official branding

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Compiling Serpent with official branding

Unread post by artenaki » 2023-05-25, 08:17

Hello.
I would like to compile Serpent with official branding. I like the lizard. I can't use the official builds because I use Linux i386. Also, I would like to enable webextensions and GTK2, disable pulseaudio. I already built myself a Serpent, but it is without official branding.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: Compiling Serpent with official branding

Unread post by moonbat » 2023-05-25, 10:45

artenaki wrote:
2023-05-25, 08:17
I would like to enable webextensions
What limited support there used to be either doesn't exist anymore in the codebase or is already years obsolete from what Google pushes now, so it's not going to work anyway.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 782
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: Compiling Serpent with official branding

Unread post by jobbautista9 » 2023-05-25, 11:08

artenaki wrote:
2023-05-25, 08:17
Linux i386
artenaki wrote:
2023-05-25, 08:17
enable webextensions
artenaki wrote:
2023-05-25, 08:17
GTK2
artenaki wrote:
2023-05-25, 08:17
disable pulseaudio
You will never be given permission to use official branding with these modifications.
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-25, 11:28

I have one old webextension (from the days of Firefox 60) - GoogleTranslate@google.com.xpi. I once installed it in Serpent for XP and it worked. But I don't use Win/XP, it was just an experiment.

Getting back to the topic, I'd like access to a private repository with branding. Although, I already replaced omni.ja in the final build and Serpent became almost like Basilisk, but that's not a good way.
jobbautista9 wrote:
2023-05-25, 11:08
You will never be given permission to use official branding with these modifications
But I'm not going to publish these build, it's just for me.
I already use the official branding. But it's a dirty way.
I don't distribute this build because it's not allowed, I respect you.

Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Compiling Serpent with official branding

Unread post by Moonchild » 2023-05-25, 12:37

I can't speak for basilisk-dev of course but in general, building for private use with official branding is generally OK no matter how much you change the software (FOSS being free as in freedom and all that). I don't know if the Basilisk repo includes official branding or not but if not then you are pretty much on your own replacing the branding assets with what you prefer.

As an aside, if you make a custom build you should also add --disable-updater to your config.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

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

Re: Compiling Serpent with official branding

Unread post by Basilisk-Dev » 2023-05-25, 13:32

jobbautista9 wrote:
2023-05-25, 11:08
You will never be given permission to use official branding with these modifications.
I don't think any of those configuration options are bad. If they were doing something like patching in system library support or something like that I'd refuse, but these specific changes are fine.
artenaki wrote:
2023-05-25, 08:17
I would like to compile Serpent with official branding. I like the lizard. I can't use the official builds because I use Linux i386. Also, I would like to enable webextensions and GTK2, disable pulseaudio. I already built myself a Serpent, but it is without official branding.
Can you post your mozconfig?

I'll give you access under the following conditions:
* Don't distribute your builds to anyone else
* Don't give anyone else access to the official branding repo or to the files in the repo
* Don't come to this forum asking for support unless you verify that any bugs you are experiencing also occur on the official builds
* Don't package Basilisk with official branding enabled in any Linux packaging formats (.deb, .rpm, flatpak, etc) without confirming with me first

Also to be clear, Basilisk does not officially support GTK2 and is not tested with GTK2. If there are any user interface issues with the GTK2 builds you're on your own to fix those.

Does anyone know if WebRTC works with ALSA? From what I recall from using Firefox around the 52.x release it had to be compiled with Pulseaudio for WebRTC to work.
artenaki wrote:
2023-05-25, 08:17
Also, I would like to enable webextensions
This is not possible anymore. Support for WebExtensions was completely removed before I took over the project and we don't have any plans on reinstating that support.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-25, 16:28

I used mozconfig from AUR with some modifications.
My last build was with this mozconfig:

Code: Select all

# Comment/uncomment build flags as needed

ac_add_options --enable-release
#ac_add_options --enable-official-branding
#export MOZILLA_OFFICIAL=1
#export MOZ_DATA_REPORTING=0
#export MOZ_TELEMETRY_REPORTING=0
#export MOZ_SERVICES_HEALTHREPORT=0
_BUILD_64=0

ac_add_options --target=i386-linux-gnu
ac_add_options --with-arch=i386
ac_add_options --enable-application=basilisk
ac_add_options --enable-private-build
ac_add_options --prefix=/sec/root/basilisk-mybuild32
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-gold
ac_add_options --enable-pie
ac_add_options --enable-jemalloc
#ac_add_options --enable-replace-malloc
ac_add_options --with-pthreads
ac_add_options --enable-optimize="-O2 -march=i386 -msse -msse2 -mmmx -mfpmath=sse"
ac_add_options --enable-default-toolkit=cairo-gtk2

ac_add_options --enable-alsa
ac_add_options --enable-devtools
ac_add_options --enable-eme
#ac_add_options --enable-webrtc
#ac_add_options --enable-av1
#ac_add_options --enable-gamepad

ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --disable-dbus
ac_add_options --disable-gconf
ac_add_options --disable-gio
ac_add_options --disable-necko-wifi
ac_add_options --disable-startup-notification
ac_add_options --disable-updater
ac_add_options --disable-maintenance-service

#ac_add_options --disable-stylo
#ac_add_options --disable-servo
#ac_add_options --disable-webextensions
#ac_add_options --disable-parental-controls
#ac_add_options --disable-accessibility
#ac_add_options --disable-safe-browsing
#ac_add_options --disable-sync
#ac_add_options --disable-webspeech
#ac_add_options --disable-webspeechtestbackend
#ac_add_options --disable-synth-speechd
#ac_add_options --disable-synth-pico
#ac_add_options --disable-b2g-camera
#ac_add_options --disable-b2g-ril
#ac_add_options --disable-b2g-bt
#ac_add_options --disable-mozril-geoloc
#ac_add_options --disable-nfc
#ac_add_options --disable-url-classifier
#ac_add_options --disable-userinfo
ac_add_options --disable-pulseaudio
ac_add_options --disable-jack
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad

mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options PYTHON=/sec/root/python2/bin/python2
For the build I use a server with the parameters:
Intel(R) Xeon(R) CPU E5-2650L v4 @ 1.70GHz
14 cores 28 threads
126 GB RAM
swap 256 GB
SSD 16 GB
Debian x86_64
But not all RAM belongs to me, I think maybe 4-6 GB. I don't know exactly, but I haven't encountered problems with memory shortage when compiling Basilisk (unlike Servo browser, by the way).

The commands for cross compilation I used are the following:

Code: Select all

mkdir -p basilisk-build
cd basilisk-build
aria2c https://repo.palemoon.org/Basilisk-Dev/Basilisk/archive/v2023.05.17.tar.gz
aria2c https://repo.palemoon.org/MoonchildProductions/UXP/archive/RB_20230515.tar.gz
tar -xf Basilisk-v2023.05.17.tar.gz
tar -xf UXP-RB_20230515.tar.gz
rm Basilisk-v2023.05.17.tar.gz UXP-RB_20230515.tar.gz
rm -rd basilisk/platform
mv -T uxp basilisk/platform
cd basilisk
cp /sec/root/mozconfig /sec/root/basilisk-build/basilisk/.mozconfig

cd /sec/root/basilisk-build/basilisk
nano .mozconfig
export TMPDIR=/sec/root/tmp
dpkg --add-architecture i386
apt update
apt install autoconf2.13 pkg-config unzip zip yasm nasm lsb-release alsa-utils fonts-dejavu-core \
gcc g++ make build-essential patch binutils libtool automake gettext mesa-utils p7zip

apt install linux-libc-dev:i386 libgcc-12-dev:i386 libc6-dev:i386 libgcc-12-dev-i386-cross libstdc++6:i386 \
libstdc++6-i386-cross libc6-dev-i386-cross

apt install libasound2-dev:i386 libdbus-1-dev:i386 libdbus-glib-1-dev:i386 libfontconfig1-dev:i386 \
libfreetype-dev:i386 libgconf2-dev:i386 libgtk2.0-dev:i386 libgtk-3-dev:i386 libpulse-dev:i386 \
libx11-xcb-dev:i386 libxt-dev:i386 mesa-common-dev:i386 libavcodec-dev:i386 libavutil-dev:i386 \
libavformat-dev:i386 libavfilter-dev:i386 libavdevice-dev:i386 libegl1-mesa-dev:i386 libgl1-mesa-dev:i386 \
libgles2-mesa-dev:i386 libglu1-mesa-dev:i386 zlib1g-dev:i386 libssl-dev:i386 libsqlite3-dev:i386 \
libbz2-dev:i386 libhunspell-dev:i386 libpng-dev:i386 libaom-dev:i386 libdav1d-dev:i386 libcairo2-dev:i386 \
libjemalloc-dev:i386 libnspr4-dev:i386 libnss3-dev:i386 libreadline-dev:i386 liblzma-dev:i386 \
libpango1.0-dev:i386

export PATH=/sec/root/python2/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib/i386-linux-gnu:$LD_LIBRARY_PATH
export CPATH=/usr/include/i386-linux-gnu:$CPATH
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
./mach build
./mach install
./mach package

cp /sec/root/basilisk-build/basilisk/obj-i386-linux-gnu/dist/basilisk-20230523193419.linux-i386.tar.xz \
/sec/root/basilisk-20230523.linux-i386.tar.xz
/sec/root/ is the home folder
It takes about 5-6 hours on one thread.

python 2 is self-builded. It is actually in the repository, but I decided to compile it myself. I installed pip2 and dbus-python from pip because this dependency is listed in the AUR.
But it seems that dbus is only needed for build notifications, which are not sent if the x11 server is not running.

I have little experience with compiling browsers, so some commands and options may not be effective.

Since you say that webextensions don't work, ok. I will not compile with it. I also don't need webrtc.
I promise not to publish builds and repository data anywhere.

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

Re: Compiling Serpent with official branding

Unread post by Basilisk-Dev » 2023-05-26, 02:18

artenaki wrote:
2023-05-25, 16:28
I used mozconfig from AUR with some modifications.
My last build was with this mozconfig:

Code: Select all

# Comment/uncomment build flags as needed

ac_add_options --enable-release
#ac_add_options --enable-official-branding
#export MOZILLA_OFFICIAL=1
#export MOZ_DATA_REPORTING=0
#export MOZ_TELEMETRY_REPORTING=0
#export MOZ_SERVICES_HEALTHREPORT=0
_BUILD_64=0

ac_add_options --target=i386-linux-gnu
ac_add_options --with-arch=i386
ac_add_options --enable-application=basilisk
ac_add_options --enable-private-build
ac_add_options --prefix=/sec/root/basilisk-mybuild32
ac_add_options --enable-strip
ac_add_options --enable-install-strip
ac_add_options --enable-gold
ac_add_options --enable-pie
ac_add_options --enable-jemalloc
#ac_add_options --enable-replace-malloc
ac_add_options --with-pthreads
ac_add_options --enable-optimize="-O2 -march=i386 -msse -msse2 -mmmx -mfpmath=sse"
ac_add_options --enable-default-toolkit=cairo-gtk2

ac_add_options --enable-alsa
ac_add_options --enable-devtools
ac_add_options --enable-eme
#ac_add_options --enable-webrtc
#ac_add_options --enable-av1
#ac_add_options --enable-gamepad

ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-debug-symbols
ac_add_options --disable-tests
ac_add_options --disable-dbus
ac_add_options --disable-gconf
ac_add_options --disable-gio
ac_add_options --disable-necko-wifi
ac_add_options --disable-startup-notification
ac_add_options --disable-updater
ac_add_options --disable-maintenance-service

#ac_add_options --disable-stylo
#ac_add_options --disable-servo
#ac_add_options --disable-webextensions
#ac_add_options --disable-parental-controls
#ac_add_options --disable-accessibility
#ac_add_options --disable-safe-browsing
#ac_add_options --disable-sync
#ac_add_options --disable-webspeech
#ac_add_options --disable-webspeechtestbackend
#ac_add_options --disable-synth-speechd
#ac_add_options --disable-synth-pico
#ac_add_options --disable-b2g-camera
#ac_add_options --disable-b2g-ril
#ac_add_options --disable-b2g-bt
#ac_add_options --disable-mozril-geoloc
#ac_add_options --disable-nfc
#ac_add_options --disable-url-classifier
#ac_add_options --disable-userinfo
ac_add_options --disable-pulseaudio
ac_add_options --disable-jack
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad

mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options PYTHON=/sec/root/python2/bin/python2
That's a very verbose mozconfig. A lot of those options aren't needed.

What's your repo username? I searched for artenaki but couldn't find it
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-26, 05:47

Basilisk-Dev wrote:
2023-05-26, 02:18
What's your repo username? I searched for artenaki but couldn't find it
My profile is now artenaki
I registered it a few minutes ago.
Basilisk-Dev wrote:
2023-05-26, 02:18
That's a very verbose mozconfig. A lot of those options aren't needed.
I will be glad if you show me the recommended settings, taking into account my wishes.
Especially the --enable-optimize option. Maybe I should replace i386 with i686 and add -msse3 since it's a personal build?
Because of my deteriorating vision, maybe I could use --enable-accessibility --enable-webspeech --enable-synth-...
I would also like to use --enable-servo and somehow disable captive portal.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Compiling Serpent with official branding

Unread post by Moonchild » 2023-05-26, 08:32

artenaki wrote:
2023-05-26, 05:47
Maybe I should replace i386 with i686 and add -msse3 since it's a personal build?
You should probably use -march=native if it's for the machine you're building on :) That way it will use the instruction sets your CPU supports.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-26, 09:19

Moonchild
I read that I need to use i386. I don't want AVX instructions...

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-26, 13:33

Guys, I don't need any more access. I've decided that I'm fine with the current build. Thank you for your help.

Best the enemy of the good.

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-27, 12:14

Nevertheless, thanks for the access. So I will experiment some more. Am I correct in assuming that I should use something like:

Code: Select all

ac_add_options --enable-official-branding
ac_add_options --disable-private-build
ac_add_options --with-branding=/sec/root/basilisk-official-branding
?

If I specify --disable-debug-js-modules the web inspector will not work (I will not be able to see the sites code)? I'm interested in the Inspector tab, not the Console tab.

UPD: I'm getting errors. I won't try again.

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-28, 16:47

I compiled with --enable-webextensions, but there is really no support for webextensions, these extensions cannot be installed (unlike Serpent 52 from roytam).

Important information: I highly recommend not to replace omni.ja. It will significantly change behavior of the browser, can break the browser and even the profile.
Changing behavior when hacking omni.ja replacement (besides changing the design):
Auto-update will be enabled (even if it's disabled at compile time), user agent changes, information in About, about:support and about:buildconfig changes (will not be true).
Possible breakdowns:
Some settings may stop opening.

Use built-in branding, even if it is terrible.
I decided to use Serpent branding because although I got access to a private repository with official branding, I was not told how to use files from it when compiling.

This is my post as a warning to those who will read it: don't change omni.ja in a hacker way.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: Compiling Serpent with official branding

Unread post by moonbat » 2023-05-28, 23:53

artenaki wrote:
2023-05-28, 16:47
don't change omni.ja in a hacker way.
Off-topic:
Heh. that reminds me - once some genius showed up here asking about how to extract from omni.ja (he wasnt' even trying to build PM the way you're doing with Basilisk) - and left in a huff after Moonchild said there was no obligation to reveal how the file was packed, since it can't be parsed as a zip anymore.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

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

Re: Compiling Serpent with official branding

Unread post by Basilisk-Dev » 2023-05-29, 21:18

artenaki wrote:
2023-05-28, 16:47
Use built-in branding, even if it is terrible.
I decided to use Serpent branding because although I got access to a private repository with official branding, I was not told how to use files from it when compiling.
Yeah the Serpent branding is ugly. That's something I've been planning to replace. Roytam1 decided to use it for his Windows XP fork (but didn't bother to change the exexutable name so it still compiles to basilisk.exe??????) and I want to avoid confusion between the two projects for people who use unofficial branding.
artenaki wrote:
2023-05-28, 16:47
I compiled with --enable-webextensions, but there is really no support for webextensions, these extensions cannot be installed (unlike Serpent 52 from roytam).
Correct, as mentioned already in this thread webextensions do not work with our codebase in any way.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35473
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Compiling Serpent with official branding

Unread post by Moonchild » 2023-05-29, 21:38

Basilisk-Dev wrote:
2023-05-29, 21:18
Yeah the Serpent branding is ugly.
It was literally thrown together in 5 minutes XD
Basilisk-Dev wrote:
2023-05-29, 21:18
Roytam1 decided to use it for his Windows XP fork (but didn't bother to change the exexutable name so it still compiles to basilisk.exe??????) and I want to avoid confusion between the two projects for people who use unofficial branding.
Welcome to my first hand experience of someone not bothering to use their own branding but using New Moon instead (the "nightly" branding) :P
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
artenaki
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-05-24, 10:12

Re: Compiling Serpent with official branding

Unread post by artenaki » 2023-05-30, 11:40

About subjective philosophical tastes of branding:
Official branding is more elaborate and higher quality, of course. But note that the lizard has a rather immodest look. A little arrogant. Although, perhaps all lizards look like this.
But maybe you could make it more soulful and kind in Serpent?
By the way, Mozilla also changed the Thunderbird logo. And now the good bird looks evil.

Locked