Mobile/Gecko-iOS: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Building: note on building for simulator)
(Update status)
Line 9: Line 9:
  hg pull -B ios https://hg.mozilla.org/users/tmielczarek_mozilla.com/gecko-ios/
  hg pull -B ios https://hg.mozilla.org/users/tmielczarek_mozilla.com/gecko-ios/
  hg up ios
  hg up ios
n.b.: Due to weirdness with how our Mercurial sync works the bookmark may not be correct. You may have to just hg pull all the changesets and hg up to the latest changeset, which is currently 663bf89695dc.


= Building =
= Building =
Currently only building for the iOS simulator is working. There is a mozconfig to use in the tree under build/, and then you need to build an embedding app using XCode.
There are mozconfigs to use in the tree under build/. Use iphone-simulator-mozconfig to build for the simulator and iphone-device-debug-mozconfig to build for device. You also need to build an embedding app using XCode.


First, build Gecko:
First, build Gecko:
  export MOZCONFIG=`pwd`/build/iphone-simulator-mozconfig
  export MOZCONFIG=`pwd`/build/iphone-simulator-mozconfig
# or
export MOZCONFIG=`pwd`/build/iphone-device-debug-mozconfig
  ./mach build
  ./mach build


Next, open <code>embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj</code> in XCode. Change the target to some variant of the iOS simulator (click on the GeckoEmbed icon just beside the play and stop buttons), then select Product -> Build For -> Running. You should then be able to do Product -> Run if the build was successful, and the simulator should open eventually showing mozilla.org.
Next, open <code>embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj</code> in XCode. Change the target to some variant of the iOS simulator (click on the GeckoEmbed icon just beside the play and stop buttons), then select Product -> Build For -> Running. You should then be able to do Product -> Run if the build was successful, and the simulator should open eventually showing mozilla.org. To build for device select iPhone from that menu and follow the same steps.


The XCode project has an external build step to rebuild Gecko using <code>make binaries</code>, so once you've done a full Gecko build you can edit and rebuild from XCode.
The XCode project has an external build step to rebuild Gecko using <code>make binaries</code>, so once you've done a full Gecko build you can edit and rebuild from XCode.

Revision as of 02:32, 19 March 2015

Getting the source

Source is at https://hg.mozilla.org/users/tmielczarek_mozilla.com/gecko-ios/ . The changes are on a bookmark called *ios*. I am doing local development using changeset evolution, so be warned that the changesets in that repository will change over time.

To clone the repo:

hg clone https://hg.mozilla.org/users/tmielczarek_mozilla.com/gecko-ios/
hg up ios

To pull the repo into an existing clone:

hg pull -B ios https://hg.mozilla.org/users/tmielczarek_mozilla.com/gecko-ios/
hg up ios

n.b.: Due to weirdness with how our Mercurial sync works the bookmark may not be correct. You may have to just hg pull all the changesets and hg up to the latest changeset, which is currently 663bf89695dc.

Building

There are mozconfigs to use in the tree under build/. Use iphone-simulator-mozconfig to build for the simulator and iphone-device-debug-mozconfig to build for device. You also need to build an embedding app using XCode.

First, build Gecko:

export MOZCONFIG=`pwd`/build/iphone-simulator-mozconfig
# or
export MOZCONFIG=`pwd`/build/iphone-device-debug-mozconfig
./mach build

Next, open embedding/ios/GeckoEmbed/GeckoEmbed.xcodeproj in XCode. Change the target to some variant of the iOS simulator (click on the GeckoEmbed icon just beside the play and stop buttons), then select Product -> Build For -> Running. You should then be able to do Product -> Run if the build was successful, and the simulator should open eventually showing mozilla.org. To build for device select iPhone from that menu and follow the same steps.

The XCode project has an external build step to rebuild Gecko using make binaries, so once you've done a full Gecko build you can edit and rebuild from XCode.