IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Chromium浏览器便携化启动工具

    1900发表于 2023-12-21 14:07:09
    love 0

    Edge广告泛滥

    前些日子听朋友吐槽Edge浏览器最近的更新可谓是如何如何不当人,经常刷到的新闻也都是说强制弹广告、升级之类的负面新闻,刚出来的那个大家都喜欢的、如白纸般的Edge早已经不复存在了,如今的人们可谓是苦Edge久矣。

    当然,这种情况自然是不能惯着,找替代品,必须找替代品给他替代了。

    不过第三方Chromium换皮浏览器如今可是太多太多了,比如我就在使用的国产百分浏览器,虽然百分浏览器2022年12月奇迹般的更新了一次,但是时隔一年又归于沉寂,内核还依旧停留在 Chromium 102.0.5005.167 ,过旧的内核导致了一些前端框架特性、新浏览器特性无法使用,但是目前国内其他毒瘤大厂各种魔改的浏览器我又不想使用,所以又花了一番心思寻找。

    去花里胡哨Chromium版本

    最终,我在Github找到了Hibbiki修改的 Chromium-win64 ,去掉了一些花里胡哨的功能,且有「含Google服务版本」和「无Google服务版本」,最大程度上把选择权交给用户。

    💡
    另外一个版本是winchrome 大佬的 Chromium ungoogled 版本,但是V2ex上有人说这个版本会有兼容问题,不建议使用,请自行测试。

    但是默认情况下Chromium启动后数据会存放在系统用户文件夹中,这样偶尔重装系统如果不注意可能会出现数据丢失的情况,当然你可以通过创建快捷方式,并附带启动命令指定用户目录解决这个问题:

    chrome.exe --disable-encryption --disable-machine-id --user-data-dir="目录"

    Chromium启动器

    但是这样操作更新会比较麻烦,所以我在Github上找到了Chrlauncher ,这是一款小巧、便携的Chromium启动、更新工具,具有以下特性:

    • 开源:https://github.com/henrypp/chrlauncher
    • 浏览器下载:支持多个Github上热门的Chromium浏览器,通过配置文件可以十分方便的切换浏览器版本(目前支持了7种Chromium修改版本)。
    • 更新:支持自动检测目前浏览器是否有更新,自动下载。
    • 便携化启动:可以自定义浏览器用户文件夹,便携启动。

    使用方法

    在 Release 页面下载适用于自己系统版本的Chrlauncher,解压在任意目录后打开Chrlauncher目录内 86 或 64 文件夹内的配置文件 chrlauncher.ini ,配置内容如下:

    [chrlauncher]
    
    # Custom Chromium update URL (string):
    #ChromiumUpdateUrl=https://chromium.woolyss.com/api/v3/?os=windows&bit=%d&type=%s&out=string
    
    # Chromium启动命令 / Command line for Chromium (string):
    # See here: https://peter.sh/experiments/chromium-command-line-switches/
    ChromiumCommandLine=--flag-switches-begin --user-data-dir=..\profile --no-default-browser-check --flag-switches-end
    
    # 自定义Chromium可执行文件位置 / Chromium executable file name (string):
    ChromiumBinary=chrome.exe
    
    # 自定义Chromium程序目录 / Chromium binaries directory (string):
    # Relative (to chrlauncher directory) or full path (env. variables supported).
    ChromiumDirectory=.\bin
    
    # Set Chromium binaries architecture (integer):
    #
    # 0		-> 	autodetect (default)
    # 64	-> 64-bit
    # 32	-> 32-bit
    ChromiumArchitecture=0
    
    # Auto download updates if found (boolean)
    #
    # false	-> show tray tip if update found, downloading manually (default)
    # true	-> auto download update and install it!
    ChromiumAutoDownload=false
    
    # Bring chrlauncher window when download started (boolean)
    #
    # false	-> don't bring main window to front automatically
    # true	-> bring chrlauncher window to front when download started (default)
    ChromiumBringToFront=true
    
    # Set download in foreground mode (boolean):
    #
    # false	-> start browser and check/download/install update in background
    # true	-> start browser only when check/download/install update complete (default)
    ChromiumWaitForDownloadEnd=true
    
    # Use chrlauncher as updater, but does not start Chromium (boolean):
    #
    # false	-> update & start Chromium (default)
    # true	-> download & install Chromium update without start
    ChromiumUpdateOnly=false
    
    # 支持的Chromium版本 / Type of Chromium builds:
    #
    # dev-official
    #	Official development builds from snapshots repository
    #	"storage.googleapis.com/chromium-browser-snapshots/index.html" (32/64 bit)
    #
    # stable-codecs-sync
    #	Unofficial stable builds with codecs
    #	"github.com/Hibbiki/chromium-win64/releases" (64 bit)
    #	"github.com/Hibbiki/chromium-win32/releases" (32 bit)
    #
    # dev-nosync
    #	Unofficial development builds without Google services
    #	"github.com/RobRich999/Chromium_Clang/releases" (32/64 bit)
    #
    # dev-codecs-sync
    #	Unofficial development builds with codecs and without Google services
    #	"github.com/macchrome/winchrome/releases" (64 bit)
    #
    # dev-codecs-nosync
    #	Unofficial development builds with codecs and without Google services
    #	"github.com/macchrome/winchrome/releases" (64 bit)
    #
    # ungoogled-chromium
    #	Unofficial builds without Google integration and enhanced privacy (based on Eloston project)
    #	"github.com/macchrome/winchrome/releases/" (32/64 bit)
    #	"github.com/Eloston/ungoogled-chromium"
    #
    # stable-codecs-nosync
    #	Unofficial stable builds with codecs and without google services
    #	!!! DISCONTINUED since June 2018 !!!
    ChromiumType=stable-codecs-sync
    
    # 更新检测频率 / Check for new Chromium version once in X days (integer):
    #
    # 2	-> check updates once in a X days (default)
    # 0	-> disable update checking
    # -1	-> force update checking
    ChromiumCheckPeriod=2
    
    # Last cached update checking timestamp (integer):
    ChromiumLastCheck=1703065267
    
    #
    # Internal settings (SDK)
    #
    
    # 自定义UserAgent / Set custom useragent (string):
    #UserAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.0.0 Safari/537.36
    [chrlauncher\window]
    Position=1086,530
    

    其中79 行设置你要使用的Chromium版本,支持7种Github上的开源版本。当然你也可以设置8 行、11 行、15 行,使用自己电脑内的Chrome,并自定义启动命令。

    如无特殊要求,更改 ChromiumType 为想要使用的开源版本后,执行配置文件同目录下的 chrlauncher.exe 程序即可自动下载设置好的Chromium版本,且浏览器会自动安装在同目录下的 bin 文件夹内,且启动完成会在同目录下生成用户资料文件夹 profile 。

    Enjoy!😊



沪ICP备19023445号-2号
友情链接