building basilisk & rebranding for Windows

Forum for discussions around the Basilisk web browser.

Moderator: satrow

KingsMan
Apollo supporter
Apollo supporter
Posts: 35
Joined: Sun, 13 Aug 2017, 07:05

building basilisk & rebranding for Windows

Postby KingsMan » Sun, 26 Nov 2017, 14:32

How to build basilisk and how can I rebrand it ? I will give credit to moonchild production and submit my improvement patches to team.
My current target is Windows.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: building basilisk & rebranding for Windows

Postby Moonchild » Mon, 27 Nov 2017, 07:25

I haven't had time to write a proper build guide for Basilisk yet, but the basics are as follows:

  1. Install Visual Studio 2015 Update 3, the default installation should work fine.
    Warning: current version is now Visual Studio 2017, so to get exactly the 2015 update 3 version with the link above, you need to go to the "Download" section, then choose "Visual Studio Community 2015 with Update 3" and then download it.
  2. After installation, be sure to launch Visual Studio 2015 from the GUI to complete the first time run procedure to associate this installation with an account. Otherwise, you will be running an evaluation version which will not properly update via Windows Update.
  3. Next, you need to download and install the Cumulative Servicing Release for Microsoft Visual Studio 2015 Update 3 (KB3165756).
  4. Download the MozillaBuild Package from Mozilla v2.2 (2.1 should also work, 3.x might not, untested!). Accept the default settings, in particular the default installation directory; if you install these tools in a different folder than the default, make absolutely sure there are NO SPACES in the folder name since the toolchain doesn't like that. On some versions of Windows an error dialog will give you the option to ‘reinstall with the correct settings’ - you should agree and proceed.
  5. Get the source: either use git or sourcetree to check out the source from github, or download and extract a source archive. Once again, use paths to the source that contain NO SPACES in the name.
  6. Create a mozconfig.txt file (plain text file). To get similar-to-official builds, use the following as a template. DO NOT add all sorts of extra options or parameters to this file that some people have posted on the net. Less is more!

    Code: Select all

    mk_add_options AUTOCLOBBER=1
    ac_add_options --enable-application=browser
    ac_add_options --enable-optimize="-O2 -GS-"

    # Set up the basilisk extension app version
    export BASILISK_VERSION=1

    ac_add_options --disable-crashreporter

    # Disable the updater unless you have set up the infra and preferences for it correctly!
    ac_add_options --disable-updater

    # Disable add-ons signing
    # Disable checking that add-ons are signed by the trusted root
    MOZ_ADDON_SIGNING=
    # Disable enforcing that add-ons are signed by the trusted root
    MOZ_REQUIRE_SIGNING=
    ac_add_options --disable-tests
    ac_add_options --enable-jemalloc
    ac_add_options --disable-debug
    ac_add_options --enable-strip

    # Disable telemetry reporting
    export MOZ_TELEMETRY_REPORTING=

    WIN32_REDIST_DIR=$VCINSTALLDIR/redist/x86/Microsoft.VC140.CRT
    WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs/x86"
  7. Copy this file to the root of your Basilisk source tree (where you ran git to grab the source or unpacked it from the archive) as .mozconfig -- note the leading dot. (it should go in the same location where the AUTHORS file is)
    Alternatively, you can export MOZCONFIG=path/to/mozconfig.txt after you've started the shell (next point) before issuing mach commands.
  8. To build, run start-shell-msvc2015.bat in the mozillabuild install folder. In the command-line you get, change to the folder where your source is (use forward slashes and unix-style paths -- tab completion of paths works, e.g. "cd /c/basilisk-source/") and then issue "mach build"
  9. Go have some coffee while it builds.

Re-branding is done by copying the browser/branding/official assets to a new browser/branding/mybranding folder in the source tree, making sure to re-brand all the official names and graphics in there (be thorough!) and adding a line to mozconfig.txt pointing to that branding folder:

Code: Select all

ac_add_options --with-branding=browser/branding/mybranding

Alternatively, you can start from the browser/branding/unofficial branding assets to be safe.
Last edited by Moonchild on Sun, 11 Mar 2018, 07:09, edited 1 time in total.
Reason: mozconfig.txt -> .mozconfig
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

