From ec10c4e6f5c9cebfd1af992c5e6996ad12cd701e Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Wed, 3 Feb 2021 23:53:06 +0100 Subject: [PATCH] Rebase, squash and merge !7. changes changes changes changes changes addes settings submodule changes updates updates new version of the readme.md Update README2.md changes Update the text formatting Update README2.md Update README2.md changes Removed install_script.txt because the profile folder requested here is checked to be Ok. Updated the readme a bit --- .gitignore | 8 +- .gitmodules | 3 + README.md | 30 ++- README2.md | 61 +++++ build.sh | 219 ++++++++++++++++++ common | 1 + install_script.txt | 1 - .../stubinstaller/bgstub.jpg | Bin 0 -> 1228 bytes .../stubinstaller/installing_page.css | 61 +++++ .../stubinstaller/profile_cleanup_page.css | 42 ++++ 10 files changed, 411 insertions(+), 15 deletions(-) create mode 100644 README2.md create mode 100644 build.sh create mode 160000 common delete mode 100644 install_script.txt create mode 100644 missing_branding_files/stubinstaller/bgstub.jpg create mode 100644 missing_branding_files/stubinstaller/installing_page.css create mode 100644 missing_branding_files/stubinstaller/profile_cleanup_page.css diff --git a/.gitignore b/.gitignore index aaab1bc..1929584 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ -firefox.exe -librewolf \ No newline at end of file +firefox-* +librewolf-* +megabar.patch +remove_addons.patch +unity-menubar.patch +mozconfig diff --git a/.gitmodules b/.gitmodules index 1d63467..9e19064 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "settings"] path = settings url = https://gitlab.com/librewolf-community/settings.git +[submodule "common"] + path = common + url = https://gitlab.com/librewolf-community/browser/common.git diff --git a/README.md b/README.md index e3d9463..0ee0f37 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,22 @@ -# Librewolf Windows +This repository is still a work in progress. -## Instalation/Creation - * clone this repository - * execute the package.ps1 on powershell +But we have a zip file available for testing right now.. - This is create a folder *librewolf* on current dir, with subfolder core (its content of the firefox.exe), with Firefox configured with scripts/settings of librewolf. - From that point you can install using the setup.exe or simple execute the ***firefox.exe*** on the core folder. +Download link to the prerelease alpha zip file is [here](https://gitlab.com/librewolf-community/browser/windows/uploads/5e9d436515d315d4e8953f88bf02bd99/librewolf-85.0.en-US.win64.zip). -## Cloning the repo -```powershell -git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git -``` +To do: + +* Creating an installer. +* Branding issues, include a good icon for librewolf.exe +* Other Branding Issues +* Improve this README.md to contain detailed instructions on how to build. + +For now, if you want to attempt to build, this build does require you to: + +* First build the mozilla-unified as explained in the mozilla docs, using all the ./mach bootstrap stuff +* You can delete this mozilla-unified thing to save some space (try ./mach run on it just for fun) +* Then clone the windows repo +* cd into it, and build with: **time bash build.sh fetch prepare build package installer_win** +* you can perform each of the build steps individually and the overall script structure follows PKGBULD as used on Archlinux +* This will produce a **librewolf-85.0.en-US.win64.zip** in this windows folder. -### Opensource Licences/Uses -This scripts use and embed [7zip](https://www.7-zip.org/) diff --git a/README2.md b/README2.md new file mode 100644 index 0000000..792bf47 --- /dev/null +++ b/README2.md @@ -0,0 +1,61 @@ +Just some notes +--------------- + +Once you have built the entire mozilla-unified with all the mach bootstrap stuff (which will +install the needed binaries in $HOME/.mozbuild), don't forget to copy the entire +C:\Program Files\Git folder to /c/mozilla-source to get a sed.exe that understands the -z option, +and to get sha256sum.exe. + + +To build, one should use the following command in the checked out windows repo: + +$ time bash build.sh fetch prepare build package + + +the final .zip is in: + C:\mozilla-source\windows + + +* problem with old sed. does not recognize -z. using the one from Git might be a work around. + + +BRANDING: resource files +======================== + +* build fail on missing stubinstaller (might be a FF bug as it should just take missing +stuff from the nightly branding folder?) + +``` +$ mkdir stubinstaller +$ cp bgstub.jpg stubinstaller +$ pwd +/c/mozilla-source/firefox-85.0/browser/branding/librewolf +$ + +* checking all the different files in nightly and librewolf + +$ cd nightly +$ find . | sort > /c/mozilla-source/branding-nightly.txt +$ cd ../librewolf/ +$ find . | sort > /c/mozilla-source/branding-librewolf.txt + + +$ diff branding-nightly.txt branding-librewolf.txt +4a5,6 +> ./bgstub.jpg +> ./bgstub_2x.jpg +7a10 +> ./content/about-background.png +9,10d11 +< ./content/about-logo.svg +< ./content/about-logo@2x.png +14,15d14 +< ./content/aboutlogins.svg +< ./content/firefox-wordmark.svg +22,24d20 +< ./default22.png +< ./default24.png +< ./default256.png +$ +``` + diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..50f3511 --- /dev/null +++ b/build.sh @@ -0,0 +1,219 @@ +# build.sh - build librewolf on windows +# derived from https://gitlab.com/librewolf-community/browser/linux/-/blob/master/PKGBUILD + +pkgname=librewolf +_pkgname=LibreWolf + +pkgver=85.0 + + + +fetch() { + rm -f firefox-$pkgver.source.tar.xz + wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz + + # the settings and common submodules should be checked out to allow the build + + rm -f megabar.patch remove_addons.patch unity-menubar.patch + wget https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch + wget https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch + wget https://gitlab.com/librewolf-community/browser/linux/-/raw/master/unity-menubar.patch +} + + + +prepare() { + rm -rf firefox-$pkgver + tar xf firefox-$pkgver.source.tar.xz + + cd firefox-$pkgver + + cat >../mozconfig < librewolf-$pkgver.en-US.win64.zip.sha256sum + rm -f ../../../librewolf-$pkgver.en-US.win64.zip* + cp librewolf-$pkgver.en-US.win64.zip* ../../.. + cd ../.. + + cd .. +} + +installer_macos() { + cd firefox-$pkgver + + # TODO: we want to apply the librewolf settings and make the .dmg file here. + echo 'build.sh: installer_macos() Not implemented yet.' + cd .. +} + + + +# windows: change $PATH to find all the build tools in .mozbuild +# this might do the trick on macos aswell? +if [ -f '/c/mozilla-build/start-shell.bat' ]; then + export TPATH=$HOME/.mozbuild/clang/bin:$HOME/.mozbuild/cbindgen:$HOME/.mozbuild/node:$HOME/.mozbuild/nasm + export PATH=$TPATH:$PATH +fi + + + +# process commandline arguments and do something +done_something=0 +if [[ "$*" == *fetch* ]]; then + fetch + done_something=1 +fi +if [[ "$*" == *prepare* ]]; then + prepare + done_something=1 +fi +if [[ "$*" == *build* ]]; then + build + done_something=1 +fi +if [[ "$*" == *package* ]]; then + package + done_something=1 +fi +if [[ "$*" == *installer_win* ]]; then + installer_win + done_something=1 +fi +if [[ "$*" == *installer_macos* ]]; then + installer_macos + done_something=1 +fi + +if (( done_something == 0 )); then + echo "Usage: $0 fetch | prepare | build | package | installer_win | installer_mac" + exit +fi diff --git a/common b/common new file mode 160000 index 0000000..9995c8b --- /dev/null +++ b/common @@ -0,0 +1 @@ +Subproject commit 9995c8b275e2a06db3e0b24974b302a63791fc24 diff --git a/install_script.txt b/install_script.txt deleted file mode 100644 index 081cb68..0000000 --- a/install_script.txt +++ /dev/null @@ -1 +0,0 @@ -#C:\Users\\AppData\Roaming\LibreWolf\Profiles\xxxxxxxx.default \ No newline at end of file diff --git a/missing_branding_files/stubinstaller/bgstub.jpg b/missing_branding_files/stubinstaller/bgstub.jpg new file mode 100644 index 0000000000000000000000000000000000000000..69cd6b8609453784e53a2e756827114836fc6708 GIT binary patch literal 1228 zcmex=