Closed Bug 1527796 Opened 9 months ago Closed 8 months ago

Support artifact build on windows, not WSL


(Firefox Build System :: Android Studio and Gradle Integration, enhancement, P5)



(firefox68 fixed)

Tracking Status
firefox68 --- fixed


(Reporter: m_kato, Assigned: m_kato)


(Blocks 1 open bug)



(6 files)

Full build will need a lot of hacks to use clang (not clang-cl) if using Windows since we have to compile host binaries. But artifact build doesn't need C/C++ compiler. So we can support artifact build of Android on Windows.

Since Windows doesn't call mach command from MSYS shell, we need python path
to call mach.

When installing JDK 1.8, it writes path to the following registry.

HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.8\JavaHome

So we use this registry to detect JDK installation path on Windows if available.

Depends on D20448

There is gradlew.bat to run gradle on Windows, so we should use it.

Depends on D20449

The file separator of Windows is backslash, not slash. So we have to convert
it to slash if necessary.

Depends on D20451

Since gradle doesn't run on sh.exe, it requires python path to run mach command . But gradle doesn't have a way to detect python.exe.

When using MozillaBuild, it sets MOZILLABUILD environment value, so we can
detect python path in MozillaBuild using it if available.

Depends on D20453

Since we add host parameter to java_search_paths, test_java_tool_checks is always failure due to no host function. So I need to set dummy host function.

Attachment #9053544 - Attachment description: Bug 1527796 - Part 6. Update since java_search_paths requries host. r?nalexander → Bug 1527796 - Part 6. Update since java_search_paths requries host. r?nalexander
Pushed by
Part 1. Add python.exe path to call mach shell script from python. r=nalexander
Part 2. Detect Java on Windows. r=nalexander,glandium
Part 3. Use gradlew.bat on Windows. r=nalexander
Part 4. Convert file separator to slash. r=nalexander
Part 5. Add python.exe path of mozilla-build to call mach command from gradle. r=nalexander
Part 6. Update since java_search_paths requries host. r=nalexander
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 68 → mozilla68
You need to log in before you can comment on or make changes to this bug.