├── .github ├── actions │ ├── stage │ │ ├── action.yml │ │ ├── index.js │ │ └── package.json │ └── winget │ │ ├── action.yml │ │ ├── index.js │ │ └── package.json └── workflows │ └── main.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── build.py ├── devutils ├── check_patch_files.sh ├── print_tag_version.sh └── set_quilt_vars.sh ├── domain_substitution.list ├── downloads.ini ├── flags.windows.gn ├── package.py ├── patches ├── series └── ungoogled-chromium │ └── windows │ ├── windows-compile-mini-installer.patch │ ├── windows-disable-clang-version-check.patch │ ├── windows-disable-download-warning-prompt.patch │ ├── windows-disable-encryption.patch │ ├── windows-disable-event-log.patch │ ├── windows-disable-machine-id.patch │ ├── windows-disable-rcpy.patch │ ├── windows-disable-reorder-fix-linking.patch │ ├── windows-disable-rlz.patch │ ├── windows-disable-win-build-output.patch │ ├── windows-fix-building-gn.patch │ ├── windows-fix-building-with-rust.patch │ ├── windows-fix-building-without-safebrowsing.patch │ ├── windows-fix-clang-format-exe.patch │ ├── windows-fix-command-ids.patch │ ├── windows-fix-generate-resource-allowed-list.patch │ ├── windows-fix-licenses-gn-path.patch │ ├── windows-fix-missing-includes.patch │ ├── windows-fix-rc-terminating-error.patch │ ├── windows-fix-rc.patch │ ├── windows-fix-remove-unused-preferences-fields.patch │ ├── windows-fix-showIncludes.patch │ └── windows-no-unknown-warnings.patch ├── pruning.list └── revision.txt /.github/actions/stage/action.yml: -------------------------------------------------------------------------------- 1 | name: 'Stage' 2 | description: 'Stage build' 3 | inputs: 4 | finished: 5 | description: If a previous stage already finished the build, the stage will set all output variables to the input ones and exit 6 | required: true 7 | from_artifact: 8 | description: If a previous stage already uploaded build artifacts, the stage will resume building 9 | required: true 10 | x86: 11 | description: Build x86 binary 12 | required: false 13 | default: false 14 | arm: 15 | description: Build arm binary 16 | required: false 17 | default: false 18 | outputs: 19 | finished: 20 | description: If a previous stage already finished the build, the stage will set all output variables to the input ones and exit 21 | runs: 22 | using: 'node16' 23 | main: 'index.js' -------------------------------------------------------------------------------- /.github/actions/stage/index.js: -------------------------------------------------------------------------------- 1 | const core = require('@actions/core'); 2 | const io = require('@actions/io'); 3 | const exec = require('@actions/exec'); 4 | const {DefaultArtifactClient} = require('@actions/artifact'); 5 | const glob = require('@actions/glob'); 6 | 7 | async function run() { 8 | process.on('SIGINT', function() { 9 | }) 10 | const finished = core.getBooleanInput('finished', {required: true}); 11 | const from_artifact = core.getBooleanInput('from_artifact', {required: true}); 12 | const x86 = core.getBooleanInput('x86', {required: false}) 13 | const arm = core.getBooleanInput('arm', {required: false}) 14 | console.log(`finished: ${finished}, artifact: ${from_artifact}`); 15 | if (finished) { 16 | core.setOutput('finished', true); 17 | return; 18 | } 19 | 20 | const artifact = new DefaultArtifactClient(); 21 | const artifactName = x86 ? 'build-artifact-x86' : (arm ? 'build-artifact-arm' : 'build-artifact'); 22 | 23 | if (from_artifact) { 24 | const artifactInfo = await artifact.getArtifact(artifactName); 25 | await artifact.downloadArtifact(artifactInfo.artifact.id, {path: 'C:\\ungoogled-chromium-windows\\build'}); 26 | await exec.exec('7z', ['x', 'C:\\ungoogled-chromium-windows\\build\\artifacts.zip', 27 | '-oC:\\ungoogled-chromium-windows\\build', '-y']); 28 | await io.rmRF('C:\\ungoogled-chromium-windows\\build\\artifacts.zip'); 29 | } 30 | 31 | const args = ['build.py', '--ci'] 32 | if (x86) 33 | args.push('--x86') 34 | if (arm) 35 | args.push('--arm') 36 | await exec.exec('python', ['-m', 'pip', 'install', 'httplib2'], { 37 | cwd: 'C:\\ungoogled-chromium-windows', 38 | ignoreReturnCode: true 39 | }); 40 | const retCode = await exec.exec('python', args, { 41 | cwd: 'C:\\ungoogled-chromium-windows', 42 | ignoreReturnCode: true 43 | }); 44 | if (retCode === 0) { 45 | core.setOutput('finished', true); 46 | const globber = await glob.create('C:\\ungoogled-chromium-windows\\build\\ungoogled-chromium*', 47 | {matchDirectories: false}); 48 | let packageList = await globber.glob(); 49 | const finalArtifactName = x86 ? 'chromium-x86' : (arm ? 'chromium-arm' : 'chromium'); 50 | for (let i = 0; i < 5; ++i) { 51 | try { 52 | await artifact.deleteArtifact(finalArtifactName); 53 | } catch (e) { 54 | // ignored 55 | } 56 | try { 57 | await artifact.uploadArtifact(finalArtifactName, packageList, 58 | 'C:\\ungoogled-chromium-windows\\build', {retentionDays: 1, compressionLevel: 0}); 59 | break; 60 | } catch (e) { 61 | console.error(`Upload artifact failed: ${e}`); 62 | // Wait 10 seconds between the attempts 63 | await new Promise(r => setTimeout(r, 10000)); 64 | } 65 | } 66 | } else { 67 | await new Promise(r => setTimeout(r, 5000)); 68 | await exec.exec('7z', ['a', '-tzip', 'C:\\ungoogled-chromium-windows\\artifacts.zip', 69 | 'C:\\ungoogled-chromium-windows\\build\\src', '-mx=3', '-mtc=on'], {ignoreReturnCode: true}); 70 | for (let i = 0; i < 5; ++i) { 71 | try { 72 | await artifact.deleteArtifact(artifactName); 73 | } catch (e) { 74 | // ignored 75 | } 76 | try { 77 | await artifact.uploadArtifact(artifactName, ['C:\\ungoogled-chromium-windows\\artifacts.zip'], 78 | 'C:\\ungoogled-chromium-windows', {retentionDays: 1, compressionLevel: 0}); 79 | break; 80 | } catch (e) { 81 | console.error(`Upload artifact failed: ${e}`); 82 | // Wait 10 seconds between the attempts 83 | await new Promise(r => setTimeout(r, 10000)); 84 | } 85 | } 86 | core.setOutput('finished', false); 87 | } 88 | } 89 | 90 | run().catch(err => core.setFailed(err.message)); 91 | -------------------------------------------------------------------------------- /.github/actions/stage/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@actions/artifact": "^2.2.1", 4 | "@actions/core": "^1.8.2", 5 | "@actions/exec": "^1.1.1", 6 | "@actions/glob": "^0.3.0", 7 | "@actions/io": "^1.1.2" 8 | } 9 | } -------------------------------------------------------------------------------- /.github/actions/winget/action.yml: -------------------------------------------------------------------------------- 1 | name: 'winget' 2 | description: 'Release to winget repository' 3 | inputs: 4 | token: 5 | description: GitHub Personal Access Token 6 | required: true 7 | version: 8 | description: New version 9 | required: true 10 | assets: 11 | description: Artifact assets 12 | required: true 13 | runs: 14 | using: 'node16' 15 | main: 'index.js' -------------------------------------------------------------------------------- /.github/actions/winget/index.js: -------------------------------------------------------------------------------- 1 | const yaml = require('js-yaml'); 2 | const exec = require('@actions/exec'); 3 | const core = require("@actions/core"); 4 | const glob = require('@actions/glob'); 5 | const path = require('path'); 6 | const compareVersions = require('compare-versions'); 7 | const fs = require('fs/promises'); 8 | const fsSync = require('fs'); 9 | const io = require('@actions/io'); 10 | const crypto = require('crypto'); 11 | const { https } = require('follow-redirects'); 12 | 13 | async function run() { 14 | const token = core.getInput('token', { 15 | required: true, 16 | trimWhitespace: true 17 | }); 18 | let newVersion = core.getInput('version', { 19 | required: true, 20 | trimWhitespace: true 21 | }); 22 | const idx = newVersion.lastIndexOf('-'); 23 | if (idx !== -1) 24 | newVersion = newVersion.substr(0, idx); 25 | const assets = JSON.parse(core.getInput('assets', { 26 | required: true, 27 | })); 28 | let x86Url, x64Url; 29 | for (const data of assets) { 30 | if (data.browser_download_url.endsWith('.exe')) { 31 | if (data.browser_download_url.includes('x86')) 32 | x86Url = data.browser_download_url; 33 | else 34 | x64Url = data.browser_download_url; 35 | } 36 | } 37 | 38 | await syncRepo(token); 39 | const globber = await glob.create('.\\winget-pkgs\\manifests\\e\\eloston\\ungoogled-chromium\\*', {matchDirectories: true, implicitDescendants: false}); 40 | const pathList = await globber.glob(); 41 | const ucPath = path.dirname(pathList[0]); 42 | const versionList = pathList.map(x => path.basename(x)); 43 | versionList.sort(compareVersions); 44 | const latestVersion = versionList[versionList.length - 1]; 45 | const latestVersionPath = path.join(ucPath, latestVersion); 46 | const newVersionPath = path.join(ucPath, newVersion); 47 | try { 48 | await io.mkdirP(newVersionPath); 49 | } catch (e) { 50 | } 51 | 52 | await updateInstaller(latestVersionPath, newVersionPath, latestVersion, newVersion, x86Url, x64Url); 53 | await replaceContent(latestVersionPath, newVersionPath, latestVersion, newVersion, 'eloston.ungoogled-chromium.locale.en-US.yaml'); 54 | await replaceContent(latestVersionPath, newVersionPath, latestVersion, newVersion, 'eloston.ungoogled-chromium.yaml'); 55 | 56 | await new Promise((resolve, reject) => { 57 | const file = fsSync.createWriteStream('wingetcreate.exe'); 58 | https.get('https://aka.ms/wingetcreate/latest', resp => { 59 | resp.pipe(file); 60 | file.on('finish', () => { 61 | file.close(); 62 | resolve(); 63 | }); 64 | }).on('error', reject); 65 | }); 66 | await exec.exec('.\\wingetcreate.exe', ['submit', '-t', token, newVersionPath]); 67 | } 68 | 69 | async function replaceContent(latestVersionPath, newVersionPath, latestVersion, newVersion, fileName) { 70 | const content = await fs.readFile(path.join(latestVersionPath, fileName), {encoding: 'utf-8'}); 71 | const newContent = content.replaceAll(latestVersion, newVersion); 72 | await fs.writeFile(path.join(newVersionPath, fileName), newContent, {encoding: 'utf-8'}); 73 | } 74 | 75 | async function updateInstaller(latestVersionPath, newVersionPath, latestVersion, newVersion, x86Url, x64Url) { 76 | const x86Hash = await calculateSHA256(x86Url); 77 | const x64Hash = await calculateSHA256(x64Url); 78 | const content = await fs.readFile(path.join(latestVersionPath, 'eloston.ungoogled-chromium.installer.yaml'), {encoding: 'utf-8'}); 79 | const data = yaml.load(content); 80 | let oldX86Url, oldX64Url, oldX86Hash, oldX64Hash; 81 | for (const installer of data.Installers) { 82 | if (installer.Architecture === 'x86') { 83 | oldX86Url = installer.InstallerUrl; 84 | oldX86Hash = installer.InstallerSha256; 85 | } else { 86 | oldX64Url = installer.InstallerUrl; 87 | oldX64Hash = installer.InstallerSha256; 88 | } 89 | } 90 | 91 | const newContent = content 92 | .replaceAll(`PackageVersion: ${data.PackageVersion}`, `PackageVersion: ${newVersion}`) 93 | .replaceAll(`ReleaseDate: ${data.ReleaseDate}`, `ReleaseDate: ${new Date().toLocaleDateString('en-CA')}`) 94 | .replaceAll(oldX86Url, x86Url) 95 | .replaceAll(oldX86Hash, x86Hash) 96 | .replaceAll(oldX64Url, x64Url) 97 | .replaceAll(oldX64Hash, x64Hash); 98 | 99 | await fs.writeFile(path.join(newVersionPath, 'eloston.ungoogled-chromium.installer.yaml'), newContent, {encoding: 'utf-8'}); 100 | } 101 | 102 | function calculateSHA256(url) { 103 | const hash = crypto.createHash('sha256'); 104 | return new Promise((resolve, reject) => { 105 | https.get(url, resp => { 106 | resp.on('data', chunk => hash.update(chunk)); 107 | resp.on('end', () => resolve(hash.digest('hex').toUpperCase())); 108 | }).on('error', reject); 109 | }); 110 | } 111 | 112 | async function syncRepo(token) { 113 | await exec.exec('git', ['clone', `https://x-access-token:${token}@github.com/Nifury/winget-pkgs.git`]); 114 | await exec.exec('git', ['remote', 'add', 'upstream', 'https://github.com/microsoft/winget-pkgs.git'], {cwd: '.\\winget-pkgs'}); 115 | await exec.exec('git', ['fetch', 'upstream', 'master'], {cwd: '.\\winget-pkgs'}); 116 | await exec.exec('git', ['reset', '--hard', 'upstream/master'], {cwd: '.\\winget-pkgs'}); 117 | await exec.exec('git', ['push', 'origin', 'master', '--force'], {cwd: '.\\winget-pkgs'}); 118 | } 119 | 120 | run().catch(err => core.setFailed(err.message)); -------------------------------------------------------------------------------- /.github/actions/winget/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@actions/core": "^1.8.2", 4 | "@actions/exec": "^1.1.1", 5 | "@actions/glob": "^0.3.0", 6 | "@actions/io": "^1.1.2", 7 | "js-yaml": "^4.1.0", 8 | "compare-versions": "^4.1.3", 9 | "follow-redirects": "^1.15.1" 10 | } 11 | } -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | tags: 5 | - '*' 6 | jobs: 7 | build-1: 8 | runs-on: windows-2022 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v3 12 | with: 13 | submodules: 'recursive' 14 | - name: Init 15 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 16 | - name: Setup Stage 17 | run: npm install 18 | working-directory: ./.github/actions/stage 19 | - name: Run Stage 20 | id: stage 21 | uses: ./.github/actions/stage 22 | with: 23 | finished: false 24 | from_artifact: false 25 | outputs: 26 | finished: ${{ steps.stage.outputs.finished }} 27 | build-2: 28 | needs: build-1 29 | runs-on: windows-2022 30 | steps: 31 | - name: Checkout 32 | uses: actions/checkout@v3 33 | with: 34 | submodules: 'recursive' 35 | - name: Init 36 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 37 | - name: Setup Stage 38 | run: npm install 39 | working-directory: ./.github/actions/stage 40 | - name: Run Stage 41 | id: stage 42 | uses: ./.github/actions/stage 43 | with: 44 | finished: ${{ join(needs.*.outputs.finished) }} 45 | from_artifact: true 46 | outputs: 47 | finished: ${{ steps.stage.outputs.finished }} 48 | build-3: 49 | needs: build-2 50 | runs-on: windows-2022 51 | steps: 52 | - name: Checkout 53 | uses: actions/checkout@v3 54 | with: 55 | submodules: 'recursive' 56 | - name: Init 57 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 58 | - name: Setup Stage 59 | run: npm install 60 | working-directory: ./.github/actions/stage 61 | - name: Run Stage 62 | id: stage 63 | uses: ./.github/actions/stage 64 | with: 65 | finished: ${{ join(needs.*.outputs.finished) }} 66 | from_artifact: true 67 | outputs: 68 | finished: ${{ steps.stage.outputs.finished }} 69 | build-4: 70 | needs: build-3 71 | runs-on: windows-2022 72 | steps: 73 | - name: Checkout 74 | uses: actions/checkout@v3 75 | with: 76 | submodules: 'recursive' 77 | - name: Init 78 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 79 | - name: Setup Stage 80 | run: npm install 81 | working-directory: ./.github/actions/stage 82 | - name: Run Stage 83 | id: stage 84 | uses: ./.github/actions/stage 85 | with: 86 | finished: ${{ join(needs.*.outputs.finished) }} 87 | from_artifact: true 88 | outputs: 89 | finished: ${{ steps.stage.outputs.finished }} 90 | build-5: 91 | needs: build-4 92 | runs-on: windows-2022 93 | steps: 94 | - name: Checkout 95 | uses: actions/checkout@v3 96 | with: 97 | submodules: 'recursive' 98 | - name: Init 99 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 100 | - name: Setup Stage 101 | run: npm install 102 | working-directory: ./.github/actions/stage 103 | - name: Run Stage 104 | id: stage 105 | uses: ./.github/actions/stage 106 | with: 107 | finished: ${{ join(needs.*.outputs.finished) }} 108 | from_artifact: true 109 | outputs: 110 | finished: ${{ steps.stage.outputs.finished }} 111 | build-6: 112 | needs: build-5 113 | runs-on: windows-2022 114 | steps: 115 | - name: Checkout 116 | uses: actions/checkout@v3 117 | with: 118 | submodules: 'recursive' 119 | - name: Init 120 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 121 | - name: Setup Stage 122 | run: npm install 123 | working-directory: ./.github/actions/stage 124 | - name: Run Stage 125 | id: stage 126 | uses: ./.github/actions/stage 127 | with: 128 | finished: ${{ join(needs.*.outputs.finished) }} 129 | from_artifact: true 130 | outputs: 131 | finished: ${{ steps.stage.outputs.finished }} 132 | build-7: 133 | needs: build-6 134 | runs-on: windows-2022 135 | steps: 136 | - name: Checkout 137 | uses: actions/checkout@v3 138 | with: 139 | submodules: 'recursive' 140 | - name: Init 141 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 142 | - name: Setup Stage 143 | run: npm install 144 | working-directory: ./.github/actions/stage 145 | - name: Run Stage 146 | id: stage 147 | uses: ./.github/actions/stage 148 | with: 149 | finished: ${{ join(needs.*.outputs.finished) }} 150 | from_artifact: true 151 | outputs: 152 | finished: ${{ steps.stage.outputs.finished }} 153 | build-8: 154 | needs: build-7 155 | runs-on: windows-2022 156 | steps: 157 | - name: Checkout 158 | uses: actions/checkout@v3 159 | with: 160 | submodules: 'recursive' 161 | - name: Init 162 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 163 | - name: Setup Stage 164 | run: npm install 165 | working-directory: ./.github/actions/stage 166 | - name: Run Stage 167 | id: stage 168 | uses: ./.github/actions/stage 169 | with: 170 | finished: ${{ join(needs.*.outputs.finished) }} 171 | from_artifact: true 172 | outputs: 173 | finished: ${{ steps.stage.outputs.finished }} 174 | build-9: 175 | needs: build-8 176 | runs-on: windows-2022 177 | steps: 178 | - name: Checkout 179 | uses: actions/checkout@v3 180 | with: 181 | submodules: 'recursive' 182 | - name: Init 183 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 184 | - name: Setup Stage 185 | run: npm install 186 | working-directory: ./.github/actions/stage 187 | - name: Run Stage 188 | id: stage 189 | uses: ./.github/actions/stage 190 | with: 191 | finished: ${{ join(needs.*.outputs.finished) }} 192 | from_artifact: true 193 | outputs: 194 | finished: ${{ steps.stage.outputs.finished }} 195 | build-10: 196 | needs: build-9 197 | runs-on: windows-2022 198 | steps: 199 | - name: Checkout 200 | uses: actions/checkout@v3 201 | with: 202 | submodules: 'recursive' 203 | - name: Init 204 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 205 | - name: Setup Stage 206 | run: npm install 207 | working-directory: ./.github/actions/stage 208 | - name: Run Stage 209 | id: stage 210 | uses: ./.github/actions/stage 211 | with: 212 | finished: ${{ join(needs.*.outputs.finished) }} 213 | from_artifact: true 214 | outputs: 215 | finished: ${{ steps.stage.outputs.finished }} 216 | build-11: 217 | needs: build-10 218 | runs-on: windows-2022 219 | steps: 220 | - name: Checkout 221 | uses: actions/checkout@v3 222 | with: 223 | submodules: 'recursive' 224 | - name: Init 225 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 226 | - name: Setup Stage 227 | run: npm install 228 | working-directory: ./.github/actions/stage 229 | - name: Run Stage 230 | id: stage 231 | uses: ./.github/actions/stage 232 | with: 233 | finished: ${{ join(needs.*.outputs.finished) }} 234 | from_artifact: true 235 | outputs: 236 | finished: ${{ steps.stage.outputs.finished }} 237 | build-12: 238 | needs: build-11 239 | runs-on: windows-2022 240 | steps: 241 | - name: Checkout 242 | uses: actions/checkout@v3 243 | with: 244 | submodules: 'recursive' 245 | - name: Init 246 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 247 | - name: Setup Stage 248 | run: npm install 249 | working-directory: ./.github/actions/stage 250 | - name: Run Stage 251 | id: stage 252 | uses: ./.github/actions/stage 253 | with: 254 | finished: ${{ join(needs.*.outputs.finished) }} 255 | from_artifact: true 256 | outputs: 257 | finished: ${{ steps.stage.outputs.finished }} 258 | build-13: 259 | needs: build-12 260 | runs-on: windows-2022 261 | steps: 262 | - name: Checkout 263 | uses: actions/checkout@v3 264 | with: 265 | submodules: 'recursive' 266 | - name: Init 267 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 268 | - name: Setup Stage 269 | run: npm install 270 | working-directory: ./.github/actions/stage 271 | - name: Run Stage 272 | id: stage 273 | uses: ./.github/actions/stage 274 | with: 275 | finished: ${{ join(needs.*.outputs.finished) }} 276 | from_artifact: true 277 | outputs: 278 | finished: ${{ steps.stage.outputs.finished }} 279 | build-14: 280 | needs: build-13 281 | runs-on: windows-2022 282 | steps: 283 | - name: Checkout 284 | uses: actions/checkout@v3 285 | with: 286 | submodules: 'recursive' 287 | - name: Init 288 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 289 | - name: Setup Stage 290 | run: npm install 291 | working-directory: ./.github/actions/stage 292 | - name: Run Stage 293 | id: stage 294 | uses: ./.github/actions/stage 295 | with: 296 | finished: ${{ join(needs.*.outputs.finished) }} 297 | from_artifact: true 298 | outputs: 299 | finished: ${{ steps.stage.outputs.finished }} 300 | build-15: 301 | needs: build-14 302 | runs-on: windows-2022 303 | steps: 304 | - name: Checkout 305 | uses: actions/checkout@v3 306 | with: 307 | submodules: 'recursive' 308 | - name: Init 309 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 310 | - name: Setup Stage 311 | run: npm install 312 | working-directory: ./.github/actions/stage 313 | - name: Run Stage 314 | id: stage 315 | uses: ./.github/actions/stage 316 | with: 317 | finished: ${{ join(needs.*.outputs.finished) }} 318 | from_artifact: true 319 | outputs: 320 | finished: ${{ steps.stage.outputs.finished }} 321 | build-16: 322 | needs: build-15 323 | runs-on: windows-2022 324 | steps: 325 | - name: Checkout 326 | uses: actions/checkout@v3 327 | with: 328 | submodules: 'recursive' 329 | - name: Init 330 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 331 | - name: Setup Stage 332 | run: npm install 333 | working-directory: ./.github/actions/stage 334 | - name: Run Stage 335 | id: stage 336 | uses: ./.github/actions/stage 337 | with: 338 | finished: ${{ join(needs.*.outputs.finished) }} 339 | from_artifact: true 340 | outputs: 341 | finished: ${{ steps.stage.outputs.finished }} 342 | 343 | build-x86-1: 344 | runs-on: windows-2022 345 | steps: 346 | - name: Checkout 347 | uses: actions/checkout@v3 348 | with: 349 | submodules: 'recursive' 350 | - name: Init 351 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 352 | - name: Setup Stage 353 | run: npm install 354 | working-directory: ./.github/actions/stage 355 | - name: Run Stage 356 | id: stage 357 | uses: ./.github/actions/stage 358 | with: 359 | finished: false 360 | from_artifact: false 361 | x86: true 362 | outputs: 363 | finished: ${{ steps.stage.outputs.finished }} 364 | build-x86-2: 365 | needs: build-x86-1 366 | runs-on: windows-2022 367 | steps: 368 | - name: Checkout 369 | uses: actions/checkout@v3 370 | with: 371 | submodules: 'recursive' 372 | - name: Init 373 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 374 | - name: Setup Stage 375 | run: npm install 376 | working-directory: ./.github/actions/stage 377 | - name: Run Stage 378 | id: stage 379 | uses: ./.github/actions/stage 380 | with: 381 | finished: ${{ join(needs.*.outputs.finished) }} 382 | from_artifact: true 383 | x86: true 384 | outputs: 385 | finished: ${{ steps.stage.outputs.finished }} 386 | build-x86-3: 387 | needs: build-x86-2 388 | runs-on: windows-2022 389 | steps: 390 | - name: Checkout 391 | uses: actions/checkout@v3 392 | with: 393 | submodules: 'recursive' 394 | - name: Init 395 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 396 | - name: Setup Stage 397 | run: npm install 398 | working-directory: ./.github/actions/stage 399 | - name: Run Stage 400 | id: stage 401 | uses: ./.github/actions/stage 402 | with: 403 | finished: ${{ join(needs.*.outputs.finished) }} 404 | from_artifact: true 405 | x86: true 406 | outputs: 407 | finished: ${{ steps.stage.outputs.finished }} 408 | build-x86-4: 409 | needs: build-x86-3 410 | runs-on: windows-2022 411 | steps: 412 | - name: Checkout 413 | uses: actions/checkout@v3 414 | with: 415 | submodules: 'recursive' 416 | - name: Init 417 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 418 | - name: Setup Stage 419 | run: npm install 420 | working-directory: ./.github/actions/stage 421 | - name: Run Stage 422 | id: stage 423 | uses: ./.github/actions/stage 424 | with: 425 | finished: ${{ join(needs.*.outputs.finished) }} 426 | from_artifact: true 427 | x86: true 428 | outputs: 429 | finished: ${{ steps.stage.outputs.finished }} 430 | build-x86-5: 431 | needs: build-x86-4 432 | runs-on: windows-2022 433 | steps: 434 | - name: Checkout 435 | uses: actions/checkout@v3 436 | with: 437 | submodules: 'recursive' 438 | - name: Init 439 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 440 | - name: Setup Stage 441 | run: npm install 442 | working-directory: ./.github/actions/stage 443 | - name: Run Stage 444 | id: stage 445 | uses: ./.github/actions/stage 446 | with: 447 | finished: ${{ join(needs.*.outputs.finished) }} 448 | from_artifact: true 449 | x86: true 450 | outputs: 451 | finished: ${{ steps.stage.outputs.finished }} 452 | build-x86-6: 453 | needs: build-x86-5 454 | runs-on: windows-2022 455 | steps: 456 | - name: Checkout 457 | uses: actions/checkout@v3 458 | with: 459 | submodules: 'recursive' 460 | - name: Init 461 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 462 | - name: Setup Stage 463 | run: npm install 464 | working-directory: ./.github/actions/stage 465 | - name: Run Stage 466 | id: stage 467 | uses: ./.github/actions/stage 468 | with: 469 | finished: ${{ join(needs.*.outputs.finished) }} 470 | from_artifact: true 471 | x86: true 472 | outputs: 473 | finished: ${{ steps.stage.outputs.finished }} 474 | build-x86-7: 475 | needs: build-x86-6 476 | runs-on: windows-2022 477 | steps: 478 | - name: Checkout 479 | uses: actions/checkout@v3 480 | with: 481 | submodules: 'recursive' 482 | - name: Init 483 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 484 | - name: Setup Stage 485 | run: npm install 486 | working-directory: ./.github/actions/stage 487 | - name: Run Stage 488 | id: stage 489 | uses: ./.github/actions/stage 490 | with: 491 | finished: ${{ join(needs.*.outputs.finished) }} 492 | from_artifact: true 493 | x86: true 494 | outputs: 495 | finished: ${{ steps.stage.outputs.finished }} 496 | build-x86-8: 497 | needs: build-x86-7 498 | runs-on: windows-2022 499 | steps: 500 | - name: Checkout 501 | uses: actions/checkout@v3 502 | with: 503 | submodules: 'recursive' 504 | - name: Init 505 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 506 | - name: Setup Stage 507 | run: npm install 508 | working-directory: ./.github/actions/stage 509 | - name: Run Stage 510 | id: stage 511 | uses: ./.github/actions/stage 512 | with: 513 | finished: ${{ join(needs.*.outputs.finished) }} 514 | from_artifact: true 515 | x86: true 516 | outputs: 517 | finished: ${{ steps.stage.outputs.finished }} 518 | build-x86-9: 519 | needs: build-x86-8 520 | runs-on: windows-2022 521 | steps: 522 | - name: Checkout 523 | uses: actions/checkout@v3 524 | with: 525 | submodules: 'recursive' 526 | - name: Init 527 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 528 | - name: Setup Stage 529 | run: npm install 530 | working-directory: ./.github/actions/stage 531 | - name: Run Stage 532 | id: stage 533 | uses: ./.github/actions/stage 534 | with: 535 | finished: ${{ join(needs.*.outputs.finished) }} 536 | from_artifact: true 537 | x86: true 538 | outputs: 539 | finished: ${{ steps.stage.outputs.finished }} 540 | build-x86-10: 541 | needs: build-x86-9 542 | runs-on: windows-2022 543 | steps: 544 | - name: Checkout 545 | uses: actions/checkout@v3 546 | with: 547 | submodules: 'recursive' 548 | - name: Init 549 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 550 | - name: Setup Stage 551 | run: npm install 552 | working-directory: ./.github/actions/stage 553 | - name: Run Stage 554 | id: stage 555 | uses: ./.github/actions/stage 556 | with: 557 | finished: ${{ join(needs.*.outputs.finished) }} 558 | from_artifact: true 559 | x86: true 560 | outputs: 561 | finished: ${{ steps.stage.outputs.finished }} 562 | build-x86-11: 563 | needs: build-x86-10 564 | runs-on: windows-2022 565 | steps: 566 | - name: Checkout 567 | uses: actions/checkout@v3 568 | with: 569 | submodules: 'recursive' 570 | - name: Init 571 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 572 | - name: Setup Stage 573 | run: npm install 574 | working-directory: ./.github/actions/stage 575 | - name: Run Stage 576 | id: stage 577 | uses: ./.github/actions/stage 578 | with: 579 | finished: ${{ join(needs.*.outputs.finished) }} 580 | from_artifact: true 581 | x86: true 582 | outputs: 583 | finished: ${{ steps.stage.outputs.finished }} 584 | build-x86-12: 585 | needs: build-x86-11 586 | runs-on: windows-2022 587 | steps: 588 | - name: Checkout 589 | uses: actions/checkout@v3 590 | with: 591 | submodules: 'recursive' 592 | - name: Init 593 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 594 | - name: Setup Stage 595 | run: npm install 596 | working-directory: ./.github/actions/stage 597 | - name: Run Stage 598 | id: stage 599 | uses: ./.github/actions/stage 600 | with: 601 | finished: ${{ join(needs.*.outputs.finished) }} 602 | from_artifact: true 603 | x86: true 604 | outputs: 605 | finished: ${{ steps.stage.outputs.finished }} 606 | build-x86-13: 607 | needs: build-x86-12 608 | runs-on: windows-2022 609 | steps: 610 | - name: Checkout 611 | uses: actions/checkout@v3 612 | with: 613 | submodules: 'recursive' 614 | - name: Init 615 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 616 | - name: Setup Stage 617 | run: npm install 618 | working-directory: ./.github/actions/stage 619 | - name: Run Stage 620 | id: stage 621 | uses: ./.github/actions/stage 622 | with: 623 | finished: ${{ join(needs.*.outputs.finished) }} 624 | from_artifact: true 625 | x86: true 626 | outputs: 627 | finished: ${{ steps.stage.outputs.finished }} 628 | build-x86-14: 629 | needs: build-x86-13 630 | runs-on: windows-2022 631 | steps: 632 | - name: Checkout 633 | uses: actions/checkout@v3 634 | with: 635 | submodules: 'recursive' 636 | - name: Init 637 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 638 | - name: Setup Stage 639 | run: npm install 640 | working-directory: ./.github/actions/stage 641 | - name: Run Stage 642 | id: stage 643 | uses: ./.github/actions/stage 644 | with: 645 | finished: ${{ join(needs.*.outputs.finished) }} 646 | from_artifact: true 647 | x86: true 648 | outputs: 649 | finished: ${{ steps.stage.outputs.finished }} 650 | build-x86-15: 651 | needs: build-x86-14 652 | runs-on: windows-2022 653 | steps: 654 | - name: Checkout 655 | uses: actions/checkout@v3 656 | with: 657 | submodules: 'recursive' 658 | - name: Init 659 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 660 | - name: Setup Stage 661 | run: npm install 662 | working-directory: ./.github/actions/stage 663 | - name: Run Stage 664 | id: stage 665 | uses: ./.github/actions/stage 666 | with: 667 | finished: ${{ join(needs.*.outputs.finished) }} 668 | from_artifact: true 669 | x86: true 670 | outputs: 671 | finished: ${{ steps.stage.outputs.finished }} 672 | build-x86-16: 673 | needs: build-x86-15 674 | runs-on: windows-2022 675 | steps: 676 | - name: Checkout 677 | uses: actions/checkout@v3 678 | with: 679 | submodules: 'recursive' 680 | - name: Init 681 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 682 | - name: Setup Stage 683 | run: npm install 684 | working-directory: ./.github/actions/stage 685 | - name: Run Stage 686 | id: stage 687 | uses: ./.github/actions/stage 688 | with: 689 | finished: ${{ join(needs.*.outputs.finished) }} 690 | from_artifact: true 691 | x86: true 692 | outputs: 693 | finished: ${{ steps.stage.outputs.finished }} 694 | 695 | build-arm-1: 696 | runs-on: windows-2022 697 | steps: 698 | - name: Checkout 699 | uses: actions/checkout@v3 700 | with: 701 | submodules: 'recursive' 702 | - name: Init 703 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 704 | - name: Setup Stage 705 | run: npm install 706 | working-directory: ./.github/actions/stage 707 | - name: Run Stage 708 | id: stage 709 | uses: ./.github/actions/stage 710 | with: 711 | finished: false 712 | from_artifact: false 713 | arm: true 714 | outputs: 715 | finished: ${{ steps.stage.outputs.finished }} 716 | build-arm-2: 717 | needs: build-arm-1 718 | runs-on: windows-2022 719 | steps: 720 | - name: Checkout 721 | uses: actions/checkout@v3 722 | with: 723 | submodules: 'recursive' 724 | - name: Init 725 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 726 | - name: Setup Stage 727 | run: npm install 728 | working-directory: ./.github/actions/stage 729 | - name: Run Stage 730 | id: stage 731 | uses: ./.github/actions/stage 732 | with: 733 | finished: ${{ join(needs.*.outputs.finished) }} 734 | from_artifact: true 735 | arm: true 736 | outputs: 737 | finished: ${{ steps.stage.outputs.finished }} 738 | build-arm-3: 739 | needs: build-arm-2 740 | runs-on: windows-2022 741 | steps: 742 | - name: Checkout 743 | uses: actions/checkout@v3 744 | with: 745 | submodules: 'recursive' 746 | - name: Init 747 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 748 | - name: Setup Stage 749 | run: npm install 750 | working-directory: ./.github/actions/stage 751 | - name: Run Stage 752 | id: stage 753 | uses: ./.github/actions/stage 754 | with: 755 | finished: ${{ join(needs.*.outputs.finished) }} 756 | from_artifact: true 757 | arm: true 758 | outputs: 759 | finished: ${{ steps.stage.outputs.finished }} 760 | build-arm-4: 761 | needs: build-arm-3 762 | runs-on: windows-2022 763 | steps: 764 | - name: Checkout 765 | uses: actions/checkout@v3 766 | with: 767 | submodules: 'recursive' 768 | - name: Init 769 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 770 | - name: Setup Stage 771 | run: npm install 772 | working-directory: ./.github/actions/stage 773 | - name: Run Stage 774 | id: stage 775 | uses: ./.github/actions/stage 776 | with: 777 | finished: ${{ join(needs.*.outputs.finished) }} 778 | from_artifact: true 779 | arm: true 780 | outputs: 781 | finished: ${{ steps.stage.outputs.finished }} 782 | build-arm-5: 783 | needs: build-arm-4 784 | runs-on: windows-2022 785 | steps: 786 | - name: Checkout 787 | uses: actions/checkout@v3 788 | with: 789 | submodules: 'recursive' 790 | - name: Init 791 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 792 | - name: Setup Stage 793 | run: npm install 794 | working-directory: ./.github/actions/stage 795 | - name: Run Stage 796 | id: stage 797 | uses: ./.github/actions/stage 798 | with: 799 | finished: ${{ join(needs.*.outputs.finished) }} 800 | from_artifact: true 801 | arm: true 802 | outputs: 803 | finished: ${{ steps.stage.outputs.finished }} 804 | build-arm-6: 805 | needs: build-arm-5 806 | runs-on: windows-2022 807 | steps: 808 | - name: Checkout 809 | uses: actions/checkout@v3 810 | with: 811 | submodules: 'recursive' 812 | - name: Init 813 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 814 | - name: Setup Stage 815 | run: npm install 816 | working-directory: ./.github/actions/stage 817 | - name: Run Stage 818 | id: stage 819 | uses: ./.github/actions/stage 820 | with: 821 | finished: ${{ join(needs.*.outputs.finished) }} 822 | from_artifact: true 823 | arm: true 824 | outputs: 825 | finished: ${{ steps.stage.outputs.finished }} 826 | build-arm-7: 827 | needs: build-arm-6 828 | runs-on: windows-2022 829 | steps: 830 | - name: Checkout 831 | uses: actions/checkout@v3 832 | with: 833 | submodules: 'recursive' 834 | - name: Init 835 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 836 | - name: Setup Stage 837 | run: npm install 838 | working-directory: ./.github/actions/stage 839 | - name: Run Stage 840 | id: stage 841 | uses: ./.github/actions/stage 842 | with: 843 | finished: ${{ join(needs.*.outputs.finished) }} 844 | from_artifact: true 845 | arm: true 846 | outputs: 847 | finished: ${{ steps.stage.outputs.finished }} 848 | build-arm-8: 849 | needs: build-arm-7 850 | runs-on: windows-2022 851 | steps: 852 | - name: Checkout 853 | uses: actions/checkout@v3 854 | with: 855 | submodules: 'recursive' 856 | - name: Init 857 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 858 | - name: Setup Stage 859 | run: npm install 860 | working-directory: ./.github/actions/stage 861 | - name: Run Stage 862 | id: stage 863 | uses: ./.github/actions/stage 864 | with: 865 | finished: ${{ join(needs.*.outputs.finished) }} 866 | from_artifact: true 867 | arm: true 868 | outputs: 869 | finished: ${{ steps.stage.outputs.finished }} 870 | build-arm-9: 871 | needs: build-arm-8 872 | runs-on: windows-2022 873 | steps: 874 | - name: Checkout 875 | uses: actions/checkout@v3 876 | with: 877 | submodules: 'recursive' 878 | - name: Init 879 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 880 | - name: Setup Stage 881 | run: npm install 882 | working-directory: ./.github/actions/stage 883 | - name: Run Stage 884 | id: stage 885 | uses: ./.github/actions/stage 886 | with: 887 | finished: ${{ join(needs.*.outputs.finished) }} 888 | from_artifact: true 889 | arm: true 890 | outputs: 891 | finished: ${{ steps.stage.outputs.finished }} 892 | build-arm-10: 893 | needs: build-arm-9 894 | runs-on: windows-2022 895 | steps: 896 | - name: Checkout 897 | uses: actions/checkout@v3 898 | with: 899 | submodules: 'recursive' 900 | - name: Init 901 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 902 | - name: Setup Stage 903 | run: npm install 904 | working-directory: ./.github/actions/stage 905 | - name: Run Stage 906 | id: stage 907 | uses: ./.github/actions/stage 908 | with: 909 | finished: ${{ join(needs.*.outputs.finished) }} 910 | from_artifact: true 911 | arm: true 912 | outputs: 913 | finished: ${{ steps.stage.outputs.finished }} 914 | build-arm-11: 915 | needs: build-arm-10 916 | runs-on: windows-2022 917 | steps: 918 | - name: Checkout 919 | uses: actions/checkout@v3 920 | with: 921 | submodules: 'recursive' 922 | - name: Init 923 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 924 | - name: Setup Stage 925 | run: npm install 926 | working-directory: ./.github/actions/stage 927 | - name: Run Stage 928 | id: stage 929 | uses: ./.github/actions/stage 930 | with: 931 | finished: ${{ join(needs.*.outputs.finished) }} 932 | from_artifact: true 933 | arm: true 934 | outputs: 935 | finished: ${{ steps.stage.outputs.finished }} 936 | build-arm-12: 937 | needs: build-arm-11 938 | runs-on: windows-2022 939 | steps: 940 | - name: Checkout 941 | uses: actions/checkout@v3 942 | with: 943 | submodules: 'recursive' 944 | - name: Init 945 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 946 | - name: Setup Stage 947 | run: npm install 948 | working-directory: ./.github/actions/stage 949 | - name: Run Stage 950 | id: stage 951 | uses: ./.github/actions/stage 952 | with: 953 | finished: ${{ join(needs.*.outputs.finished) }} 954 | from_artifact: true 955 | arm: true 956 | outputs: 957 | finished: ${{ steps.stage.outputs.finished }} 958 | build-arm-13: 959 | needs: build-arm-12 960 | runs-on: windows-2022 961 | steps: 962 | - name: Checkout 963 | uses: actions/checkout@v3 964 | with: 965 | submodules: 'recursive' 966 | - name: Init 967 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 968 | - name: Setup Stage 969 | run: npm install 970 | working-directory: ./.github/actions/stage 971 | - name: Run Stage 972 | id: stage 973 | uses: ./.github/actions/stage 974 | with: 975 | finished: ${{ join(needs.*.outputs.finished) }} 976 | from_artifact: true 977 | arm: true 978 | outputs: 979 | finished: ${{ steps.stage.outputs.finished }} 980 | build-arm-14: 981 | needs: build-arm-13 982 | runs-on: windows-2022 983 | steps: 984 | - name: Checkout 985 | uses: actions/checkout@v3 986 | with: 987 | submodules: 'recursive' 988 | - name: Init 989 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 990 | - name: Setup Stage 991 | run: npm install 992 | working-directory: ./.github/actions/stage 993 | - name: Run Stage 994 | id: stage 995 | uses: ./.github/actions/stage 996 | with: 997 | finished: ${{ join(needs.*.outputs.finished) }} 998 | from_artifact: true 999 | arm: true 1000 | outputs: 1001 | finished: ${{ steps.stage.outputs.finished }} 1002 | build-arm-15: 1003 | needs: build-arm-14 1004 | runs-on: windows-2022 1005 | steps: 1006 | - name: Checkout 1007 | uses: actions/checkout@v3 1008 | with: 1009 | submodules: 'recursive' 1010 | - name: Init 1011 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 1012 | - name: Setup Stage 1013 | run: npm install 1014 | working-directory: ./.github/actions/stage 1015 | - name: Run Stage 1016 | id: stage 1017 | uses: ./.github/actions/stage 1018 | with: 1019 | finished: ${{ join(needs.*.outputs.finished) }} 1020 | from_artifact: true 1021 | arm: true 1022 | outputs: 1023 | finished: ${{ steps.stage.outputs.finished }} 1024 | build-arm-16: 1025 | needs: build-arm-15 1026 | runs-on: windows-2022 1027 | steps: 1028 | - name: Checkout 1029 | uses: actions/checkout@v3 1030 | with: 1031 | submodules: 'recursive' 1032 | - name: Init 1033 | run: Copy-Item -Path . -Destination "C:\ungoogled-chromium-windows" -Recurse 1034 | - name: Setup Stage 1035 | run: npm install 1036 | working-directory: ./.github/actions/stage 1037 | - name: Run Stage 1038 | id: stage 1039 | uses: ./.github/actions/stage 1040 | with: 1041 | finished: ${{ join(needs.*.outputs.finished) }} 1042 | from_artifact: true 1043 | arm: true 1044 | outputs: 1045 | finished: ${{ steps.stage.outputs.finished }} 1046 | 1047 | publish-release: 1048 | needs: [build-16, build-x86-16, build-arm-16] 1049 | runs-on: ubuntu-latest 1050 | steps: 1051 | - name: Download package 1052 | uses: actions/download-artifact@v4 1053 | with: 1054 | name: chromium 1055 | - name: Download x86 package 1056 | uses: actions/download-artifact@v4 1057 | with: 1058 | name: chromium-x86 1059 | - name: Download arm package 1060 | uses: actions/download-artifact@v4 1061 | with: 1062 | name: chromium-arm 1063 | - name: Publish release 1064 | id: publish 1065 | uses: softprops/action-gh-release@v1 1066 | with: 1067 | fail_on_unmatched_files: true 1068 | files: | 1069 | ungoogled-chromium* 1070 | outputs: 1071 | assets: ${{ steps.publish.outputs.assets }} 1072 | publish-winget: 1073 | needs: publish-release 1074 | runs-on: windows-2022 1075 | steps: 1076 | - name: Checkout 1077 | uses: actions/checkout@v3 1078 | - name: Setup Stage 1079 | run: npm install 1080 | working-directory: ./.github/actions/winget 1081 | - name: Run Stage 1082 | id: stage 1083 | uses: ./.github/actions/winget 1084 | with: 1085 | token: ${{ secrets.PAT }} 1086 | version: ${{ github.ref_name }} 1087 | assets: ${{ needs.publish-release.outputs.assets }} 1088 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ungoogled-chromium"] 2 | path = ungoogled-chromium 3 | url = https://github.com/Eloston/ungoogled-chromium.git 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2022 The ungoogled-chromium Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ungoogled-chromium-windows 2 | 3 | Windows packaging for [ungoogled-chromium](//github.com/Eloston/ungoogled-chromium). 4 | 5 | ## Downloads 6 | 7 | [Download binaries from the Contributor Binaries website](//ungoogled-software.github.io/ungoogled-chromium-binaries/). 8 | 9 | Or install using `winget install --id=eloston.ungoogled-chromium -e`. 10 | 11 | **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. 12 | 13 | ## Building 14 | 15 | Google only supports [Windows 10 x64 or newer](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#system-requirements). These instructions are tested on Windows 10 Pro x64. 16 | 17 | NOTE: The default configuration will build 64-bit binaries for maximum security (TODO: Link some explanation). This can be changed to 32-bit by setting `target_cpu` to `"x86"` in `flags.windows.gn` or passing `--x86` as an argument to `build.py`. 18 | 19 | ### Setting up the build environment 20 | 21 | **IMPORTANT**: Please setup only what is referenced below. Do NOT setup other Chromium compilation tools like `depot_tools`, since we have a custom build process which avoids using Google's pre-built binaries. 22 | 23 | #### Setting up Visual Studio 24 | 25 | [Follow the "Visual Studio" section of the official Windows build instructions](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#visual-studio). 26 | 27 | * Make sure to read through the entire section and install/configure all the required components. 28 | * If your Visual Studio is installed in a directory other than the default, you'll need to set a few environment variables to point the toolchains to your installation path. (Copied from [instructions for Electron](https://electronjs.org/docs/development/build-instructions-windows)) 29 | * `vs2019_install = DRIVE:\path\to\Microsoft Visual Studio\2019\Community` (replace `2019` and `Community` with your installed versions) 30 | * `WINDOWSSDKDIR = DRIVE:\path\to\Windows Kits\10` 31 | * `GYP_MSVS_VERSION = 2019` (replace 2019 with your installed version's year) 32 | 33 | 34 | #### Other build requirements 35 | 36 | **IMPORTANT**: Currently, the `MAX_PATH` path length restriction (which is 260 characters by default) must be lifted in for our Python build scripts. This can be lifted in Windows 10 (v1607 or newer) with the official installer for Python 3.6 or newer (you will see a button at the end of installation to do this). See [Issue #345](https://github.com/Eloston/ungoogled-chromium/issues/345) for other methods for older Windows versions. 37 | 38 | 1. Setup the following: 39 | * 7-Zip 40 | * Python 3.8 or above 41 | * Can be installed using WinGet or the Microsoft Store. 42 | * If you don't plan on using the Microsoft Store version of Python: 43 | * Check "Add python.exe to PATH" before install. 44 | * At the end of the Python installer, click the button to lift the `MAX_PATH` length restriction. 45 | * Disable the `python3.exe` and `python.exe` aliases in `Settings > Apps > Advanced app settings > App execution aliases`. They will typically be referred to as "App Installer". See [this question on stackoverflow.com](https://stackoverflow.com/questions/57485491/python-python3-executes-in-command-prompt-but-does-not-run-correctly) to understand why. 46 | * Ensure that your Python directory either has a copy of Python named "python3.exe" or a symlink linking to the Python executable. 47 | * The `httplib2` module. This can be installed using `pip install`. 48 | * Make sure to lift the `MAX_PATH` length restriction, either by clicking the button at the end of the Python installer or by [following these instructions](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#:~:text=Enable,Later). 49 | * Git (to fetch all required ungoogled-chromium scripts) 50 | * During setup, make sure "Git from the command line and also from 3rd-party software" is selected. This is usually the recommended option. 51 | 52 | ### Building 53 | 54 | Run in `Developer Command Prompt for VS` (as administrator): 55 | 56 | ```cmd 57 | git clone --recurse-submodules https://github.com/ungoogled-software/ungoogled-chromium-windows.git 58 | cd ungoogled-chromium-windows 59 | # Replace TAG_OR_BRANCH_HERE with a tag or branch name 60 | git checkout --recurse-submodules TAG_OR_BRANCH_HERE 61 | python3 build.py 62 | python3 package.py 63 | ``` 64 | 65 | A zip archive and an installer will be created under `build`. 66 | 67 | **NOTE**: If the build fails, you must take additional steps before re-running the build: 68 | 69 | * If the build fails while downloading the Chromium source code (which is during `build.py`), it can be fixed by removing `build\download_cache` and re-running the build instructions. 70 | * If the build fails at any other point during `build.py`, it can be fixed by removing everything under `build` other than `build\download_cache` and re-running the build instructions. This will clear out all the code used by the build, and any files generated by the build. 71 | 72 | An efficient way to delete large amounts of files is using `Remove-Item PATH -Recurse -Force`. Be careful however, files deleted by that command will be permanently lost. 73 | 74 | ## Developer info 75 | 76 | ### First-time setup 77 | 78 | 1. [Setup MSYS2](http://www.msys2.org/) 79 | 2. Run the following in a "MSYS2 MSYS" shell: 80 | 81 | ```sh 82 | pacman -S quilt python3 vim tar dos2unix 83 | # By default, there doesn't seem to be a vi command for less, quilt edit, etc. 84 | ln -s /usr/bin/vim /usr/bin/vi 85 | ``` 86 | 87 | ### Updating patches and pruning list 88 | 89 | 1. Start `Developer Command Prompt for VS` and `MSYS2 MSYS` shell and navigate to source folder 90 | 1. `Developer Command Prompt for VS` 91 | * `cd c:\path\to\repo\ungoogled-chromium-windows` 92 | 1. `MSYS2 MSYS` 93 | * `cd /path/to/repo/ungoogled-chromium-windows` 94 | * You can use Git Bash to determine the path to this repo 95 | * Or, you can find it yourself via `//` 96 | 1. Retrieve downloads 97 | **`Developer Command Prompt for VS`** 98 | * `mkdir "build\download_cache"` 99 | * `python3 ungoogled-chromium\utils\downloads.py retrieve -i downloads.ini -c build\download_cache` 100 | 1. Clone sources 101 | **`Developer Command Prompt for VS`** 102 | * `python3 ungoogled-chromium\utils\clone.py -o build\src` 103 | 1. Check for rust version change (see below) 104 | 1. Update pruning list 105 | **`Developer Command Prompt for VS`** 106 | * `python3 ungoogled-chromium\devutils\update_lists.py -t build\src --domain-regex ungoogled-chromium\domain_regex.list` 107 | 1. Unpack downloads 108 | **`Developer Command Prompt for VS`** 109 | * `python3 ungoogled-chromium\utils\downloads.py unpack -i downloads.ini -c build\download_cache build\src` 110 | 1. Apply ungoogled-chromium patches 111 | **`Developer Command Prompt for VS`** 112 | * `python3 ungoogled-chromium\utils\patches.py apply --patch-bin build\src\third_party\git\usr\bin\patch.exe build\src ungoogled-chromium\patches` 113 | 1. Update windows patches 114 | **`MSYS2 MSYS`** 115 | 1. Setup shell to update patches 116 | * `source devutils/set_quilt_vars.sh` 117 | 1. Go into the source tree 118 | * `cd build/src` 119 | 1. Fix line breaks of files to patch 120 | * `grep -r ../../patches/ -e "^+++" | awk '{print substr($2,3)}' | xargs dos2unix` 121 | 1. Use quilt to refresh patches. See ungoogled-chromium's [docs/developing.md](https://github.com/Eloston/ungoogled-chromium/blob/master/docs/developing.md#updating-patches) section "Updating patches" for more details 122 | 1. Go back to repo root 123 | * `cd ../..` 124 | 1. Sanity checking for consistency in series file 125 | * `./devutils/check_patch_files.sh` 126 | 1. Use Git to add changes and commit 127 | 128 | ### Update dependencies 129 | 130 | **NOTE:** For all steps, update `downloads.ini` accordingly. 131 | 132 | 1. Check the [LLVM GitHub](https://github.com/llvm/llvm-project/releases/) for the latest version of LLVM. 133 | 1. Download `LLVM-*-win64.exe` file. 134 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 135 | 1. Check the esbuild version in file `build/src/third_party/devtools-frontend/src/DEPS` and find the closest release in the [esbuild GitHub](https://github.com/evanw/esbuild/releases) to it. 136 | * Example: `version:3@0.24.0.chromium.2` should be `0.24.0` 137 | 1. Check the ninja version in file `build/src/third_party/devtools-frontend/src/DEPS` and find the closest release in the [ninja GitHub](https://github.com/ninja-build/ninja/releases/) to it. 138 | 1. Download the `ninja-win.zip` file. 139 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 140 | 1. Check the [Git GitHub](https://github.com/git-for-windows/git/releases/) for the latest version of Git. 141 | 1. Get the SHA-256 checksum for `PortableGit--64-bit.7z.exe`. 142 | 1. Check for commit hash changes of `src` submodule in `third_party/microsoft_dxheaders` (e.g. using GitHub `https://github.com/chromium/chromium/tree//third_party/microsoft_dxheaders`). 143 | 1. Replace `version` with the Chromium version in `ungoogled-chromium/chromium_version.txt`. 144 | 1. Check the node version changes in `third_party/node/update_node_binaries` (e.g. using GitHub `https://github.com/chromium/chromium/tree//third_party/node/update_node_binaries`). 145 | 1. Download the "Standalone Binary" version from the [NodeJS website](https://nodejs.org/en/download). 146 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 147 | 1. Check for version changes of windows rust crate (`third_party/rust/windows_x86_64_msvc/`). 148 | 1. Download rust crate zip file. 149 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 150 | 1. Update `patches/ungoogled-chromium/windows/windows-fix-building-with-rust.patch` accordingly. 151 | 152 | ### Update rust 153 | 1. Check `RUST_REVISION` constant in file `tools/rust/update_rust.py` in build root. 154 | * Example: Revision could be `f7b43542838f0a4a6cfdb17fbeadf45002042a77` 155 | 1. Get date for nightly rust build from the Rust GitHub page: `https://github.com/rust-lang/rust/commit/f7b43542838f0a4a6cfdb17fbeadf45002042a77` 156 | 1. Replace `RUST_REVISION` with the obtained value 157 | 1. Adapt `downloads.ini` accordingly 158 | * Example: The above revision corresponds to the nightly build date `2025-03-14` (`YYYY-mm-dd`) 159 | 1. Download nightly rust build from: `https://static.rust-lang.org/dist//rust-nightly-x86_64-pc-windows-msvc.tar.gz` 160 | 1. Replace `build-date` with the obtained value 161 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 162 | 1. Extract archive 163 | 1. Execute `rustc\bin\rustc.exe -V` to get rust version string 164 | 1. Adapt `patches\ungoogled-chromium\windows\windows-fix-building-with-rust.patch` accordingly 165 | 1. Download nightly rust build from: `https://static.rust-lang.org/dist//rust-nightly-i686-pc-windows-msvc.tar.gz` 166 | 1. Replace `build-date` with the obtained value 167 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 168 | 1. Download nightly rust build from: `https://static.rust-lang.org/dist//rust-nightly-aarch64-pc-windows-msvc.tar.gz` 169 | 1. Replace `build-date` with the obtained value 170 | 1. Get the SHA-512 checksum using `sha512sum` in **`MSYS2 MSYS`**. 171 | ## License 172 | 173 | See [LICENSE](LICENSE) 174 | -------------------------------------------------------------------------------- /build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (c) 2019 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE file. 7 | """ 8 | ungoogled-chromium build script for Microsoft Windows 9 | """ 10 | 11 | import sys 12 | import time 13 | import argparse 14 | import os 15 | import re 16 | import shutil 17 | import subprocess 18 | import ctypes 19 | from pathlib import Path 20 | 21 | sys.path.insert(0, str(Path(__file__).resolve().parent / 'ungoogled-chromium' / 'utils')) 22 | import downloads 23 | import domain_substitution 24 | import prune_binaries 25 | import patches 26 | from _common import ENCODING, USE_REGISTRY, ExtractorEnum, get_logger 27 | sys.path.pop(0) 28 | 29 | _ROOT_DIR = Path(__file__).resolve().parent 30 | _PATCH_BIN_RELPATH = Path('third_party/git/usr/bin/patch.exe') 31 | 32 | 33 | def _get_vcvars_path(name='64'): 34 | """ 35 | Returns the path to the corresponding vcvars*.bat path 36 | 37 | As of VS 2017, name can be one of: 32, 64, all, amd64_x86, x86_amd64 38 | """ 39 | vswhere_exe = '%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe' 40 | result = subprocess.run( 41 | '"{}" -prerelease -latest -property installationPath'.format(vswhere_exe), 42 | shell=True, 43 | check=True, 44 | stdout=subprocess.PIPE, 45 | universal_newlines=True) 46 | vcvars_path = Path(result.stdout.strip(), 'VC/Auxiliary/Build/vcvars{}.bat'.format(name)) 47 | if not vcvars_path.exists(): 48 | raise RuntimeError( 49 | 'Could not find vcvars batch script in expected location: {}'.format(vcvars_path)) 50 | return vcvars_path 51 | 52 | 53 | def _run_build_process(*args, **kwargs): 54 | """ 55 | Runs the subprocess with the correct environment variables for building 56 | """ 57 | # Add call to set VC variables 58 | cmd_input = ['call "%s" >nul' % _get_vcvars_path()] 59 | cmd_input.append('set DEPOT_TOOLS_WIN_TOOLCHAIN=0') 60 | cmd_input.append(' '.join(map('"{}"'.format, args))) 61 | cmd_input.append('exit\n') 62 | subprocess.run(('cmd.exe', '/k'), 63 | input='\n'.join(cmd_input), 64 | check=True, 65 | encoding=ENCODING, 66 | **kwargs) 67 | 68 | 69 | def _run_build_process_timeout(*args, timeout): 70 | """ 71 | Runs the subprocess with the correct environment variables for building 72 | """ 73 | # Add call to set VC variables 74 | cmd_input = ['call "%s" >nul' % _get_vcvars_path()] 75 | cmd_input.append('set DEPOT_TOOLS_WIN_TOOLCHAIN=0') 76 | cmd_input.append(' '.join(map('"{}"'.format, args))) 77 | cmd_input.append('exit\n') 78 | with subprocess.Popen(('cmd.exe', '/k'), encoding=ENCODING, stdin=subprocess.PIPE, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP) as proc: 79 | proc.stdin.write('\n'.join(cmd_input)) 80 | proc.stdin.close() 81 | try: 82 | proc.wait(timeout) 83 | if proc.returncode != 0: 84 | raise RuntimeError('Build failed!') 85 | except subprocess.TimeoutExpired: 86 | print('Sending keyboard interrupt') 87 | for _ in range(3): 88 | ctypes.windll.kernel32.GenerateConsoleCtrlEvent(1, proc.pid) 89 | time.sleep(1) 90 | try: 91 | proc.wait(10) 92 | except: 93 | proc.kill() 94 | raise KeyboardInterrupt 95 | 96 | 97 | def _make_tmp_paths(): 98 | """Creates TMP and TEMP variable dirs so ninja won't fail""" 99 | tmp_path = Path(os.environ['TMP']) 100 | if not tmp_path.exists(): 101 | tmp_path.mkdir() 102 | tmp_path = Path(os.environ['TEMP']) 103 | if not tmp_path.exists(): 104 | tmp_path.mkdir() 105 | 106 | 107 | def main(): 108 | """CLI Entrypoint""" 109 | parser = argparse.ArgumentParser(description=__doc__) 110 | parser.add_argument( 111 | '--disable-ssl-verification', 112 | action='store_true', 113 | help='Disables SSL verification for downloading') 114 | parser.add_argument( 115 | '--7z-path', 116 | dest='sevenz_path', 117 | default=USE_REGISTRY, 118 | help=('Command or path to 7-Zip\'s "7z" binary. If "_use_registry" is ' 119 | 'specified, determine the path from the registry. Default: %(default)s')) 120 | parser.add_argument( 121 | '--winrar-path', 122 | dest='winrar_path', 123 | default=USE_REGISTRY, 124 | help=('Command or path to WinRAR\'s "winrar.exe" binary. If "_use_registry" is ' 125 | 'specified, determine the path from the registry. Default: %(default)s')) 126 | parser.add_argument( 127 | '--ci', 128 | action='store_true' 129 | ) 130 | parser.add_argument( 131 | '--x86', 132 | action='store_true' 133 | ) 134 | parser.add_argument( 135 | '--arm', 136 | action='store_true' 137 | ) 138 | parser.add_argument( 139 | '--tarball', 140 | action='store_true' 141 | ) 142 | args = parser.parse_args() 143 | 144 | # Set common variables 145 | source_tree = _ROOT_DIR / 'build' / 'src' 146 | downloads_cache = _ROOT_DIR / 'build' / 'download_cache' 147 | 148 | if not args.ci or not (source_tree / 'BUILD.gn').exists(): 149 | # Setup environment 150 | source_tree.mkdir(parents=True, exist_ok=True) 151 | downloads_cache.mkdir(parents=True, exist_ok=True) 152 | _make_tmp_paths() 153 | 154 | # Extractors 155 | extractors = { 156 | ExtractorEnum.SEVENZIP: args.sevenz_path, 157 | ExtractorEnum.WINRAR: args.winrar_path, 158 | } 159 | 160 | # Prepare source folder 161 | if args.tarball: 162 | # Download chromium tarball 163 | get_logger().info('Downloading chromium tarball...') 164 | download_info = downloads.DownloadInfo([_ROOT_DIR / 'ungoogled-chromium' / 'downloads.ini']) 165 | downloads.retrieve_downloads(download_info, downloads_cache, None, True, args.disable_ssl_verification) 166 | try: 167 | downloads.check_downloads(download_info, downloads_cache, None) 168 | except downloads.HashMismatchError as exc: 169 | get_logger().error('File checksum does not match: %s', exc) 170 | exit(1) 171 | 172 | # Unpack chromium tarball 173 | get_logger().info('Unpacking chromium tarball...') 174 | downloads.unpack_downloads(download_info, downloads_cache, None, source_tree, extractors) 175 | else: 176 | # Clone sources 177 | subprocess.run([sys.executable, str(Path('ungoogled-chromium', 'utils', 'clone.py')), '-o', 'build\\src', '-p', 'win32' if args.x86 else 'win-arm64' if args.arm else 'win64'], check=True) 178 | 179 | # Retrieve windows downloads 180 | get_logger().info('Downloading required files...') 181 | download_info_win = downloads.DownloadInfo([_ROOT_DIR / 'downloads.ini']) 182 | downloads.retrieve_downloads(download_info_win, downloads_cache, None, True, args.disable_ssl_verification) 183 | try: 184 | downloads.check_downloads(download_info_win, downloads_cache, None) 185 | except downloads.HashMismatchError as exc: 186 | get_logger().error('File checksum does not match: %s', exc) 187 | exit(1) 188 | 189 | # Prune binaries 190 | pruning_list = (_ROOT_DIR / 'ungoogled-chromium' / 'pruning.list') if args.tarball else (_ROOT_DIR / 'pruning.list') 191 | unremovable_files = prune_binaries.prune_files( 192 | source_tree, 193 | pruning_list.read_text(encoding=ENCODING).splitlines() 194 | ) 195 | if unremovable_files: 196 | get_logger().error('Files could not be pruned: %s', unremovable_files) 197 | parser.exit(1) 198 | 199 | # Unpack downloads 200 | DIRECTX = source_tree / 'third_party' / 'microsoft_dxheaders' / 'src' 201 | ESBUILD = source_tree / 'third_party' / 'devtools-frontend' / 'src' / 'third_party' / 'esbuild' 202 | if DIRECTX.exists(): 203 | shutil.rmtree(DIRECTX) 204 | DIRECTX.mkdir() 205 | if ESBUILD.exists(): 206 | shutil.rmtree(ESBUILD) 207 | ESBUILD.mkdir() 208 | get_logger().info('Unpacking downloads...') 209 | downloads.unpack_downloads(download_info_win, downloads_cache, None, source_tree, extractors) 210 | 211 | # Apply patches 212 | # First, ungoogled-chromium-patches 213 | patches.apply_patches( 214 | patches.generate_patches_from_series(_ROOT_DIR / 'ungoogled-chromium' / 'patches', resolve=True), 215 | source_tree, 216 | patch_bin_path=(source_tree / _PATCH_BIN_RELPATH) 217 | ) 218 | # Then Windows-specific patches 219 | patches.apply_patches( 220 | patches.generate_patches_from_series(_ROOT_DIR / 'patches', resolve=True), 221 | source_tree, 222 | patch_bin_path=(source_tree / _PATCH_BIN_RELPATH) 223 | ) 224 | 225 | # Substitute domains 226 | domain_substitution_list = (_ROOT_DIR / 'ungoogled-chromium' / 'domain_substitution.list') if args.tarball else (_ROOT_DIR / 'domain_substitution.list') 227 | domain_substitution.apply_substitution( 228 | _ROOT_DIR / 'ungoogled-chromium' / 'domain_regex.list', 229 | domain_substitution_list, 230 | source_tree, 231 | None 232 | ) 233 | 234 | # Check if rust-toolchain folder has been populated 235 | HOST_CPU_IS_64BIT = sys.maxsize > 2**32 236 | RUST_DIR_DST = source_tree / 'third_party' / 'rust-toolchain' 237 | RUST_DIR_SRC64 = source_tree / 'third_party' / 'rust-toolchain-x64' 238 | RUST_DIR_SRC86 = source_tree / 'third_party' / 'rust-toolchain-x86' 239 | RUST_DIR_SRCARM = source_tree / 'third_party' / 'rust-toolchain-arm' 240 | RUST_FLAG_FILE = RUST_DIR_DST / 'INSTALLED_VERSION' 241 | if not args.ci or not RUST_FLAG_FILE.exists(): 242 | # Directories to copy from source to target folder 243 | DIRS_TO_COPY = ['bin', 'lib'] 244 | 245 | # Loop over all source folders 246 | for rust_dir_src in [RUST_DIR_SRC64, RUST_DIR_SRC86, RUST_DIR_SRCARM]: 247 | # Loop over all dirs to copy 248 | for dir_to_copy in DIRS_TO_COPY: 249 | # Copy bin folder for host architecture 250 | if (dir_to_copy == 'bin') and (HOST_CPU_IS_64BIT != (rust_dir_src == RUST_DIR_SRC64)): 251 | continue 252 | 253 | # Create target dir 254 | target_dir = RUST_DIR_DST / dir_to_copy 255 | if not os.path.isdir(target_dir): 256 | os.makedirs(target_dir) 257 | 258 | # Loop over all subfolders of the rust source dir 259 | for cp_src in rust_dir_src.glob(f'*/{dir_to_copy}/*'): 260 | cp_dst = target_dir / cp_src.name 261 | if cp_src.is_dir(): 262 | shutil.copytree(cp_src, cp_dst, dirs_exist_ok=True) 263 | else: 264 | shutil.copy2(cp_src, cp_dst) 265 | 266 | # Generate version file 267 | with open(RUST_FLAG_FILE, 'w') as f: 268 | subprocess.run([source_tree / 'third_party' / 'rust-toolchain-x64' / 'rustc' / 'bin' / 'rustc.exe', '--version'], stdout=f) 269 | 270 | if not args.ci or not (source_tree / 'out/Default').exists(): 271 | # Output args.gn 272 | (source_tree / 'out/Default').mkdir(parents=True) 273 | gn_flags = (_ROOT_DIR / 'ungoogled-chromium' / 'flags.gn').read_text(encoding=ENCODING) 274 | gn_flags += '\n' 275 | windows_flags = (_ROOT_DIR / 'flags.windows.gn').read_text(encoding=ENCODING) 276 | if args.x86: 277 | windows_flags = windows_flags.replace('x64', 'x86') 278 | elif args.arm: 279 | windows_flags = windows_flags.replace('x64', 'arm64') 280 | gn_flags += windows_flags 281 | (source_tree / 'out/Default/args.gn').write_text(gn_flags, encoding=ENCODING) 282 | 283 | # Enter source tree to run build commands 284 | os.chdir(source_tree) 285 | 286 | if not args.ci or not os.path.exists('out\\Default\\gn.exe'): 287 | # Run GN bootstrap 288 | _run_build_process( 289 | sys.executable, 'tools\\gn\\bootstrap\\bootstrap.py', '-o', 'out\\Default\\gn.exe', 290 | '--skip-generate-buildfiles') 291 | 292 | # Run gn gen 293 | _run_build_process('out\\Default\\gn.exe', 'gen', 'out\\Default', '--fail-on-unused-args') 294 | 295 | if not args.ci or not os.path.exists('third_party\\rust-toolchain\\bin\\bindgen.exe'): 296 | # Build bindgen 297 | _run_build_process( 298 | sys.executable, 299 | 'tools\\rust\\build_bindgen.py') 300 | 301 | # Run ninja 302 | if args.ci: 303 | _run_build_process_timeout('third_party\\ninja\\ninja.exe', '-C', 'out\\Default', 'chrome', 304 | 'chromedriver', 'mini_installer', timeout=3.5*60*60) 305 | # package 306 | os.chdir(_ROOT_DIR) 307 | subprocess.run([sys.executable, 'package.py']) 308 | else: 309 | _run_build_process('third_party\\ninja\\ninja.exe', '-C', 'out\\Default', 'chrome', 310 | 'chromedriver', 'mini_installer') 311 | 312 | 313 | if __name__ == '__main__': 314 | main() 315 | -------------------------------------------------------------------------------- /devutils/check_patch_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | PLATFORM_ROOT=$(dirname $(dirname $(readlink -f ${BASH_SOURCE[0]}))) 4 | UNGOOGLED_REPO=$PLATFORM_ROOT/ungoogled-chromium 5 | 6 | $UNGOOGLED_REPO/devutils/check_patch_files.py -p $PLATFORM_ROOT/patches 7 | -------------------------------------------------------------------------------- /devutils/print_tag_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | _root_dir=$(dirname $(dirname $(readlink -f $0))) 4 | _ungoogled_repo=$_root_dir/ungoogled-chromium 5 | 6 | printf '%s-%s.%s' $(cat $_ungoogled_repo/chromium_version.txt) $(cat $_ungoogled_repo/revision.txt) $(cat $_root_dir/revision.txt) 7 | -------------------------------------------------------------------------------- /devutils/set_quilt_vars.sh: -------------------------------------------------------------------------------- 1 | # Sets quilt variables for updating the patches 2 | # Make sure to run this with the shell command "source" in order to inherit the variables into the interactive environment 3 | 4 | # There is some problem with the absolute paths in QUILT_PATCHES and QUILT_SERIES breaking quilt 5 | # (refresh and diff don't read QUILT_*_ARGS, and series displays absolute paths instead of relative) 6 | # Specifying a quiltrc file fixes this, so "--quiltrc -" fixes this too. 7 | # One side effect of '--quiltrc -' is that we lose default settings from /etc/quilt.quiltrc, so they are redefined below. 8 | alias quilt='quilt --quiltrc -' 9 | 10 | # Assume this script lives within devutils/ 11 | PLATFORM_ROOT=$(dirname $(dirname $(readlink -f ${BASH_SOURCE[0]}))) 12 | 13 | export QUILT_PATCHES="$PLATFORM_ROOT/patches" 14 | export QUILT_SERIES="series" 15 | 16 | # Options below borrowed from Debian and default quilt options (from /etc/quilt.quiltrc on Debian) 17 | export QUILT_PUSH_ARGS="--color=auto" 18 | export QUILT_DIFF_OPTS="--show-c-function" 19 | export QUILT_PATCH_OPTS="--unified --reject-format=unified" 20 | export QUILT_DIFF_ARGS="-p ab --no-timestamps --no-index --color=auto --sort" 21 | export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index --sort" 22 | export QUILT_COLORS="diff_hdr=1;32:diff_add=1;34:diff_rem=1;31:diff_hunk=1;33:diff_ctx=35:diff_cctx=33" 23 | export QUILT_SERIES_ARGS="--color=auto" 24 | export QUILT_PATCHES_ARGS="--color=auto" 25 | 26 | # When non-default less options are used, add the -R option so that less outputs 27 | # ANSI color escape codes "raw". 28 | [ -n "$LESS" -a -z "${QUILT_PAGER+x}" ] && export QUILT_PAGER="less -FRX" 29 | -------------------------------------------------------------------------------- /downloads.ini: -------------------------------------------------------------------------------- 1 | # Extra dependencies not included in the main Chromium source archive, and 2 | # additional build utilities to replace Google-provided ones. 3 | # Do note that utilities in here can be swapped with user-provided versions. 4 | 5 | # Uses a heavily modified syzygy code base to build swapimport.exe 6 | # Disabled import reordering for now since this is too much work to maintain 7 | #[third_party/syzygy] 8 | #version = bd0e67f571063e18e7200c72e6152a3a7e4c2a6d 9 | #url = https://github.com/Eloston/syzygy/archive/{version}.tar.gz 10 | #download_filename = syzygy-{version}.tar.gz 11 | #strip_leading_dirs = syzygy-{version} 12 | 13 | # Use a pre-built LLVM toolchain from LLVM for convenience 14 | # Developer notes: 15 | # * Releases of LLVM are available as "Clang for Windows (64-bit)" on LLVM's download page. 16 | # * If the current stable version of LLVM is causing problems with the build, try 17 | # matching Google's LLVM version (defined by the `CLANG_REVISION` variable in 18 | # tools/clang/scripts/update.py by downloading a snapshot build at the version specified 19 | # by `CLANG_REVISION` and `VERSION` constants in `tools/clang/scripts/update.py`. 20 | # For example, revision 123456 of LLVM 9.8.7 64-bit Windows would be: 21 | # `http://prereleases.llvm.org/win-snapshots/LLVM-9.8.7-r123456-win64.exe` 22 | # (link derived from [LLVM Snapshot Builds](http://llvm.org/builds/)) 23 | [llvm] 24 | version = 20.1.5 25 | #Uncomment when pre-release version is used. 26 | #url = https://prereleases.llvm.org/win-snapshots/LLVM-%(version)s-win64.exe 27 | #Uncomment the below instead when a new enough stable version of LLVM comes around 28 | url = https://github.com/llvm/llvm-project/releases/download/llvmorg-%(version)s/LLVM-%(version)s-win64.exe 29 | download_filename = LLVM-%(version)s-win64.exe 30 | sha512 = 2a8c86f5e17251303eb3e876f52711618abac59a4bd041e15f62893b73b30dab76af7d91018481ea1b472aa17f46891ed9c3b402be88d35a79ca0897eeddbd02 31 | extractor = 7z 32 | output_path = third_party/llvm-build/Release+Asserts 33 | 34 | # Pre-built GNU gperf from GnuWin32 35 | [gperf] 36 | version = 3.0.1 37 | url = https://sourceforge.net/projects/gnuwin32/files/gperf/%(version)s/gperf-%(version)s-bin.zip/download 38 | download_filename = gperf-%(version)s-bin.zip 39 | sha512 = 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9 40 | md5 = f67a2271f68894eeaa1984221d5ef5e5 41 | extractor = 7z 42 | output_path = third_party/gperf 43 | 44 | # Pre-built GNU bison from GnuWin32 45 | [bison-bin] 46 | version = 2.4.1 47 | url = https://sourceforge.net/projects/gnuwin32/files/bison/%(version)s/bison-%(version)s-bin.zip/download 48 | download_filename = bison-%(version)s-bin.zip 49 | md5 = 9d3ccf30fc00ba5e18176c33f45aee0e 50 | sha512 = ea8556c2be1497db96c84d627a63f9a9021423041d81210776836776f1783a91f47ac42d15c46510718d44f14653a2e066834fe3f3dbf901c3cdc98288d0b845 51 | extractor = 7z 52 | output_path = third_party/bison 53 | [bison-dep] 54 | version = 2.4.1 55 | url = https://sourceforge.net/projects/gnuwin32/files/bison/%(version)s/bison-%(version)s-dep.zip/download 56 | download_filename = bison-%(version)s-dep.zip 57 | md5 = 6558e5f418483b7c859643686008f475 58 | sha512 = f1ca0737cce547c3e6f9b59202a31b12bbc5a5626b63032b05d7abd9d0f55da68b33ff6015c65ca6c15eecd35c6b1461d19a24a880abcbb4448e09f2fabe2209 59 | extractor = 7z 60 | output_path = third_party/bison 61 | [bison-lib] 62 | version = 2.4.1 63 | url = https://sourceforge.net/projects/gnuwin32/files/bison/%(version)s/bison-%(version)s-lib.zip/download 64 | download_filename = bison-%(version)s-lib.zip 65 | md5 = c75406456f8d6584746769b1b4b828d6 66 | sha512 = 7400aa529c6ec412a67de1e96ae5cf43f59694fca69106eec9c6d28d04af30f20b5d4d73bdb5b53052ab848c9fb2925db684be1cf45cbbb910292bf6d1dda091 67 | extractor = 7z 68 | output_path = third_party/bison 69 | 70 | # Pre-built Ninja (build system) 71 | [ninja] 72 | version = 1.12.1 73 | url = https://github.com/ninja-build/ninja/releases/download/v%(version)s/ninja-win.zip 74 | download_filename = ninja-win-%(version)s.zip 75 | sha512 = d6715c6458d798bcb809f410c0364dabd937b5b7a3ddb4cd5aba42f9fca45139b2a8a3e7fd9fbd88fd75d298ed99123220b33c7bdc8966a9d5f2a1c9c230955f 76 | extractor = 7z 77 | output_path = third_party/ninja 78 | 79 | # Pre-built git 80 | [git] 81 | version = 2.49.0 82 | url = https://github.com/git-for-windows/git/releases/download/v%(version)s.windows.1/PortableGit-%(version)s-64-bit.7z.exe 83 | download_filename = PortableGit-%(version)s-64-bit.7z.exe 84 | sha512 = 7a91e563bf87ef09ee62c03b005ccadcc6565d36ac09f2397f773c1740a01dc6d3595d3a0afeeff2f86cb334267a6fd2ebf7b15666c623fae39aec477716e8a8 85 | extractor = 7z 86 | output_path = third_party/git 87 | 88 | # Pre-built Node.JS (LTS) 89 | [nodejs] 90 | version = 22.11.0 91 | url = https://nodejs.org/dist/v%(version)s/node-v%(version)s-win-x64.zip 92 | download_filename = node-v%(version)s-win-x64.zip 93 | sha512 = f483767b01f5fb9c6ad3ed06ef107f45f0699934c3ffcf89b56dcd1fa56292ae4301963e604659d58af3f1f598d5639b0c64199a2f8904e233d5a0e4171e59d0 94 | extractor = 7z 95 | output_path = third_party/node/win 96 | strip_leading_dirs=node-v%(version)s-win-x64 97 | 98 | # esbuild 99 | [esbuild] 100 | version = 0.25.1 101 | url = https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-%(version)s.tgz 102 | download_filename = esbuild-win32-x64-%(version)s.tgz 103 | sha512 = 63511075c7f031279037fba347955ac8b389d411da2beb2cca4d001333e30beb759484e0b2771c3ea1636fa57e2ec4e9ffd228bf8cac7e3c4b68627d44fb6456 104 | output_path = third_party/devtools-frontend/src/third_party/esbuild 105 | strip_leading_dirs=package 106 | 107 | # DirectX-Headers 108 | [directx-headers] 109 | version = d9020edfc69b789653e04fa2d8d10ee3317ffa56 110 | url = https://github.com/microsoft/DirectX-Headers/archive/%(version)s.zip 111 | download_filename = directx-headers-%(version)s.zip 112 | extractor = 7z 113 | output_path = third_party/microsoft_dxheaders/src 114 | strip_leading_dirs=DirectX-Headers-%(version)s 115 | 116 | # Rust 117 | [rust-x64] 118 | version = 2025-04-21 119 | url = https://static.rust-lang.org/dist/%(version)s/rust-nightly-x86_64-pc-windows-msvc.tar.gz 120 | download_filename = rust-nightly-%(version)s-x86_64-pc-windows-msvc.tar.gz 121 | sha512 = c48d2a459ec87cf12b92b2434f2397c01961dd554f3d01aef1ef773ea69630ceede33fe17b60de580064f746fae9eac5d6637b9f561a0856fb2b11dfbe3edbf6 122 | output_path = third_party/rust-toolchain-x64 123 | strip_leading_dirs=rust-nightly-x86_64-pc-windows-msvc 124 | [rust-x86] 125 | version = 2025-04-21 126 | url = https://static.rust-lang.org/dist/%(version)s/rust-nightly-i686-pc-windows-msvc.tar.gz 127 | download_filename = rust-nightly-%(version)s-i686-pc-windows-msvc.tar.gz 128 | sha512 = 26693974db960f755306ca528a1fc276bf4f12e57c31d0127061810e0825dd6615d53d3df067661ad6a2778628e6ed6414976287febbd58cdc8cd4e4a09abe33 129 | output_path = third_party/rust-toolchain-x86 130 | strip_leading_dirs=rust-nightly-i686-pc-windows-msvc 131 | [rust-arm] 132 | version = 2025-04-21 133 | url = https://static.rust-lang.org/dist/%(version)s/rust-nightly-aarch64-pc-windows-msvc.tar.gz 134 | download_filename = rust-nightly-%(version)s-aarch64-pc-windows-msvc.tar.gz 135 | sha512 = 2129e13f57b787370febdda68898259f3023a44853c663a306482f6e8560999b1765f5994f721165d93ecaf1756cff3d47dc73148d6690c31a275389d59d7702 136 | output_path = third_party/rust-toolchain-arm 137 | strip_leading_dirs=rust-nightly-aarch64-pc-windows-msvc 138 | [rust-windows-create] 139 | version = 0.52.0 140 | url = https://github.com/microsoft/windows-rs/archive/refs/tags/%(version)s.zip 141 | download_filename = rust-windows-create-%(version)s.zip 142 | sha512 = b505d45dfa201b0b2bf18aecea549fe72b60fbc7a2cb83d9319363e550585072cf87ce543ecf9e39d951dda2e60fcf3755bd75ead7096efdfa700f5faf781339 143 | extractor = 7z 144 | output_path = third_party/rust/chromium_crates_io/vendor -------------------------------------------------------------------------------- /flags.windows.gn: -------------------------------------------------------------------------------- 1 | chrome_pgo_phase=2 2 | enable_swiftshader=false 3 | ffmpeg_branding="Chrome" 4 | is_clang=true 5 | is_component_build=false 6 | is_debug=false 7 | is_official_build=true 8 | proprietary_codecs=true 9 | target_cpu="x64" 10 | use_sysroot=false 11 | dcheck_always_on=false 12 | blink_symbol_level=0 13 | v8_symbol_level=0 14 | symbol_level=0 15 | enable_rust=true 16 | enable_mse_mpeg2ts_stream_parser=true 17 | -------------------------------------------------------------------------------- /package.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved. 5 | # Use of this source code is governed by a BSD-style license that can be 6 | # found in the LICENSE file. 7 | """ 8 | ungoogled-chromium packaging script for Microsoft Windows 9 | """ 10 | 11 | import sys 12 | if sys.version_info.major < 3: 13 | raise RuntimeError('Python 3 is required for this script.') 14 | 15 | import argparse 16 | import os 17 | import platform 18 | from pathlib import Path 19 | import shutil 20 | 21 | sys.path.insert(0, str(Path(__file__).resolve().parent / 'ungoogled-chromium' / 'utils')) 22 | import filescfg 23 | from _common import ENCODING, get_chromium_version 24 | sys.path.pop(0) 25 | 26 | def _get_release_revision(): 27 | revision_path = Path(__file__).resolve().parent / 'ungoogled-chromium' / 'revision.txt' 28 | return revision_path.read_text(encoding=ENCODING).strip() 29 | 30 | def _get_packaging_revision(): 31 | revision_path = Path(__file__).resolve().parent / 'revision.txt' 32 | return revision_path.read_text(encoding=ENCODING).strip() 33 | 34 | _cached_target_cpu = None 35 | 36 | def _get_target_cpu(build_outputs): 37 | global _cached_target_cpu 38 | if not _cached_target_cpu: 39 | with open(build_outputs / 'args.gn', 'r') as f: 40 | args_gn_text = f.read() 41 | for cpu in ('x64', 'x86', 'arm64'): 42 | if f'target_cpu="{cpu}"' in args_gn_text: 43 | _cached_target_cpu = cpu 44 | break 45 | assert _cached_target_cpu 46 | return _cached_target_cpu 47 | 48 | def main(): 49 | """Entrypoint""" 50 | 51 | parser = argparse.ArgumentParser(description=__doc__) 52 | parser.add_argument( 53 | '--cpu-arch', 54 | metavar='ARCH', 55 | default=platform.architecture()[0], 56 | choices=('64bit', '32bit'), 57 | help=('Filter build outputs by a target CPU. ' 58 | 'This is the same as the "arch" key in FILES.cfg. ' 59 | 'Default (from platform.architecture()): %(default)s')) 60 | args = parser.parse_args() 61 | 62 | build_outputs = Path('build/src/out/Default') 63 | 64 | shutil.copyfile('build/src/out/Default/mini_installer.exe', 65 | 'build/ungoogled-chromium_{}-{}.{}_installer_{}.exe'.format( 66 | get_chromium_version(), _get_release_revision(), 67 | _get_packaging_revision(), _get_target_cpu(build_outputs))) 68 | 69 | timestamp = None 70 | try: 71 | with open('build/src/build/util/LASTCHANGE.committime', 'r') as ct: 72 | timestamp = int(ct.read()) 73 | except FileNotFoundError: 74 | pass 75 | 76 | output = Path('build/ungoogled-chromium_{}-{}.{}_windows_{}.zip'.format( 77 | get_chromium_version(), _get_release_revision(), 78 | _get_packaging_revision(), _get_target_cpu(build_outputs))) 79 | 80 | excluded_files = set([ 81 | Path('mini_installer.exe'), 82 | Path('mini_installer_exe_version.rc'), 83 | Path('setup.exe'), 84 | Path('chrome.packed.7z'), 85 | ]) 86 | files_generator = filescfg.filescfg_generator( 87 | Path('build/src/chrome/tools/build/win/FILES.cfg'), 88 | build_outputs, args.cpu_arch, excluded_files) 89 | filescfg.create_archive( 90 | files_generator, tuple(), build_outputs, output, timestamp) 91 | 92 | if __name__ == '__main__': 93 | main() 94 | -------------------------------------------------------------------------------- /patches/series: -------------------------------------------------------------------------------- 1 | ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch 2 | ungoogled-chromium/windows/windows-disable-win-build-output.patch 3 | ungoogled-chromium/windows/windows-disable-rcpy.patch 4 | ungoogled-chromium/windows/windows-fix-building-gn.patch 5 | ungoogled-chromium/windows/windows-disable-encryption.patch 6 | ungoogled-chromium/windows/windows-disable-machine-id.patch 7 | ungoogled-chromium/windows/windows-compile-mini-installer.patch 8 | ungoogled-chromium/windows/windows-no-unknown-warnings.patch 9 | ungoogled-chromium/windows/windows-fix-showIncludes.patch 10 | ungoogled-chromium/windows/windows-fix-rc.patch 11 | ungoogled-chromium/windows/windows-disable-event-log.patch 12 | ungoogled-chromium/windows/windows-fix-clang-format-exe.patch 13 | ungoogled-chromium/windows/windows-disable-rlz.patch 14 | ungoogled-chromium/windows/windows-fix-command-ids.patch 15 | ungoogled-chromium/windows/windows-disable-download-warning-prompt.patch 16 | ungoogled-chromium/windows/windows-fix-rc-terminating-error.patch 17 | ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch 18 | ungoogled-chromium/windows/windows-fix-generate-resource-allowed-list.patch 19 | ungoogled-chromium/windows/windows-disable-clang-version-check.patch 20 | ungoogled-chromium/windows/windows-fix-licenses-gn-path.patch 21 | ungoogled-chromium/windows/windows-fix-building-with-rust.patch 22 | ungoogled-chromium/windows/windows-fix-remove-unused-preferences-fields.patch 23 | ungoogled-chromium/windows/windows-fix-missing-includes.patch 24 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-compile-mini-installer.patch: -------------------------------------------------------------------------------- 1 | # To compile the mini-installer, a 7z archive of the browser has to be made. 2 | # Google's 7z executable gets purged, so we have to use the system's 7z executable. 3 | 4 | --- a/chrome/installer/mini_installer/BUILD.gn 5 | +++ b/chrome/installer/mini_installer/BUILD.gn 6 | @@ -194,7 +194,6 @@ action("mini_installer_archive") { 7 | "//chrome:chrome_dll", 8 | "//chrome/browser/extensions/default_extensions", 9 | "//chrome/chrome_elf", 10 | - "//chrome/common/win:eventlog_provider", 11 | "//chrome/installer/setup", 12 | "//third_party/icu:icudata", 13 | ] 14 | --- a/chrome/tools/build/win/create_installer_archive.py 15 | +++ b/chrome/tools/build/win/create_installer_archive.py 16 | @@ -224,12 +224,14 @@ def GenerateDiffPatch(options, orig_file 17 | 18 | 19 | def GetLZMAExec(build_dir): 20 | - executable = '7za' 21 | - if sys.platform == 'win32': 22 | - executable += '.exe' 23 | + # Taken from ungoogled-chromium's _extraction.py file, modified for Python 2 24 | + import winreg 25 | + sub_key_7zfm = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\7zFM.exe' 26 | 27 | - return os.path.join(build_dir, "..", "..", "third_party", "lzma_sdk", "bin", 28 | - "host_platform", executable) 29 | + with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, sub_key_7zfm) as key_handle: 30 | + sevenzipfm_dir = winreg.QueryValueEx(key_handle, 'Path')[0] 31 | + 32 | + return os.path.join(sevenzipfm_dir, "7z.exe") 33 | 34 | 35 | def GetPrevVersion(build_dir, temp_dir, last_chrome_installer, output_name): 36 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-clang-version-check.patch: -------------------------------------------------------------------------------- 1 | --- a/build/config/compiler/BUILD.gn 2 | +++ b/build/config/compiler/BUILD.gn 3 | @@ -1634,8 +1634,7 @@ config("compiler_deterministic") { 4 | } 5 | 6 | config("clang_revision") { 7 | - if (is_clang && clang_base_path == default_clang_base_path && 8 | - current_os != "zos") { 9 | + if (false) { 10 | _perform_consistency_checks = current_toolchain == default_toolchain 11 | if (llvm_force_head_revision) { 12 | _head_revision_stamp_path = "//third_party/llvm-build/force_head_revision" 13 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-download-warning-prompt.patch: -------------------------------------------------------------------------------- 1 | --- a/components/download/internal/common/download_item_impl.cc 2 | +++ b/components/download/internal/common/download_item_impl.cc 3 | @@ -2499,7 +2499,7 @@ void DownloadItemImpl::SetDangerType(Dow 4 | TRACE_EVENT_SCOPE_THREAD, "danger_type", 5 | GetDownloadDangerNames(danger_type).c_str()); 6 | } 7 | - danger_type_ = danger_type; 8 | + danger_type_ = DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS; 9 | } 10 | 11 | void DownloadItemImpl::SetFullPath(const base::FilePath& new_path) { 12 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-encryption.patch: -------------------------------------------------------------------------------- 1 | # Disable encryption of cookies, passwords, settings... 2 | # WARNING! Use ONLY if your hard drive is encrypted or if you know what you are doing. 3 | # See https://github.com/Eloston/ungoogled-chromium/issues/444 4 | 5 | --- a/chrome/browser/ungoogled_platform_flag_entries.h 6 | +++ b/chrome/browser/ungoogled_platform_flag_entries.h 7 | @@ -4,4 +4,8 @@ 8 | 9 | #ifndef CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 10 | #define CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 11 | + {"disable-encryption", 12 | + "Disable encryption", 13 | + "Disable encryption of cookies, passwords, and settings which uses a generated machine-specific encryption key. This is used to enable portable user data directories. ungoogled-chromium flag.", 14 | + kOsWin, SINGLE_VALUE_TYPE("disable-encryption")}, 15 | #endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 16 | --- a/components/os_crypt/async/browser/dpapi_key_provider.cc 17 | +++ b/components/os_crypt/async/browser/dpapi_key_provider.cc 18 | @@ -14,6 +14,7 @@ 19 | #include 20 | 21 | #include "base/base64.h" 22 | +#include "base/command_line.h" 23 | #include "base/logging.h" 24 | #include "base/metrics/histogram_functions.h" 25 | #include "base/notreached.h" 26 | @@ -41,6 +42,9 @@ constexpr uint8_t kDPAPIKeyPrefix[] = {' 27 | 28 | std::optional> DecryptKeyWithDPAPI( 29 | base::span ciphertext) { 30 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-encryption")) { 31 | + return std::vector(ciphertext.begin(), ciphertext.end()); 32 | + } 33 | DATA_BLOB input = {}; 34 | input.pbData = const_cast(ciphertext.data()); 35 | input.cbData = static_cast(ciphertext.size()); 36 | --- a/components/os_crypt/sync/os_crypt_win.cc 37 | +++ b/components/os_crypt/sync/os_crypt_win.cc 38 | @@ -9,6 +9,7 @@ 39 | #include "base/base64.h" 40 | #include "base/check.h" 41 | #include "base/check_op.h" 42 | +#include "base/command_line.h" 43 | #include "base/containers/span.h" 44 | #include "base/feature_list.h" 45 | #include "base/logging.h" 46 | @@ -50,6 +51,10 @@ constexpr char kDPAPIKeyPrefix[] = "DPAP 47 | 48 | bool EncryptStringWithDPAPI(const std::string& plaintext, 49 | std::string* ciphertext) { 50 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-encryption")) { 51 | + *ciphertext = plaintext; 52 | + return true; 53 | + } 54 | DATA_BLOB input; 55 | input.pbData = 56 | const_cast(reinterpret_cast(plaintext.data())); 57 | @@ -88,6 +93,11 @@ bool EncryptStringWithDPAPI(const std::s 58 | 59 | bool DecryptStringWithDPAPI(const std::string& ciphertext, 60 | std::string* plaintext) { 61 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-encryption")) { 62 | + *plaintext = ciphertext; 63 | + return true; 64 | + } 65 | + 66 | DATA_BLOB input; 67 | input.pbData = 68 | const_cast(reinterpret_cast(ciphertext.data())); 69 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-event-log.patch: -------------------------------------------------------------------------------- 1 | # Remove logging to the Windows Event Log 2 | # Workaround for compilation failure: https://github.com/ungoogled-software/ungoogled-chromium-windows/pull/46 3 | 4 | --- a/chrome/common/BUILD.gn 5 | +++ b/chrome/common/BUILD.gn 6 | @@ -124,7 +124,6 @@ source_set("request_code_constants") { 7 | static_library("common_lib") { 8 | visibility = [ 9 | ":*", 10 | - "//chrome/common/win:eventlog_messages", 11 | ] 12 | sources = [ 13 | "actor/actor_logging.h", 14 | @@ -370,7 +369,6 @@ static_library("common_lib") { 15 | "conflicts/remote_module_watcher_win.cc", 16 | "conflicts/remote_module_watcher_win.h", 17 | ] 18 | - deps += [ "//chrome/common/win:eventlog_messages" ] 19 | 20 | public_deps += [ 21 | "//components/dom_distiller/core", # Needed by chrome_content_client.cc. 22 | --- a/chrome/common/logging_chrome.cc 23 | +++ b/chrome/common/logging_chrome.cc 24 | @@ -68,7 +68,6 @@ 25 | #include "base/syslog_logging.h" 26 | #include "base/win/scoped_handle.h" 27 | #include "base/win/windows_handle_util.h" 28 | -#include "chrome/common/win/eventlog_messages.h" 29 | #include "chrome/install_static/install_details.h" 30 | #include "sandbox/policy/switches.h" 31 | #endif 32 | @@ -528,11 +527,6 @@ void InitChromeLogging(const base::Comma 33 | #if BUILDFLAG(IS_WIN) 34 | // Enable trace control and transport through event tracing for Windows. 35 | LogEventProvider::Initialize(kChromeTraceProviderName); 36 | - 37 | - // Enable logging to the Windows Event Log. 38 | - SetEventSource(base::WideToASCII( 39 | - install_static::InstallDetails::Get().install_full_name()), 40 | - BROWSER_CATEGORY, MSG_LOG_MESSAGE); 41 | #endif 42 | 43 | base::StatisticsRecorder::InitLogOnShutdown(); 44 | --- a/chrome/elevation_service/BUILD.gn 45 | +++ b/chrome/elevation_service/BUILD.gn 46 | @@ -95,7 +95,6 @@ source_set("service_lib") { 47 | deps = [ 48 | ":lib", 49 | "//base", 50 | - "//chrome/common/win:eventlog_provider", 51 | "//chrome/install_static:install_static_util", 52 | ] 53 | } 54 | --- a/chrome/elevation_service/elevation_service_delegate.cc 55 | +++ b/chrome/elevation_service/elevation_service_delegate.cc 56 | @@ -12,7 +12,6 @@ 57 | #include "base/containers/heap_array.h" 58 | #include "base/logging.h" 59 | #include "base/types/expected.h" 60 | -#include "chrome/common/win/eventlog_messages.h" 61 | #include "chrome/elevation_service/elevated_recovery_impl.h" 62 | #include "chrome/elevation_service/elevator.h" 63 | #include "chrome/install_static/install_util.h" 64 | @@ -20,11 +19,11 @@ 65 | namespace elevation_service { 66 | 67 | uint16_t Delegate::GetLogEventCategory() { 68 | - return ELEVATION_SERVICE_CATEGORY; 69 | + return 0; 70 | } 71 | 72 | uint32_t Delegate::GetLogEventMessageId() { 73 | - return MSG_ELEVATION_SERVICE_LOG_MESSAGE; 74 | + return 0; 75 | } 76 | 77 | base::expected, HRESULT> 78 | --- a/chrome/windows_services/elevated_tracing_service/BUILD.gn 79 | +++ b/chrome/windows_services/elevated_tracing_service/BUILD.gn 80 | @@ -94,7 +94,6 @@ source_set("service_lib") { 81 | ] 82 | deps = [ 83 | ":lib", 84 | - "//chrome/common/win:eventlog_provider", 85 | "//chrome/install_static:install_static_util", 86 | "//services/tracing/public/cpp", 87 | ] 88 | --- a/chrome/windows_services/elevated_tracing_service/elevated_tracing_service_delegate.cc 89 | +++ b/chrome/windows_services/elevated_tracing_service/elevated_tracing_service_delegate.cc 90 | @@ -15,7 +15,6 @@ 91 | #include "base/task/sequenced_task_runner.h" 92 | #include "base/task/thread_pool.h" 93 | #include "base/task/thread_pool/thread_pool_instance.h" 94 | -#include "chrome/common/win/eventlog_messages.h" 95 | #include "chrome/install_static/install_util.h" 96 | #include "chrome/windows_services/elevated_tracing_service/session_registry.h" 97 | #include "chrome/windows_services/elevated_tracing_service/system_tracing_session.h" 98 | @@ -79,11 +78,11 @@ Delegate::Delegate() = default; 99 | Delegate::~Delegate() = default; 100 | 101 | uint16_t Delegate::GetLogEventCategory() { 102 | - return TRACING_SERVICE_CATEGORY; 103 | + return 0; 104 | } 105 | 106 | uint32_t Delegate::GetLogEventMessageId() { 107 | - return MSG_TRACING_SERVICE_LOG_MESSAGE; 108 | + return 0; 109 | } 110 | 111 | base::expected, HRESULT> 112 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-machine-id.patch: -------------------------------------------------------------------------------- 1 | # Disable machine ID generation on Windows. 2 | # See https://github.com/Eloston/ungoogled-chromium/issues/444 3 | 4 | --- a/chrome/browser/ungoogled_platform_flag_entries.h 5 | +++ b/chrome/browser/ungoogled_platform_flag_entries.h 6 | @@ -8,4 +8,8 @@ 7 | "Disable encryption", 8 | "Disable encryption of cookies, passwords, and settings which uses a generated machine-specific encryption key. This is used to enable portable user data directories. ungoogled-chromium flag.", 9 | kOsWin, SINGLE_VALUE_TYPE("disable-encryption")}, 10 | + {"disable-machine-id", 11 | + "Disable machine ID", 12 | + "Disables use of a generated machine-specific ID to lock the user data directory to that machine. This is used to enable portable user data directories. ungoogled-chromium flag.", 13 | + kOsWin, SINGLE_VALUE_TYPE("disable-machine-id")}, 14 | #endif // CHROME_BROWSER_UNGOOGLED_PLATFORM_FLAG_ENTRIES_H_ 15 | --- a/components/metrics/machine_id_provider_win.cc 16 | +++ b/components/metrics/machine_id_provider_win.cc 17 | @@ -10,6 +10,7 @@ 18 | #include 19 | 20 | #include "base/base_paths.h" 21 | +#include "base/command_line.h" 22 | #include "base/files/file_path.h" 23 | #include "base/notreached.h" 24 | #include "base/path_service.h" 25 | @@ -20,6 +21,9 @@ namespace metrics { 26 | 27 | // static 28 | bool MachineIdProvider::HasId() { 29 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) { 30 | + return false; 31 | + } 32 | return true; 33 | } 34 | 35 | @@ -27,6 +31,10 @@ bool MachineIdProvider::HasId() { 36 | // is running from. 37 | // static 38 | std::string MachineIdProvider::GetMachineId() { 39 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) { 40 | + return std::string(); 41 | + } 42 | + 43 | base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, 44 | base::BlockingType::MAY_BLOCK); 45 | 46 | --- a/services/preferences/tracked/device_id_win.cc 47 | +++ b/services/preferences/tracked/device_id_win.cc 48 | @@ -10,12 +10,17 @@ 49 | 50 | #include 51 | 52 | +#include "base/command_line.h" 53 | #include "base/check.h" 54 | #include "base/containers/heap_array.h" 55 | 56 | MachineIdStatus GetDeterministicMachineSpecificId(std::string* machine_id) { 57 | DCHECK(machine_id); 58 | 59 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("disable-machine-id")) { 60 | + return MachineIdStatus::NOT_IMPLEMENTED; 61 | + } 62 | + 63 | wchar_t computer_name[MAX_COMPUTERNAME_LENGTH + 1] = {}; 64 | DWORD computer_name_size = std::size(computer_name); 65 | 66 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-rcpy.patch: -------------------------------------------------------------------------------- 1 | # Disable use of rc.py, which requires Google's rc.exe executable 2 | # This patch uses Microsoft's rc.exe to generate the resource files, and does not do any verifiation 3 | 4 | --- a/build/toolchain/win/tool_wrapper.py 5 | +++ b/build/toolchain/win/tool_wrapper.py 6 | @@ -168,10 +168,12 @@ class WinTool(object): 7 | """Converts .rc files to .res files.""" 8 | env = self._GetEnv(arch) 9 | args = list(args) 10 | - rcpy_args = args[:] 11 | - rcpy_args[0:1] = [sys.executable, os.path.join(BASE_DIR, 'rc', 'rc.py')] 12 | - rcpy_args.append('/showIncludes') 13 | - return subprocess.call(rcpy_args, env=env) 14 | + 15 | + if sys.platform == 'win32': 16 | + rc_exe_exit_code = subprocess.call(args, shell=True, env=env) 17 | + return rc_exe_exit_code 18 | + else: 19 | + raise RuntimeError('Must run on Windows.') 20 | 21 | def ExecActionWrapper(self, arch, rspfile, *dirname): 22 | """Runs an action command line from a response file using the environment 23 | --- a/chrome/app/chrome_dll.rc 24 | +++ b/chrome/app/chrome_dll.rc 25 | @@ -37,7 +37,7 @@ IDR_MAINFRAME ACCELERATORS 26 | BEGIN 27 | VK_BACK, IDC_BACK, VIRTKEY 28 | VK_LEFT, IDC_BACK, VIRTKEY, ALT 29 | -#if BUILDFLAG(ENABLE_PRINTING) 30 | +#if 1 31 | "P", IDC_BASIC_PRINT, VIRTKEY, CONTROL, SHIFT 32 | #endif 33 | "D", IDC_BOOKMARK_ALL_TABS, VIRTKEY, CONTROL, SHIFT 34 | @@ -166,12 +166,12 @@ END 35 | // the icon from the current module). We can perhaps work around this in the 36 | // future to get the icon from the .exe, which would save a copy. 37 | 38 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 39 | +#if 0 40 | IDR_MAINFRAME ICON "theme\google_chrome\win\chrome.ico" 41 | IDR_SXS ICON "theme\google_chrome\win\chrome_sxs.ico" 42 | IDR_X004_DEV ICON "theme\google_chrome\win\chrome_dev.ico" 43 | IDR_X005_BETA ICON "theme\google_chrome\win\chrome_beta.ico" 44 | -#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) 45 | +#elif 0 46 | IDR_MAINFRAME ICON "theme\google_chrome\google_chrome_for_testing\win\chrome.ico" 47 | #else 48 | IDR_MAINFRAME ICON "theme\chromium\win\chromium.ico" 49 | --- a/chrome/app/chrome_exe.rc 50 | +++ b/chrome/app/chrome_exe.rc 51 | @@ -24,9 +24,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U 52 | #pragma code_page(1252) 53 | #endif //_WIN32 54 | 55 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 56 | +#if 0 57 | IDENTITY LIMITEDACCESSFEATURE {L"google-chrome_0qgpfzgh1edfy"} 58 | -#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) 59 | +#elif 0 60 | IDENTITY LIMITEDACCESSFEATURE {L"google-chrome_0qgpfzgh1edfy"} 61 | #else 62 | IDENTITY LIMITEDACCESSFEATURE {L"chromium_b06a12530me7r"} 63 | @@ -43,7 +43,7 @@ IDENTITY LIMITEDACCESSFEATURE {L"chromiu 64 | // Note: chrome/installer/util/shell_util.cc depends on the order and number of 65 | // icons. To avoid breaking existing shortcuts, add new icons at the end 66 | // (following the ordering described above). 67 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 68 | +#if 0 69 | IDR_MAINFRAME ICON "theme\\google_chrome\\win\\chrome.ico" 70 | // These three are no longer used, but remain as placeholders. (They cannot be 71 | // removed, or existing shortcuts to the later resources will break.) 72 | @@ -53,7 +53,7 @@ IDR_MAINFRAME_4 ICON "them 73 | // The SXS icon must have an index of 4, the constant is used in Chrome code to 74 | // identify it. 75 | IDR_SXS ICON "theme\\google_chrome\\win\\chrome_sxs.ico" 76 | -#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) 77 | +#elif 0 78 | IDR_MAINFRAME ICON "theme\\google_chrome\\google_chrome_for_testing\\win\\chrome.ico" 79 | #else 80 | IDR_MAINFRAME ICON "theme\\chromium\\win\\chromium.ico" 81 | @@ -64,7 +64,7 @@ IDR_MAINFRAME ICON "them 82 | // should be incremented when a new icon is added. The icon indices in 83 | // chrome_icon_resources_win.h should also be updated. 84 | 85 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 86 | +#if 0 87 | IDR_X001_APP_LIST ICON "theme\\google_chrome\\win\\app_list.ico" 88 | IDR_X002_APP_LIST_SXS ICON "theme\\google_chrome\\win\\app_list_sxs.ico" 89 | IDR_X003_INCOGNITO ICON "theme\\google_chrome\\win\\incognito.ico" 90 | --- a/chrome/installer/setup/setup.rc 91 | +++ b/chrome/installer/setup/setup.rc 92 | @@ -58,7 +58,7 @@ IDI_SETUP ICON 93 | #endif // English (U.S.) resources 94 | ///////////////////////////////////////////////////////////////////////////// 95 | 96 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 97 | +#if 0 98 | 99 | ///////////////////////////////////////////////////////////////////////////// 100 | // 101 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-reorder-fix-linking.patch: -------------------------------------------------------------------------------- 1 | # Disable reordering imports 2 | 3 | --- a/chrome/BUILD.gn 4 | +++ b/chrome/BUILD.gn 5 | @@ -81,32 +81,6 @@ if (is_win && enable_resource_allowlist_ 6 | _chrome_resource_allowlist = "$target_gen_dir/chrome_resource_allowlist.txt" 7 | } 8 | 9 | -if (is_win) { 10 | - action("reorder_imports") { 11 | - script = "//build/win/reorder-imports.py" 12 | - 13 | - # initialexe/ is used so that the we can reorder imports and write back to 14 | - # the final destination at $root_out_dir/. 15 | - inputs = [ 16 | - "$root_out_dir/initialexe/chrome.exe", 17 | - "$root_out_dir/initialexe/chrome.exe.pdb", 18 | - ] 19 | - outputs = [ 20 | - "$root_out_dir/chrome.exe", 21 | - "$root_out_dir/chrome.exe.pdb", 22 | - ] 23 | - args = [ 24 | - "-i", 25 | - rebase_path("$root_out_dir/initialexe", root_build_dir), 26 | - "-o", 27 | - rebase_path("$root_out_dir", root_build_dir), 28 | - "-a", 29 | - current_cpu, 30 | - ] 31 | - deps = [ ":chrome_initial" ] 32 | - } 33 | -} 34 | - 35 | # This does not currently work. See crbug.com/1311822. 36 | # This target exists above chrome and it's main components in the dependency 37 | # tree as a central place to put assert_no_deps annotations. Since this depends 38 | @@ -144,17 +118,9 @@ if (!is_android && !is_mac) { 39 | # Windows-only deps are OK because chrome_initial uses initialexe/chrome as 40 | # the output name for that platform. 41 | # See crbug.com/1146571. 42 | - if (is_win) { 43 | - public_deps += [ ":reorder_imports" ] 44 | - data_deps += [ ":reorder_imports" ] 45 | - } 46 | } 47 | 48 | - if (is_win) { 49 | - _chrome_output_name = "initialexe/chrome" 50 | - } else { 51 | - _chrome_output_name = "chrome" 52 | - } 53 | + _chrome_output_name = "chrome" 54 | 55 | executable("chrome_initial") { 56 | configs -= [ "//build/config/compiler:thinlto_optimize_default" ] 57 | --- a/chrome/test/chromedriver/BUILD.gn 58 | +++ b/chrome/test/chromedriver/BUILD.gn 59 | @@ -500,11 +500,6 @@ python_library("chromedriver_py_tests") 60 | if (is_component_build && is_mac) { 61 | data_deps += [ "//chrome:chrome_framework" ] 62 | } 63 | - 64 | - if (is_win) { 65 | - # On Windows, the following target produces the final chrome.exe 66 | - data_deps += [ "//chrome:reorder_imports" ] 67 | - } 68 | } 69 | 70 | python_library("chromedriver_py_tests_headless_shell") { 71 | --- a/tools/perf/chrome_telemetry_build/BUILD.gn 72 | +++ b/tools/perf/chrome_telemetry_build/BUILD.gn 73 | @@ -52,10 +52,6 @@ group("telemetry_chrome_test") { 74 | data_deps += [ "//chrome" ] 75 | } 76 | 77 | - if (is_win) { 78 | - data_deps += [ "//chrome:reorder_imports" ] 79 | - } 80 | - 81 | if (is_linux || is_chromeos) { 82 | data_deps += [ "//third_party/breakpad:dump_syms" ] 83 | 84 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-rlz.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/installer/setup/BUILD.gn 2 | +++ b/chrome/installer/setup/BUILD.gn 3 | @@ -42,7 +42,6 @@ if (is_win) { 4 | "//components/crash/core/app:crash_export_thunks", 5 | "//components/crash/core/app:run_as_crashpad_handler", 6 | "//content/public/common:static_switches", 7 | - "//rlz:rlz_lib_no_network", 8 | "//url", 9 | ] 10 | 11 | --- a/chrome/installer/setup/uninstall.cc 12 | +++ b/chrome/installer/setup/uninstall.cc 13 | @@ -69,8 +69,6 @@ 14 | #include "chrome/installer/util/work_item.h" 15 | #include "chrome/windows_services/elevated_tracing_service/service_integration.h" 16 | #include "content/public/common/result_codes.h" 17 | -#include "rlz/lib/rlz_lib_clear.h" 18 | -#include "rlz/lib/supplementary_branding.h" 19 | 20 | using base::win::RegKey; 21 | 22 | @@ -113,22 +111,6 @@ void ProcessChromeWorkItems(const Instal 23 | work_item_list->Do(); 24 | } 25 | 26 | -void ClearRlzProductState() { 27 | - const rlz_lib::AccessPoint points[] = { 28 | - rlz_lib::CHROME_OMNIBOX, rlz_lib::CHROME_HOME_PAGE, 29 | - rlz_lib::CHROME_APP_LIST, rlz_lib::NO_ACCESS_POINT}; 30 | - 31 | - rlz_lib::ClearProductState(rlz_lib::CHROME, points); 32 | - 33 | - // If chrome has been reactivated, clear all events for this brand as well. 34 | - std::wstring reactivation_brand_wide; 35 | - if (GoogleUpdateSettings::GetReactivationBrand(&reactivation_brand_wide)) { 36 | - std::string reactivation_brand(base::WideToASCII(reactivation_brand_wide)); 37 | - rlz_lib::SupplementaryBranding branding(reactivation_brand.c_str()); 38 | - rlz_lib::ClearProductState(rlz_lib::CHROME, points); 39 | - } 40 | -} 41 | - 42 | // Removes all files from the installer directory. Returns false in case of an 43 | // error. 44 | bool RemoveInstallerFiles(const base::FilePath& installer_directory) { 45 | @@ -908,11 +890,6 @@ InstallStatus UninstallProduct(const Mod 46 | } 47 | } 48 | 49 | - // Chrome is not in use so lets uninstall Chrome by deleting various files 50 | - // and registry entries. Here we will just make best effort and keep going 51 | - // in case of errors. 52 | - ClearRlzProductState(); 53 | - 54 | auto_launch_util::DisableBackgroundStartAtLogin(); 55 | 56 | base::FilePath chrome_proxy_exe( 57 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-disable-win-build-output.patch: -------------------------------------------------------------------------------- 1 | # Disable verification of certain binary outputs against third_party/win_build_output. 2 | # The referenced binaries are pruned during binary pruning 3 | # Replace pruned binaries with files generated by third_party/win_build_output 4 | 5 | --- a/build/toolchain/win/midl.py 6 | +++ b/build/toolchain/win/midl.py 7 | @@ -6,6 +6,7 @@ from __future__ import division 8 | 9 | import array 10 | import difflib 11 | +import distutils.file_util 12 | import filecmp 13 | import io 14 | import operator 15 | @@ -444,41 +445,13 @@ def main(arch, gendir, outdir, dynamic_g 16 | if returncode != 0: 17 | return returncode 18 | 19 | - # Now compare the output in midl_output_dir to the copied-over outputs. 20 | + # Copy missing files (pruned binary .tlb files) to the output. 21 | _, mismatch, errors = filecmp.cmpfiles(midl_output_dir, outdir, common_files) 22 | assert not errors 23 | 24 | if mismatch: 25 | - print('midl.exe output different from files in %s, see %s' % 26 | - (outdir, midl_output_dir)) 27 | for f in mismatch: 28 | - if f.endswith('.tlb'): continue 29 | - fromfile = os.path.join(outdir, f) 30 | - tofile = os.path.join(midl_output_dir, f) 31 | - print(''.join( 32 | - difflib.unified_diff( 33 | - io.open(fromfile).readlines(), 34 | - io.open(tofile).readlines(), fromfile, tofile))) 35 | - 36 | - if dynamic_guids: 37 | - # |idl_template| can contain one or more occurrences of guids prefixed 38 | - # with 'PLACEHOLDER-GUID-'. We first remove the extraneous 39 | - # 'PLACEHOLDER-GUID-' prefix and then run MIDL on the substituted IDL 40 | - # file. 41 | - # No guid substitutions are done at this point, because we want to compile 42 | - # with the placeholder guids and then instruct the user to copy the output 43 | - # over to |source| which is typically src\third_party\win_build_output\. 44 | - # In future runs, the placeholder guids in |source| are replaced with the 45 | - # guids specified in |dynamic_guids|. 46 | - generate_idl_from_template(idl_template, None, idl) 47 | - returncode, midl_output_dir = run_midl(args, env_dict) 48 | - if returncode != 0: 49 | - return returncode 50 | - 51 | - print('To rebaseline:') 52 | - print(r' copy /y %s\* %s' % (midl_output_dir, source)) 53 | - return 1 54 | - 55 | + distutils.file_util.copy_file(os.path.join(midl_output_dir, f), outdir, preserve_times=False) 56 | return 0 57 | 58 | 59 | --- a/build/win/message_compiler.py 60 | +++ b/build/win/message_compiler.py 61 | @@ -121,24 +121,6 @@ def main(): 62 | header_contents += sorted(define_block, key=lambda s: s.split()[-1]) 63 | with open(header_file, 'wb') as f: 64 | f.write(b''.join(header_contents)) 65 | - 66 | - # mc.exe invocation and post-processing are complete, now compare the output 67 | - # in tmp_dir to the checked-in outputs. 68 | - diff = filecmp.dircmp(tmp_dir, source) 69 | - if diff.diff_files or set(diff.left_list) != set(diff.right_list): 70 | - print('mc.exe output different from files in %s, see %s' % (source, 71 | - tmp_dir)) 72 | - diff.report() 73 | - for f in diff.diff_files: 74 | - if f.endswith('.bin'): continue 75 | - fromfile = os.path.join(source, f) 76 | - tofile = os.path.join(tmp_dir, f) 77 | - print(''.join( 78 | - difflib.unified_diff( 79 | - open(fromfile).readlines(), 80 | - open(tofile).readlines(), fromfile, tofile))) 81 | - delete_tmp_dir = False 82 | - sys.exit(1) 83 | except subprocess.CalledProcessError as e: 84 | print(e.output) 85 | sys.exit(e.returncode) 86 | --- a/third_party/dawn/third_party/gn/dxc/build/message_compiler.py 87 | +++ b/third_party/dawn/third_party/gn/dxc/build/message_compiler.py 88 | @@ -140,24 +140,6 @@ def main(): 89 | key=lambda s: s.split()[-1]) 90 | with open(header_file, 'w') as f: 91 | f.write(''.join(header_contents)) 92 | - 93 | - # mc.exe invocation and post-processing are complete, now compare the output 94 | - # in tmp_dir to the checked-in outputs. 95 | - diff = filecmp.dircmp(tmp_dir, source) 96 | - if diff.diff_files or set(diff.left_list) != set(diff.right_list): 97 | - print('mc.exe output different from files in %s, see %s' % 98 | - (source, tmp_dir)) 99 | - diff.report() 100 | - for f in diff.diff_files: 101 | - if f.endswith('.bin'): continue 102 | - fromfile = os.path.join(source, f) 103 | - tofile = os.path.join(tmp_dir, f) 104 | - print(''.join( 105 | - difflib.unified_diff( 106 | - open(fromfile).readlines(), 107 | - open(tofile).readlines(), fromfile, tofile))) 108 | - delete_tmp_dir = False 109 | - sys.exit(1) 110 | except subprocess.CalledProcessError as e: 111 | print(e.output) 112 | sys.exit(e.returncode) 113 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-building-gn.patch: -------------------------------------------------------------------------------- 1 | # Fix building GN on Windows 2 | # Author: shiromichi on GitHub 3 | 4 | --- a/tools/gn/bootstrap/bootstrap.py 5 | +++ b/tools/gn/bootstrap/bootstrap.py 6 | @@ -69,7 +69,7 @@ def main(argv): 7 | else: 8 | build_rel = os.path.join('out', 'Release') 9 | out_dir = os.path.join(SRC_ROOT, build_rel) 10 | - gn_path = options.output or os.path.join(out_dir, 'gn') 11 | + gn_path = options.output or os.path.join(out_dir, 'gn.exe') 12 | gn_build_dir = os.path.join(out_dir, 'gn_build') 13 | ninja_binary = os.environ.get('NINJA', 'ninja') 14 | 15 | @@ -122,11 +122,11 @@ def main(argv): 16 | 17 | shutil.copy2( 18 | os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir) 19 | - cmd = [ninja_binary, '-C', gn_build_dir, 'gn'] 20 | + cmd = [ninja_binary, '-C', gn_build_dir, 'gn.exe'] 21 | if options.jobs: 22 | cmd += ['-j', str(options.jobs)] 23 | subprocess.check_call(cmd) 24 | - shutil.copy2(os.path.join(gn_build_dir, 'gn'), gn_path) 25 | + shutil.copy2(os.path.join(gn_build_dir, 'gn.exe'), gn_path) 26 | 27 | if not options.skip_generate_buildfiles: 28 | gn_gen_args = options.gn_gen_args or '' 29 | --- a/tools/gn/build/build_win.ninja.template 30 | +++ b/tools/gn/build/build_win.ninja.template 31 | @@ -1,5 +1,5 @@ 32 | rule cxx 33 | - command = $cxx /nologo /showIncludes /FC $includes $cflags /c $in /Fo$out 34 | + command = $cxx /utf-8 /nologo /showIncludes /FC $includes $cflags /c $in /Fo$out 35 | description = CXX $out 36 | deps = msvc 37 | 38 | --- a/tools/gn/build/gen.py 39 | +++ b/tools/gn/build/gen.py 40 | @@ -587,6 +587,7 @@ def WriteGNNinja(path, platform, host, o 41 | '/D_SCL_SECURE_NO_DEPRECATE', 42 | '/D_UNICODE', 43 | '/D_WIN32_WINNT=0x0A00', 44 | + '/D_LEGACY_CODE_ASSUMES_STRING_VIEW_INCLUDES_XSTRING', 45 | '/FS', 46 | '/W4', 47 | '/Zi', 48 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-building-with-rust.patch: -------------------------------------------------------------------------------- 1 | --- a/build/config/clang/BUILD.gn 2 | +++ b/build/config/clang/BUILD.gn 3 | @@ -276,8 +276,6 @@ clang_lib("compiler_builtins") { 4 | } else { 5 | assert(false, "unsupported target_platform=$target_platform") 6 | } 7 | - } else { 8 | - libname = "builtins" 9 | } 10 | } 11 | 12 | --- a/build/config/rust.gni 13 | +++ b/build/config/rust.gni 14 | @@ -59,7 +59,7 @@ declare_args() { 15 | # To use a custom toolchain instead, specify an absolute path to the root of 16 | # a Rust sysroot, which will have a 'bin' directory and others. Commonly 17 | # /.rustup/toolchains/nightly-- 18 | - rust_sysroot_absolute = "" 19 | + rust_sysroot_absolute = "//third_party/rust-toolchain" 20 | 21 | # Directory under which to find `bin/bindgen` (a `bin` directory containing 22 | # the bindgen exectuable). 23 | @@ -69,7 +69,7 @@ declare_args() { 24 | # set this to the output of `rustc -V`. Changing this string will cause all 25 | # Rust targets to be rebuilt, which allows you to update your toolchain and 26 | # not break incremental builds. 27 | - rustc_version = "" 28 | + rustc_version = "rustc 1.88.0-nightly (b8c54d635 2025-04-20)" 29 | 30 | # If you're using a Rust toolchain as specified by rust_sysroot_absolute, 31 | # you can specify whether it supports nacl here. 32 | --- a/third_party/rust/windows_aarch64_msvc/v0_52/BUILD.gn 33 | +++ b/third_party/rust/windows_aarch64_msvc/v0_52/BUILD.gn 34 | @@ -12,13 +12,13 @@ cargo_crate("lib") { 35 | crate_name = "windows_aarch64_msvc" 36 | epoch = "0.52" 37 | crate_type = "rlib" 38 | - crate_root = "//third_party/rust/chromium_crates_io/vendor/windows_aarch64_msvc-v0_52/src/lib.rs" 39 | - sources = [ "//third_party/rust/chromium_crates_io/vendor/windows_aarch64_msvc-v0_52/src/lib.rs" ] 40 | + crate_root = "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/aarch64_msvc/src/lib.rs" 41 | + sources = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/aarch64_msvc/src/lib.rs" ] 42 | inputs = [] 43 | 44 | build_native_rust_unit_tests = false 45 | edition = "2021" 46 | - cargo_pkg_version = "0.52.6" 47 | + cargo_pkg_version = "0.52.0" 48 | cargo_pkg_authors = "Microsoft" 49 | cargo_pkg_name = "windows_aarch64_msvc" 50 | cargo_pkg_description = "Import lib for Windows" 51 | @@ -29,12 +29,12 @@ cargo_crate("lib") { 52 | executable_configs += [ "//build/config/compiler:no_chromium_code" ] 53 | proc_macro_configs -= [ "//build/config/compiler:chromium_code" ] 54 | proc_macro_configs += [ "//build/config/compiler:no_chromium_code" ] 55 | - build_root = "//third_party/rust/chromium_crates_io/vendor/windows_aarch64_msvc-v0_52/build.rs" 56 | - build_sources = [ "//third_party/rust/chromium_crates_io/vendor/windows_aarch64_msvc-v0_52/build.rs" ] 57 | + build_root = "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/aarch64_msvc/build.rs" 58 | + build_sources = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/aarch64_msvc/build.rs" ] 59 | rustflags = [ 60 | "--cap-lints=allow", # Suppress all warnings in crates.io crates 61 | ] 62 | - native_libs = [ "//third_party/rust/chromium_crates_io/vendor/windows_aarch64_msvc-v0_52/src/../lib/windows.0.52.0.lib" ] 63 | + native_libs = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/aarch64_msvc/lib/windows.0.52.0.lib" ] 64 | 65 | # Only for usage from third-party crates. Add the crate to 66 | # //third_party/rust/chromium_crates_io/Cargo.toml to use 67 | --- a/third_party/rust/windows_i686_msvc/v0_52/BUILD.gn 68 | +++ b/third_party/rust/windows_i686_msvc/v0_52/BUILD.gn 69 | @@ -12,13 +12,13 @@ cargo_crate("lib") { 70 | crate_name = "windows_i686_msvc" 71 | epoch = "0.52" 72 | crate_type = "rlib" 73 | - crate_root = "//third_party/rust/chromium_crates_io/vendor/windows_i686_msvc-v0_52/src/lib.rs" 74 | - sources = [ "//third_party/rust/chromium_crates_io/vendor/windows_i686_msvc-v0_52/src/lib.rs" ] 75 | + crate_root = "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/i686_msvc/src/lib.rs" 76 | + sources = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/i686_msvc/src/lib.rs" ] 77 | inputs = [] 78 | 79 | build_native_rust_unit_tests = false 80 | edition = "2021" 81 | - cargo_pkg_version = "0.52.6" 82 | + cargo_pkg_version = "0.52.0" 83 | cargo_pkg_authors = "Microsoft" 84 | cargo_pkg_name = "windows_i686_msvc" 85 | cargo_pkg_description = "Import lib for Windows" 86 | @@ -29,12 +29,12 @@ cargo_crate("lib") { 87 | executable_configs += [ "//build/config/compiler:no_chromium_code" ] 88 | proc_macro_configs -= [ "//build/config/compiler:chromium_code" ] 89 | proc_macro_configs += [ "//build/config/compiler:no_chromium_code" ] 90 | - build_root = "//third_party/rust/chromium_crates_io/vendor/windows_i686_msvc-v0_52/build.rs" 91 | - build_sources = [ "//third_party/rust/chromium_crates_io/vendor/windows_i686_msvc-v0_52/build.rs" ] 92 | + build_root = "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/i686_msvc/build.rs" 93 | + build_sources = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/i686_msvc/build.rs" ] 94 | rustflags = [ 95 | "--cap-lints=allow", # Suppress all warnings in crates.io crates 96 | ] 97 | - native_libs = [ "//third_party/rust/chromium_crates_io/vendor/windows_i686_msvc-v0_52/src/../lib/windows.0.52.0.lib" ] 98 | + native_libs = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/i686_msvc/lib/windows.0.52.0.lib" ] 99 | 100 | # Only for usage from third-party crates. Add the crate to 101 | # //third_party/rust/chromium_crates_io/Cargo.toml to use 102 | --- a/third_party/rust/windows_x86_64_msvc/v0_52/BUILD.gn 103 | +++ b/third_party/rust/windows_x86_64_msvc/v0_52/BUILD.gn 104 | @@ -12,13 +12,13 @@ cargo_crate("lib") { 105 | crate_name = "windows_x86_64_msvc" 106 | epoch = "0.52" 107 | crate_type = "rlib" 108 | - crate_root = "//third_party/rust/chromium_crates_io/vendor/windows_x86_64_msvc-v0_52/src/lib.rs" 109 | - sources = [ "//third_party/rust/chromium_crates_io/vendor/windows_x86_64_msvc-v0_52/src/lib.rs" ] 110 | + crate_root = "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/x86_64_msvc/src/lib.rs" 111 | + sources = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/x86_64_msvc/src/lib.rs" ] 112 | inputs = [] 113 | 114 | build_native_rust_unit_tests = false 115 | edition = "2021" 116 | - cargo_pkg_version = "0.52.6" 117 | + cargo_pkg_version = "0.52.0" 118 | cargo_pkg_authors = "Microsoft" 119 | cargo_pkg_name = "windows_x86_64_msvc" 120 | cargo_pkg_description = "Import lib for Windows" 121 | @@ -29,12 +29,12 @@ cargo_crate("lib") { 122 | executable_configs += [ "//build/config/compiler:no_chromium_code" ] 123 | proc_macro_configs -= [ "//build/config/compiler:chromium_code" ] 124 | proc_macro_configs += [ "//build/config/compiler:no_chromium_code" ] 125 | - build_root = "//third_party/rust/chromium_crates_io/vendor/windows_x86_64_msvc-v0_52/build.rs" 126 | - build_sources = [ "//third_party/rust/chromium_crates_io/vendor/windows_x86_64_msvc-v0_52/build.rs" ] 127 | + build_root = "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/x86_64_msvc/build.rs" 128 | + build_sources = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/x86_64_msvc/build.rs" ] 129 | rustflags = [ 130 | "--cap-lints=allow", # Suppress all warnings in crates.io crates 131 | ] 132 | - native_libs = [ "//third_party/rust/chromium_crates_io/vendor/windows_x86_64_msvc-v0_52/src/../lib/windows.0.52.0.lib" ] 133 | + native_libs = [ "//third_party/rust/chromium_crates_io/vendor/windows-rs-0.52.0/crates/targets/x86_64_msvc/lib/windows.0.52.0.lib" ] 134 | 135 | # Only for usage from third-party crates. Add the crate to 136 | # //third_party/rust/chromium_crates_io/Cargo.toml to use 137 | --- a/tools/rust/build_bindgen.py 138 | +++ b/tools/rust/build_bindgen.py 139 | @@ -28,8 +28,7 @@ from update import (RmTree) 140 | 141 | # The git hash to use. 142 | BINDGEN_GIT_VERSION = 'f93d5dfa6d5d7409bea584f3eab38e1fc52b8360' 143 | -BINDGEN_GIT_REPO = ('https://chromium.googlesource.com/external/' + 144 | - 'github.com/rust-lang/rust-bindgen') 145 | +BINDGEN_GIT_REPO = ('https://github.com/rust-lang/rust-bindgen') 146 | 147 | BINDGEN_SRC_DIR = os.path.join(THIRD_PARTY_DIR, 'rust-toolchain-intermediate', 148 | 'bindgen-src') 149 | @@ -102,15 +101,8 @@ def RunCargo(cargo_args): 150 | f'the build_rust.py script builds rustc that is needed here.') 151 | sys.exit(1) 152 | 153 | - clang_bins_dir = os.path.join(RUST_HOST_LLVM_INSTALL_DIR, 'bin') 154 | - llvm_dir = RUST_HOST_LLVM_INSTALL_DIR 155 | - 156 | - if not os.path.exists(os.path.join(llvm_dir, 'bin', f'llvm-config{EXE}')): 157 | - print(f'Missing llvm-config in {llvm_dir}. This ' 158 | - f'script expects to be run after build_rust.py is run as ' 159 | - f'the build_rust.py script produces the LLVM libraries that ' 160 | - f'are needed here.') 161 | - sys.exit(1) 162 | + clang_bins_dir = os.path.join(THIRD_PARTY_DIR, 'llvm-build', 'Release+Asserts', 'bin') 163 | + llvm_dir = os.path.join(THIRD_PARTY_DIR, 'llvm-build', 'Release+Asserts') 164 | 165 | env = collections.defaultdict(str, os.environ) 166 | # Cargo normally stores files in $HOME. Override this. 167 | @@ -120,7 +112,6 @@ def RunCargo(cargo_args): 168 | env['RUSTC'] = rustc_bin 169 | 170 | # Use the LLVM libs and clang compiler from the rustc build. 171 | - env['LLVM_CONFIG_PATH'] = os.path.join(llvm_dir, 'bin', 'llvm-config') 172 | if sys.platform == 'win32': 173 | env['LIBCLANG_PATH'] = os.path.join(llvm_dir, 'bin') 174 | else: 175 | @@ -207,7 +198,7 @@ def main(): 176 | install_dir = os.path.join(RUST_TOOLCHAIN_OUT_DIR) 177 | print(f'Installing bindgen to {install_dir} ...') 178 | 179 | - llvm_dir = RUST_HOST_LLVM_INSTALL_DIR 180 | + llvm_dir = os.path.join(THIRD_PARTY_DIR, 'llvm-build', 'Release+Asserts') 181 | shutil.copy( 182 | os.path.join(build_dir, RustTargetTriple(), 'release', 183 | f'bindgen{EXE}'), os.path.join(install_dir, 'bin')) 184 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-building-without-safebrowsing.patch: -------------------------------------------------------------------------------- 1 | # Fix building without Safe Browsing on Windows 2 | # This also removes other unnecessary services that depend on Safe Browsing, such as Chrome Cleaner 3 | 4 | --- a/chrome/app/BUILD.gn 5 | +++ b/chrome/app/BUILD.gn 6 | @@ -41,10 +41,7 @@ source_set("chrome_dll_resources") { 7 | deps = [ ":command_ids" ] 8 | 9 | if (is_win) { 10 | - sources += [ 11 | - "chrome_dll.rc", 12 | - "etw_events/chrome_events_win.rc", 13 | - ] 14 | + sources += [ "chrome_dll.rc" ] 15 | 16 | deps += [ 17 | "//build:branding_buildflags", 18 | --- a/chrome/browser/chrome_content_browser_client.cc 19 | +++ b/chrome/browser/chrome_content_browser_client.cc 20 | @@ -5069,7 +5069,6 @@ std::wstring ChromeContentBrowserClient: 21 | #endif 22 | case sandbox::mojom::Sandbox::kPrintCompositor: 23 | case sandbox::mojom::Sandbox::kAudio: 24 | - case sandbox::mojom::Sandbox::kScreenAI: 25 | case sandbox::mojom::Sandbox::kSpeechRecognition: 26 | case sandbox::mojom::Sandbox::kPdfConversion: 27 | case sandbox::mojom::Sandbox::kService: 28 | @@ -5165,7 +5164,6 @@ bool ChromeContentBrowserClient::PreSpaw 29 | case sandbox::mojom::Sandbox::kPrintBackend: 30 | #endif 31 | case sandbox::mojom::Sandbox::kPrintCompositor: 32 | - case sandbox::mojom::Sandbox::kScreenAI: 33 | case sandbox::mojom::Sandbox::kAudio: 34 | case sandbox::mojom::Sandbox::kOnDeviceModelExecution: 35 | case sandbox::mojom::Sandbox::kSpeechRecognition: 36 | --- a/chrome/browser/safe_browsing/BUILD.gn 37 | +++ b/chrome/browser/safe_browsing/BUILD.gn 38 | @@ -7,6 +7,7 @@ import("//components/safe_browsing/build 39 | import("//extensions/buildflags/buildflags.gni") 40 | 41 | static_library("safe_browsing") { 42 | + sources = [ "safe_browsing_dummy.cc" ] 43 | if (false) { 44 | sources = [ 45 | "chrome_controller_client.cc", 46 | --- /dev/null 47 | +++ b/chrome/browser/safe_browsing/safe_browsing_dummy.cc 48 | @@ -0,0 +1,3 @@ 49 | +#ifndef __safe_browsing_dummy__ 50 | +#define __safe_browsing_dummy__ 51 | +#endif 52 | --- a/chrome/browser/signin/signin_util_win.cc 53 | +++ b/chrome/browser/signin/signin_util_win.cc 54 | @@ -285,12 +285,6 @@ bool IsGCPWUsedInOtherProfile(Profile* p 55 | } 56 | 57 | void SigninWithCredentialProviderIfPossible(Profile* profile) { 58 | - // This flow is used for first time signin through credential provider. Any 59 | - // subsequent signin for the credential provider user needs to go through 60 | - // reauth flow. 61 | - if (profile->GetPrefs()->GetBoolean(prefs::kSignedInWithCredentialProvider)) 62 | - return; 63 | - 64 | std::wstring cred_provider_gaia_id; 65 | std::wstring cred_provider_email; 66 | 67 | --- a/components/safe_browsing/buildflags.gni 68 | +++ b/components/safe_browsing/buildflags.gni 69 | @@ -19,6 +19,7 @@ declare_args() { 70 | } else { 71 | safe_browsing_mode = 1 72 | } 73 | + safe_browsing_mode = 0 74 | 75 | # Allows building without //third_party/unrar included, for license reasons 76 | safe_browsing_use_unrar = true 77 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-clang-format-exe.patch: -------------------------------------------------------------------------------- 1 | --- a/third_party/blink/renderer/bindings/scripts/generate_bindings.py 2 | +++ b/third_party/blink/renderer/bindings/scripts/generate_bindings.py 3 | @@ -11,6 +11,10 @@ import sys 4 | import web_idl 5 | import bind_gen 6 | 7 | +# shutil.copy 8 | +import shutil 9 | +import os 10 | + 11 | 12 | def parse_output_reldirs(reldirs): 13 | required = ['core', 'modules'] 14 | @@ -80,6 +84,11 @@ def parse_options(valid_tasks): 15 | 16 | 17 | def main(): 18 | + # This fix build issue on Windows caused by missing google dependencies. 19 | + if os.name == 'nt': 20 | + if not os.path.exists('../../buildtools/win/clang-format.exe'): 21 | + shutil.copy('../../third_party/llvm-build/Release+Asserts/bin/clang-format.exe', '../../buildtools/win') 22 | + 23 | dispatch_table = { 24 | 'async_iterator': bind_gen.generate_async_iterators, 25 | 'callback_function': bind_gen.generate_callback_functions, 26 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-command-ids.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/app/chrome_command_ids.h 2 | +++ b/chrome/app/chrome_command_ids.h 3 | @@ -68,15 +68,15 @@ 4 | #define IDC_MAXIMIZE_WINDOW 34047 5 | #define IDC_ALL_WINDOWS_FRONT 34048 6 | #define IDC_NAME_WINDOW 34049 7 | -#if BUILDFLAG(IS_CHROMEOS) 8 | +#if (0) 9 | #define IDC_TOGGLE_MULTITASK_MENU 34050 10 | #endif 11 | 12 | -#if BUILDFLAG(IS_LINUX) 13 | +#if (0) 14 | #define IDC_USE_SYSTEM_TITLE_BAR 34051 15 | #endif 16 | 17 | -#if BUILDFLAG(IS_LINUX) 18 | +#if (0) 19 | #define IDC_RESTORE_WINDOW 34052 20 | #endif 21 | 22 | @@ -90,7 +90,7 @@ 23 | #define IDC_WEB_APP_SETTINGS 34062 24 | #define IDC_WEB_APP_MENU_APP_INFO 34063 25 | 26 | -#if BUILDFLAG(IS_CHROMEOS) 27 | +#if (0) 28 | // Move window to other user commands 29 | #define IDC_VISIT_DESKTOP_OF_LRU_USER_2 34080 30 | #define IDC_VISIT_DESKTOP_OF_LRU_USER_3 34081 31 | @@ -496,7 +496,7 @@ 32 | #define IDC_MEDIA_ROUTER_TOGGLE_MEDIA_REMOTING 51208 33 | 34 | // Context menu items for media toolbar button 35 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 36 | +#if (0) 37 | #define IDC_MEDIA_TOOLBAR_CONTEXT_REPORT_CAST_ISSUE 51209 38 | #endif 39 | #define IDC_MEDIA_TOOLBAR_CONTEXT_SHOW_OTHER_SESSIONS 51210 40 | @@ -533,7 +533,7 @@ 41 | #define IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS 52411 42 | #define IDC_CONTENT_CONTEXT_ACCESSIBILITY_LABELS_TOGGLE_ONCE 52412 43 | 44 | -#if BUILDFLAG(IS_CHROMEOS) 45 | +#if (0) 46 | // Quick Answers context menu items. 47 | #define IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_ANSWER 52413 48 | #define IDC_CONTENT_CONTEXT_QUICK_ANSWERS_INLINE_QUERY 52414 49 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-generate-resource-allowed-list.patch: -------------------------------------------------------------------------------- 1 | # This patch is only required when the is_official_build=true is enabled in flags.windows.gn 2 | 3 | --- a/tools/resources/generate_resource_allowlist.py 4 | +++ b/tools/resources/generate_resource_allowlist.py 5 | @@ -61,7 +61,7 @@ def GetResourceAllowlistPDB(path): 6 | pdbutil = subprocess.Popen( 7 | [os.path.join(llvm_bindir, 'llvm-pdbutil'), 'dump', '-publics', path], 8 | stdout=subprocess.PIPE) 9 | - names = '' 10 | + names = set() 11 | for line in pdbutil.stdout: 12 | line = line.decode('utf8') 13 | # Read a line of the form 14 | @@ -75,31 +75,35 @@ def GetResourceAllowlistPDB(path): 15 | # Example: __profd_??$AllowlistedResource@$0BGPH@@ui@@YAXXZ 16 | # C++ mangled names are supposed to begin with `?`, so check for that. 17 | if 'AllowlistedResource' in sym_name and sym_name.startswith('?'): 18 | - names += sym_name + '\n' 19 | + names.add(sym_name) 20 | exit_code = pdbutil.wait() 21 | if exit_code != 0: 22 | raise Exception('llvm-pdbutil exited with exit code %d' % exit_code) 23 | 24 | - undname = subprocess.Popen([os.path.join(llvm_bindir, 'llvm-undname')], 25 | - stdin=subprocess.PIPE, 26 | - stdout=subprocess.PIPE) 27 | - stdout, _ = undname.communicate(names.encode('utf8')) 28 | resource_ids = set() 29 | - for line in stdout.split(b'\n'): 30 | - line = line.decode('utf8') 31 | - # Read a line of the form 32 | - # "void __cdecl ui::AllowlistedResource<5484>(void)". 33 | - prefix = ' ui::AllowlistedResource<' 34 | - pos = line.find(prefix) 35 | - if pos == -1: 36 | - continue 37 | - try: 38 | - resource_ids.add(int(line[pos + len(prefix):line.rfind('>')])) 39 | - except ValueError: 40 | - continue 41 | - exit_code = undname.wait() 42 | - if exit_code != 0: 43 | - raise Exception('llvm-undname exited with exit code %d' % exit_code) 44 | + for name in names: 45 | + undname = subprocess.Popen(['undname', name], 46 | + stdout=subprocess.PIPE) 47 | + found = False 48 | + for line in undname.stdout: 49 | + line = line.decode('utf8') 50 | + # Read a line of the form 51 | + # "void __cdecl ui::AllowlistedResource<5484>(void)". 52 | + prefix = ' ui::AllowlistedResource<' 53 | + pos = line.find(prefix) 54 | + if pos == -1: 55 | + continue 56 | + try: 57 | + resource_ids.add(int(line[pos + len(prefix):line.rfind('>')])) 58 | + except ValueError: 59 | + continue 60 | + found = True 61 | + break 62 | + exit_code = undname.wait() 63 | + if exit_code != 0: 64 | + raise Exception('llvm-undname exited with exit code %d' % exit_code) 65 | + if not found: 66 | + raise Exception('Unexpected undname output') 67 | return resource_ids 68 | 69 | 70 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-licenses-gn-path.patch: -------------------------------------------------------------------------------- 1 | --- a/tools/licenses/licenses.py 2 | +++ b/tools/licenses/licenses.py 3 | @@ -811,7 +811,7 @@ def _GnBinary(): 4 | elif sys.platform == 'darwin': 5 | subdir = 'mac' 6 | elif sys.platform == 'win32': 7 | - subdir, exe = 'win', 'gn.exe' 8 | + subdir, exe = os.path.join('..', 'out', 'Release', 'gn_build'), 'gn.exe' 9 | else: 10 | raise RuntimeError("Unsupported platform '%s'." % sys.platform) 11 | 12 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-missing-includes.patch: -------------------------------------------------------------------------------- 1 | --- a/third_party/blink/renderer/core/xml/xslt_extensions.cc 2 | +++ b/third_party/blink/renderer/core/xml/xslt_extensions.cc 3 | @@ -30,6 +30,7 @@ 4 | #include 5 | #include 6 | #include 7 | +#include 8 | 9 | #include "base/check.h" 10 | 11 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-rc-terminating-error.patch: -------------------------------------------------------------------------------- 1 | # The MSVC Resource Compiler truncates macro names at char 31. Therefore all BUILDFLAG ifdefs needs to be patched manually. 2 | 3 | --- a/build/build_config.h 4 | +++ b/build/build_config.h 5 | @@ -49,7 +49,7 @@ 6 | // ARCH_CPU_31_BITS / ARCH_CPU_32_BITS / ARCH_CPU_64_BITS 7 | // ARCH_CPU_BIG_ENDIAN / ARCH_CPU_LITTLE_ENDIAN 8 | 9 | -#ifndef BUILD_BUILD_CONFIG_H_ 10 | +#if !defined(BUILD_BUILD_CONFIG_H_) && !defined(RC_INVOKED) 11 | #define BUILD_BUILD_CONFIG_H_ 12 | 13 | #include "build/buildflag.h" // IWYU pragma: export 14 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-rc.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/web_applications/chrome_pwa_launcher/chrome_pwa_launcher_exe.rc 2 | +++ b/chrome/browser/web_applications/chrome_pwa_launcher/chrome_pwa_launcher_exe.rc 3 | @@ -1,6 +1,6 @@ 4 | #include "build/branding_buildflags.h" 5 | 6 | -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) 7 | +#if 0 8 | 1 ICON "..\\..\\..\\app\\theme\\google_chrome\\win\\chrome_pwa_launcher.ico" 9 | #else 10 | 1 ICON "chrome_pwa_launcher.ico" 11 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-remove-unused-preferences-fields.patch: -------------------------------------------------------------------------------- 1 | --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc 2 | +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc 3 | @@ -1835,9 +1835,6 @@ const PolicyToPreferenceMapEntry kSimple 4 | { key::kRendererAppContainerEnabled, 5 | prefs::kRendererAppContainerEnabled, 6 | base::Value::Type::BOOLEAN }, 7 | - { key::kBoundSessionCredentialsEnabled, 8 | - prefs::kBoundSessionCredentialsEnabled, 9 | - base::Value::Type::BOOLEAN }, 10 | { key::kBrowserLegacyExtensionPointsBlocked, 11 | prefs::kBlockBrowserLegacyExtensionPoints, 12 | base::Value::Type::BOOLEAN }, 13 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-fix-showIncludes.patch: -------------------------------------------------------------------------------- 1 | --- a/build/toolchain/win/toolchain.gni 2 | +++ b/build/toolchain/win/toolchain.gni 3 | @@ -204,15 +204,11 @@ template("msvc_toolchain") { 4 | 5 | # Disabled with cc_wrapper because of 6 | # https://github.com/mozilla/sccache/issues/1013 7 | - if (toolchain_is_clang && toolchain_cc_wrapper == "") { 8 | # This flag omits system includes from /showIncludes output, to reduce 9 | # the amount of data to parse and store in .ninja_deps. We do this on 10 | # non-Windows too, and already make sure rebuilds after winsdk/libc++/ 11 | # clang header updates happen via changing command line flags. 12 | - show_includes = "/showIncludes:user" 13 | - } else { 14 | show_includes = "/showIncludes" 15 | - } 16 | 17 | tool("cc") { 18 | precompiled_header_type = "msvc" 19 | -------------------------------------------------------------------------------- /patches/ungoogled-chromium/windows/windows-no-unknown-warnings.patch: -------------------------------------------------------------------------------- 1 | # Compiling Chromium 78 spams the console with unknown warnings. 2 | # This can be stopped by adding "-Wno-unknown-warning-option" to the cflags. 3 | 4 | --- a/build/config/win/BUILD.gn 5 | +++ b/build/config/win/BUILD.gn 6 | @@ -69,6 +69,7 @@ config("compiler") { 7 | if (is_clang) { 8 | cflags += [ 9 | "/Zc:twoPhase", 10 | + "-Wno-unknown-warning-option", 11 | 12 | # Consistently use backslash as the path separator when expanding the 13 | # __FILE__ macro when targeting Windows regardless of the build 14 | -------------------------------------------------------------------------------- /revision.txt: -------------------------------------------------------------------------------- 1 | 1 2 | --------------------------------------------------------------------------------