GMforker
Lunatic
Lunatic
Posts: 497
Joined: Thu, 27 Aug 2015, 06:29
Location: Czech Republic

Re: building basilisk & rebranding for Windows

Postby GMforker » Mon, 27 Nov 2017, 12:06

IMHO: I use MozillaBuild version 3.0 from the beginning. It should work.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: building basilisk & rebranding for Windows

Postby Moonchild » Mon, 27 Nov 2017, 12:40

GMforker wrote:IMHO: I use MozillaBuild version 3.0 from the beginning. It should work.

Good to know!
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1265
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: building basilisk & rebranding for Windows

Postby JustOff » Mon, 27 Nov 2017, 13:01

Btw, as for "-GS-" optimize option, for me this leads to a huge number of warnings that it will be ignored. Is it expected?
Here are the add-ons I made in a spare time. That was fun!

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: building basilisk & rebranding for Windows

Postby Moonchild » Mon, 27 Nov 2017, 16:22

JustOff wrote:Btw, as for "-GS-" optimize option, for me this leads to a huge number of warnings that it will be ignored. Is it expected?

Yes, some parts of the code base enforce -GS at all times, and will emit the override warnings. You can leave it out if you want, but it's a basic performance optimization that will gain you a not-too-shabby 5% or so performance increase.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

KingsMan
Apollo supporter
Apollo supporter
Posts: 35
Joined: Sun, 13 Aug 2017, 07:05

Re: building basilisk & rebranding for Windows

Postby KingsMan » Tue, 28 Nov 2017, 08:38

Thanks for your kind reply Mr Moonchild .
It is really helpful.

User avatar
Fedor2
Lunatic
Lunatic
Posts: 476
Joined: Mon, 11 Apr 2016, 01:26

Re: building basilisk & rebranding for Windows

Postby Fedor2 » Tue, 01 May 2018, 14:20

Have built my first basiliks too, with mozilla-build 3.1.1, and without visual studio. This is such a solution. For a long time Microsoft did not make good things. But finally they released EWDK with Visual Studio Build Tools 15.6
direct link

It is no need to install any junk to the system, unpack or just mount, however mozilla-build do not accept that, so you are to craft special bat for it instead of the start-shell-msvc2015.bat

Example:

Code: Select all

@ECHO OFF

SET MOZ_MSVCBITS=32
SET MOZ_MSVCVERSION=14
SET MOZ_MSVCYEAR=2015
SET VCDIR=C:\DEV\MSVC14\
SET TOOLCHAIN=32-bit

SET MOZILLABUILD=%~dp0

SET VSINSTALLDIR=C:\DEV\MSVC14\
SET VCINSTALLDIR=C:\DEV\MSVC14\
SET FrameworkDir32=C:\Windows\Microsoft.NET\Framework\
SET FrameworkVersion32=v4.0.30319
SET Framework40Version=v4.0.30319
SET UCRTVersion=10.0.14393.0
SET WindowsSDKLibVersion=10.0.14393.0\

SET INCLUDE=C:\Dev\MSVC14\include;C:\Dev\MSVC14\atlmfc\include;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;C:\Program Files (x86)\Windows Kits\8.1\include\include\ucrt;
SET LIB=C:\Dev\MSVC14\lib\x86;C:\Dev\MSVC14\atlmfc\lib\x86;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\ucrt\x86;
SET LIBPATH=C:\Dev\MSVC14\lib\x86;C:\Dev\MSVC14\atlmfc\lib\x86;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\ucrt\x86;
SET PATH=C:\Dev\MSVC14\bin\Hostx86\x86;%PATH%

SET DXSDK_DIR="C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\"
SET SDKDIR="C:\Program Files (x86)\Windows Kits\8.1\"
SET SDKMINORVER=1
SET SDKPRODUCTKEY="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1"
SET SDKVER=8

%MOZILLABUILD%msys\bin\bash --login -i


Meanwhile new mozilla-build has stupid bug when obj dir is assigned to not the same drive as the source. To fix this edit mozilla-build\python\Lib\ntpath.py from the line 524 comment or delete

Code: Select all

        if path_is_unc:
            raise ValueError("path is on UNC root %s, start on UNC root %s"
                                                % (path_prefix, start_prefix))
        else:
            raise ValueError("path is on drive %s, start on drive %s"
                                                % (path_prefix, start_prefix))

