• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ungoogled-software/ungoogled-chromium-macos: macOS packaging for ungoogled-chrom ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

ungoogled-software/ungoogled-chromium-macos

开源软件地址(OpenSource Url):

https://github.com/ungoogled-software/ungoogled-chromium-macos

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

ungoogled-chromium-macos

macOS packaging for ungoogled-chromium.

Downloads

Download binaries from the Contributor Binaries website.

Source Code: It is recommended to use a tag via git checkout (see building instructions below). You may also use master, but it is for development and may not be stable.

Building

Software requirements

  • macOS 10.15+
  • Xcode 12
  • Homebrew
  • Perl (for creating a .dmg package)
  • Python 2, specifically 2.7.13 or newer, as python in PATH
  • Python 3.5 or newer as python3 in PATH
  • Node.js

Setting up the build environment

  1. Install Ninja via Homebrew: brew install ninja
  2. Install GNU coreutils (for greadlink in packaging script): brew install coreutils
  3. Install GNU readline: brew install readline
  4. Install the data compression tools xz and zlib: brew install xz zlib
  5. Install Python 3.x: brew install python
  6. Install Python's pyenv to manage python version: brew install pyenv
  7. Install Python 2.7.13: pyenv install 2.7.13 Note: in some cases you might get Build failed: "ERROR: The Python zlib extension was not compiled. Missing the zlib?" during Python 2.7.13 installation, this can be fixed by running CPPFLAGS="-I$(brew --prefix zlib)/include" pyenv install 2.7.13.
  8. Unlink binutils to use the one provided with Xcode: brew unlink binutils
  9. Setup pyenv:
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
  1. Set global python command to use Python 2.7.13: pyenv global 2.7.13.
  2. Install Node.js: brew install node
  3. Restart your Terminal

Build

First, ensure the Xcode application is open. Then, run the following:

git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-macos.git
cd ungoogled-chromium-macos
# Replace TAG_OR_BRANCH_HERE with a tag or branch name
git checkout --recurse-submodules TAG_OR_BRANCH_HERE
./build.sh

A .dmg should appear in build/

NOTE: If the build fails, you must take additional steps before re-running the build:

  • If the build fails while downloading the Chromium source code, it can be fixed by removing build/downloads_cache and re-running the build instructions.
  • If the build fails at any other point after downloading, it can be fixed by removing build/src and build/domsubcache.tar.gz and re-running the build instructions. This will clear out all the code used by the build, and any files generated by the build.

Developer info

Updating patches

  1. Start the process and set the environment variables
./devutils/update_patches.sh merge
bash 
source devutils/set_quilt_vars.sh
  1. Setup Chromium source
mkdir -p build/{src,download_cache}
./ungoogled-chromium/utils/downloads.py retrieve -i ungoogled-chromium/downloads.ini downloads.ini -c build/download_cache
./ungoogled-chromium/utils/downloads.py unpack -i ungoogled-chromium/downloads.ini downloads.ini -c build/download_cache build/src
cd build/src
  1. Use quilt to refresh all patches: quilt push -a --refresh

    • If an error occurs, go to the next step. Otherwise, skip to Step 5.
  2. Use quilt to fix the broken patch:

    1. Run quilt push -f
    2. Edit the broken files as necessary by adding (quilt edit ... or quilt add ...) or removing (quilt remove ...) files as necessary
      • When removing large chunks of code, remove each line instead of using language features to hide or remove the code. This makes the patches less susceptible to breakages when using quilt's refresh command (e.g. quilt refresh updates the line numbers based on the patch context, so it's possible for new but desirable code in the middle of the block comment to be excluded.). It also helps with readability when someone wants to see the changes made based on the patch alone.
    3. Refresh the patch: quilt refresh
    4. Go back to Step 3.
  3. Run ../../ungoogled-chromium/devutils/validate_config.py

  4. Run quilt pop -a

  5. Validate that patches are applied correctly

cd ../..
./ungoogled-chromium/devutils/validate_patches.py -l build/src -s patches/series.merged
  1. Remove all patches introduced by ungoogled-chromium: ./devutils/update_patches.sh unmerge

  2. Ensure patches/series is formatted correctly, e.g. blank lines

  3. Sanity checking for consistency in series file: ./devutils/check_patch_files.sh

  4. Use git to add changes and commit

License

See LICENSE




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap