We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation. If there's a problem with translations on this page, please let us know.

How to Compile OsmAndMapCreator and tools

В этой статье

Compile OsmAndMapCreator

  1. First setup the development environment, see How to Setup the Development Environment.
  2. Gradle (command line):
    • Compile with command line
    cd tools/java-tools && ../gradlew build
    
    • OsmAndMapCreator.zip will be produced with all scripts inside Note: android project is required to build tools (it uses OsmAnd-java project).
  3. Eclipse:
    • Preconfigure eclipse projects
    cd tools/java-tools && ../gradlew cleanEclipse eclipse
    
    • In Eclipse 'Import' - 'Existing projects in workspace' select folders 'OsmAnd-java', 'OsmAndMapCreatorutilities', 'OsmAndMapCreator', 'OsmAndServer', 'OsmAndServerUtilties'. Note: don't select top folder java-tools and instead select specified above projects.
  4. Android Studio / Idea Feel free to make pull request to this documentation and describe how it could be done.
  5. Main classes to execute from IDE:
    • net.osmand.MainUtilities - represents utilities.sh and leads to all possible utilties.
    • net.osmand.obf.BinaryInspector - inspector.sh utility to read OBF files and gives information about it.
    • net.osmand.obf.preparation.IndexCreator - shortcut to generate obf file.
    • net.osmand.swing.OsmExtractionUI - OsmAndMapCreator

Compile Native rendering library for OsmAndMapCreator

Native rendering library could be used to test Offline Rendering or Offline Native Routing. It's very useful to debug and test a rendering style or a routing configuration.

  1. First setup the development environment, see How to Setup the Development Environment.
  2. Choose a specific target for OS.
  3. Specify JAVA_HOME globally via $PATH or in command line
    export JAVA_HOME=<>
    
  4. Compile a specific version 'debug', 'release' or '' (default). Example
    cd core-legacy/targets
    ./intel-darwin.sh release # macOs release
    ./amd64-linux-clang.sh debug # linux debug - default
    cd ....baked # like intel-darwin-intel-darwin-clang-release.baked or amd64-linux-amd64-clang-release.baked
    make -j4
    
  5. Binaries will be available at core-legacy/binaries/. Example:
      core-legacy/binaries/darwin/intel/Debug/libosmand.dylib
    

Troubleshooting

  • Missing files externals/libjpeg-turbo/jconfigint.h.in does not exist. If you experience that libjpeg-turbo couldn't compile
targets/.cmake/../../externals/skia/upstream.patched/third_party/externals/libjpeg-turbo/jconfigint.h.in does not exist.

You can find the files here and put them in the specified folder https://github.com/osmandapp/OsmAnd-core/blob/legacy_core/externals/jpeg/jconfig.h https://github.com/osmandapp/OsmAnd-core/blob/legacy_core/externals/jpeg/jconfigint.h

Did this doc help you?

Privacy policy

Help us make these docs great!

All OsmAnd docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

Все еще нужна помощь?

Join OsmAnd community Поддержка