commandpromptfirefox-osb2g

Can not build the B2G desktop client (./mach build) ' . ' is not recognized as an internal


I'm trying to build the Mozilla B2G Desktop client by following this guide: https://developer.mozilla.org/en-US/Firefox_OS/Building_the_B2G_desktop_client.

I've already cloned the mozilla-central repository using: hg clone http://hg.mozilla.org/mozilla-central on the command prompt and it was successful.

Then I created the mozconfig file in the mozilla-central directory and the next step was to build the desktop client by running the command prompt from inside the mozilla-cental directory and the executing the following command: ./mach build but I haven't been able to get past this step because this is what the command prompt says when I try to run that command:

C:\Users\Droid\mozilla-central>./mach build
'.' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Droid\mozilla-central>

Can someone please help me get past this?


Solution

  • ./mach is a command that is supposed to be run in a sh-like shell, i.e. not cmd.exe.

    1. You need to install MozillaBuild. This brings a lot of different tools.
    2. Within the installation directory, there will be some start-shell*.bat files. Start the one which corresponds with your compiler. This will not only setup a proper environment but also start a sh-like shell (a Windows port of bash taken from msys, if anybody is curious).
    3. Navigate to your checkout folder.
    4. Setup mozconfig.
    5. ./mach build

    Please refer to the general Build instructions for further information.