Difference between revisions of "Mouse Lock Implementation FAQ"

From CDOT Wiki
Jump to: navigation, search
(How do I resolve the windows line ending error when trying to build FireFox?)
(How do I resolve the windows line ending error when trying to build FireFox?)
Line 41: Line 41:
 
The python code will not work because it's trying to look for a CVS directory that does not exist in the mozilla-central folder.
 
The python code will not work because it's trying to look for a CVS directory that does not exist in the mozilla-central folder.
  
'''Answer''': we should file a bug on this and get the script + error message fixed.  Ask on irc for tips on how to do this, or we can do on Tuesday.  In the meantime, make sure you are cloning your repo from git, and it shouldn't do this.
+
'''Answer''': This happens because the default setting for msys git on Windows is to checkout files with CRLF line endings. To fix this, you need to reinstall msys git and when you do, choose option 2 here http://help.github.com/images/bootcamp/bootcamp_1_win_install_7.jpg. Once you've reinstalled msys git, you need to checkout the repository with the correct LF line endings with the following commands: git ls-files -z | xargs -0 rm git checkout .
 
 
'''Answer 2''': you probably need to tell msys git (on Windows) to preserve unix line endings. You should reinstall msys git and when you do, choose option 2 here http://help.github.com/images/bootcamp/bootcamp_1_win_install_7.jpg.
 

Revision as of 08:38, 2 November 2011

Introduction

This page is a catch-all for questions about the work to implement Mouse Lock. Ask or answer any questions below using the style already started. Questions relating to anything around this work are acceptable (development issues, build problems, source code questions, spec issues, etc.). Don't be afraid, just ask! Don't judge others, just answer!

Questions

Why are we using github instead of Mozilla's Mercurial repo?

So that we don't have to learn yet another version control system. We've already learned git and github, why switch now? Mozilla's Mercurial repo is mirrored on github, and our repo is a fork of this. The main github repo (e.g., https://github.com/doublec/mozilla-central) gets updated regularly, so you can pull from it to keep your fork in sync.

How do I build Firefox?

See https://developer.mozilla.org/En/Developer_Guide/Build_Instructions

What's the difference between a DEBUG and RELEASE build?

With a DEBUG build you can attach a debugger or use various logging and instrumentation in order to see how your source code works. A RELEASE build removes this, and optimizes your code.

How do I create a DEBUG build?

You need to add info to your .mozconfig file, see https://developer.mozilla.org/en/Configuring_Build_Options

ac_add_options --disable-optimize
ac_add_options --enable-debug

How do I get my build to go faster?

Use Linux if you can (faster I/O), use more RAM if you can. Make sure you enable parallel make jobs so you can take advantage of your CPU cores. In your .mozconfig, add a j value that is 2*cores+1 or at least 2:

mk_add_options MOZ_MAKE_FLAGS=-j5

How do I resolve the windows line ending error when trying to build FireFox?

For more information, this is the error I get.

client.mk:121: *** This source tree appears to have Windows-style line endings. To convert it to Unix-style line endings, run "python mozilla/build/win32/mozilla-dos2unix.py".  Stop.

The python code will not work because it's trying to look for a CVS directory that does not exist in the mozilla-central folder.

Answer: This happens because the default setting for msys git on Windows is to checkout files with CRLF line endings. To fix this, you need to reinstall msys git and when you do, choose option 2 here http://help.github.com/images/bootcamp/bootcamp_1_win_install_7.jpg. Once you've reinstalled msys git, you need to checkout the repository with the correct LF line endings with the following commands: git ls-files -z | xargs -0 rm git checkout .