User avatar
New Tobin Paradigm
Banned user
Banned user
Posts: 4417
Joined: Tue, 09 Oct 2012, 19:37

Re: building basilisk & rebranding for Windows

Postby New Tobin Paradigm » Tue, 01 May 2018, 16:15

You should use full Visual Studio 2015 and MozillaBuild 2.x for UXP Building on Windows. No other variation is supported.

May I suggest you get yourself a website or a blogging service to further discuss your exploits and keep alternative, unwise, and/or contradictory instructions off our official forums.
Last edited by New Tobin Paradigm on Tue, 01 May 2018, 16:16, edited 2 times in total.
I hate Pod Six. Tch, I don't even know why we have a Pod Six. Total suck Pod.
[ ニュー・トビン・パラダイム ]

User avatar
New Tobin Paradigm
Banned user
Banned user
Posts: 4417
Joined: Tue, 09 Oct 2012, 19:37

Re: building basilisk & rebranding for Windows

Postby New Tobin Paradigm » Tue, 01 May 2018, 16:20

Be that as it may, if you want instructions on rebranding.. THAT I am willing to help on.
I hate Pod Six. Tch, I don't even know why we have a Pod Six. Total suck Pod.
[ ニュー・トビン・パラダイム ]

User avatar
Fedor2
Lunatic
Lunatic
Posts: 476
Joined: Mon, 11 Apr 2016, 01:26

Re: building basilisk & rebranding for Windows

Postby Fedor2 » Wed, 02 May 2018, 08:56

Well if you change your mind and agree to help please help. Because i did my things by guesses. Write the manual how to do the proper branding and with an example. This will be the great for all no me only.

As for the building without installation of the visual studio, why it is contradictory? I think fellows that do no like bloating software will find that useful.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: building basilisk & rebranding for Windows

Postby Moonchild » Wed, 02 May 2018, 10:27

Installing necessary tools that are PREREQUISITES FOR BUILDING is not "installing bloat" -- you clearly don't understand how software in general works.

And as I stated in my PM to you, getting organized and rebranding should be your top priority right now. Tobin isn't the only one who's been getting annoyed with the total lack of action on your side after having been extended a helping hand by several people to get your thing going. As it is, my own offer for help has gone stale. You are on your own as far as setting up a website and hosting/forum/etc. for it now.
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.

User avatar
Fedor2
Lunatic
Lunatic
Posts: 476
Joined: Mon, 11 Apr 2016, 01:26

Re: building basilisk & rebranding for Windows

Postby Fedor2 » Wed, 02 May 2018, 11:51

Installing necessary tools that are PREREQUISITES FOR BUILDING is not "installing bloat"

Let take for an example Microsoft SQL Server, which is now pushed in every VS installation, tell me by what means it is required for building basilisk or palemoon, it is obviously required for building something but not everything. For this case MSSQL server is useless junk which bloats the system.

Brading is about renaming the thing to be the distinct from the original or what? Does hosting a website is included in branding part? If so, then sorry i certainly not going to do hosting the site, and consider that unnecessary at all. This is possible only when fork going big after then someone will be employed to handle the site.

Moonchild once you can write your own story, it will be good example, also why you consider making a site immediately is required, when you made palemoon site actually... many other useful things.
Last edited by Fedor2 on Wed, 02 May 2018, 12:56, edited 2 times in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 20996
Joined: Sun, 28 Aug 2011, 17:27
Location: 58.5°N 15.5°E
Contact:

Re: building basilisk & rebranding for Windows

Postby Moonchild » Wed, 02 May 2018, 19:50

Sure a website is not required, and you can publish your browser through other means like download sites and the likes, and keeping your github or whatnot as the main information hub about it. But I offered it anyway. Just letting you know that offer no longer stands.

Also be aware that what I said in the more relevant board (since this is about Basilisk), the XP support board on this forum will be retired soon. If you want to have a dialogue with your users it's recommended that you actually set something up for it. But hey, maybe Discord will work for you?
Improving Mozilla code: You know you're on the right track with code changes when you spend the majority of your time deleting code.


Return to “Basilisk”

Who is online

Users browsing this forum: Google [Bot] and 2 guests