-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #1088 Macos build issues #1096
Open
OLFDB
wants to merge
67
commits into
navit-gps:trunk
Choose a base branch
from
OLFDB:macosbuild
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
9be1852
Merge pull request #7 from navit-gps/master
OLFDB a683b53
Merge pull request #8 from navit-gps/master
OLFDB 1d2b254
macosbuild
832daac
macosbuild
0241fe4
macosbuild
56c7f7d
macosbuild
2df2ec6
macosbuild
bd90261
macosbuild
dabcb3f
Added locales to bundle
OLFDB be09582
conditional vehicle/iphone: build it only when UIKit is available
OLFDB b78f880
create /usr/local/lib/navit
6184abc
Use this script on a Mac to setup the build environment and build navit
24f52c8
Changed build procedure
OLFDB 7c8fa5a
Copy whole macos bundle to /usr/local/bin
7ff14e5
added imagemagick
e09e1c2
changes to build
OLFDB c5d1849
Merge branch 'macosbuild' of https://github.com/OLFDB/navit into maco…
OLFDB 77e0b72
added gpsd
OLFDB 4fffff8
formatting, removed unmaintained info
OLFDB 4f94cd1
correction
OLFDB ef9b6dc
clean up
OLFDB 6e33c24
build macos target in seperate project to have all bundle files
OLFDB 27c4cfb
build macos target in seperate project to have all bundle files
OLFDB 88e6eef
applied astyle
OLFDB ba9cd87
fix
0f74a17
A desktop navit.xml using GTK gui as the default
OLFDB 8891fad
Changed install commands
0bca626
Changed install commands
b0e09b7
added
b88324b
changed install command
1cf5fda
start gpsd service
5547a36
added gpsd activation
OLFDB 76ba1b3
create
2e2d029
# WARNING: head commit changed in the meantime
OLFDB 30f7000
added make install
dcdd2a8
Use command say for speech
OLFDB 1281233
Update
OLFDB 348403a
Update
OLFDB bd2c68d
Update
OLFDB 171c177
update
OLFDB 60d671f
update
OLFDB 9c4e88b
update
OLFDB 9fd3cf2
update
OLFDB 603d795
update
OLFDB 0fc9770
Codestyle
OLFDB 0a98852
Merge branch 'trunk' into macosbuild
OLFDB 58bad51
When support/espeak is true the #include "event.h" takes the file from
OLFDB cec0be8
Merge branch 'trunk' into macosbuild
OLFDB 46411ac
Merge branch 'trunk' into macosbuild
OLFDB 8efc3f2
-DIOS=0 for macbuild
OLFDB 6744c9f
Updates for macos
OLFDB a315b58
Added CoreText and CoreImage libraries
OLFDB e6c21a6
Updates from ios build
OLFDB 94e1664
added -x objective-c for macos and ios build
OLFDB e439567
changed images_resource custom command
OLFDB d7574be
build a macos bundle
OLFDB adda6f5
ios changes
OLFDB a00d22e
Xcode warning and debug level
OLFDB b952ea9
Xcode warning
OLFDB 3145713
Check struct transformation is set
OLFDB fad676b
Changes for ios
OLFDB 1b572b2
Compatibility for macos and iOS
OLFDB c7fcca1
macos xslt file
OLFDB b36a050
Merge branch 'macosbuild' of https://github.com/OLFDB/navit into HEAD
OLFDB f60fc5e
astyle
OLFDB 65fb412
astyle
OLFDB 55c7e2b
astyle
OLFDB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this would define another project just for macos. I think we should avoid this and work with components within the main project and use cpack (part of cmake) to install everything where its needs to be |
||
project(macosbundle C) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add(navit CMAKE_ARGS | ||
-Dbinding/python=false SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/../) | ||
ExternalProject_Get_Property(navit BINARY_DIR) | ||
ExternalProject_Get_Property(navit SOURCE_DIR) | ||
|
||
install(DIRECTORY /usr/local/lib/navit/ DESTINATION ${BINARY_DIR}/navit.app/Contents/Resources) | ||
install(DIRECTORY ${BINARY_DIR}/navit/resources/share/navit/ DESTINATION ${BINARY_DIR}/navit.app/Contents/Resources/share) | ||
install(DIRECTORY ${BINARY_DIR}/navit//resources/share/locale DESTINATION ${BINARY_DIR}/navit.app/Contents/Resources/share) | ||
install(DIRECTORY ${BINARY_DIR}/navit/icons DESTINATION ${BINARY_DIR}/navit.app/Contents/Resources/share) | ||
install(DIRECTORY ${BINARY_DIR}/navit/textures DESTINATION ${BINARY_DIR}/navit.app/Contents/Resources/share) | ||
install(DIRECTORY ${BINARY_DIR}/navit/maps DESTINATION ${BINARY_DIR}/navit.app/Contents/Resources/share) | ||
install(DIRECTORY ${BINARY_DIR}/navit.app DESTINATION /usr/local/bin) | ||
Install(FILES ${SOURCE_DIR}navit/navit_shipped_gtkgui.xml DESTINATION ~/.navit RENAME navit.xml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,70 @@ | ||
================= | ||
MacOS Development | ||
================= | ||
|
||
Here are some notes about running navit under Apple Mac OSX. | ||
|
||
================================================================================================================================ | ||
WARNING: These instructions are currently unmaintained. Please feel free to submit a PR if you manage to build navit on Mac OSX. | ||
================================================================================================================================ | ||
Here are some notes about running navit under Apple macOS. | ||
|
||
What you will need | ||
================== | ||
|
||
You need Xcode Tools and MacPorts in order to install navit. | ||
|
||
MacPorts developers suggest to install Xcode Tools from http://developer.apple.com/tools/xcode/ and not from the Mac OSX install disk. | ||
See `Mac-How <http://www.mac-how.net/>`_ | ||
|
||
Make sure you don't have fink installed on your system, it can confuse MacPorts package building and installation. | ||
|
||
* GTK Gui: You should only need gtk2 and glib2 via macPorts | ||
* SDL Gui: Untested yet. | ||
|
||
Installation instruction | ||
======================== | ||
|
||
Download Xcode Tools from http://developer.apple.com/tools/xcode/ and install it with X11 SDK | ||
|
||
Download and Install MacPorts from http://www.macports.org/, or update your version | ||
|
||
.. code-block:: bash | ||
|
||
sudo port -d selfupdate | ||
|
||
Open up a terminal | ||
|
||
make sure your PATH variables has `/opt/local/bin` and `/opt/local/sbin` in it: | ||
------------------ | ||
|
||
.. code-block:: bash | ||
You need Xcode Tools and homebrew in order to install navit. | ||
|
||
echo $PATH | ||
.. code:: shell | ||
|
||
If you have macports or fink installed create and use a new user account | ||
to build navit. | ||
|
||
Install automake, wget, libtool, gpsd (if you want gps support), gtk2 and glib2 (for gkt GUI) with | ||
For convinience there is the script prepare_navit_macos.sh available | ||
under the navit/scripts directory. | ||
|
||
.. code-block:: bash | ||
.. code:: shell | ||
|
||
sudo port install automake wget gpsd gtk2 glib2 libtool | ||
$ curl https://raw.githubusercontent.com/OLFDB/navit/macosbuild/scripts/prepare_navit_macos.sh -o prepare_navit_macos.sh | ||
|
||
Download navit or checkout it from Git | ||
Then start the installation procedure: | ||
|
||
.. code-block:: bash | ||
.. code-block:: bash | ||
|
||
git clone [email protected]:navit-gps/navit.git | ||
$ sh prepare_navit_macos.sh | ||
|
||
You may also need a header file to handle endian issues (for PPC only) | ||
What is working | ||
--------------- | ||
|
||
.. code-block:: bash | ||
- internal Gui: Working, but problems with window refresh | ||
|
||
wget https://navit.svn.sourceforge.net/svnroot/navit/tags/R0_1_0/navit/projs/CodeBlocks/Win32Extra/byteswap.h | ||
- GTK Gui: Working. | ||
|
||
If you want to install navit along the MacPorts packages, you need to use the /opt/local directory as prefix: | ||
- SDL Gui: Untested yet. | ||
|
||
.. code-block:: bash | ||
GPSD | ||
---- | ||
|
||
./autogen.sh && ./configure --prefix=/opt/local --disable-binding-python | ||
You have to add the GPS receiver device to gpsd: | ||
|
||
type `make` to build NavIt, and `sudo make install` to install it. | ||
|
||
Then, you may edit and adapt your `navit.xml` file. The XML maptype is not supported, however normal Navit binfile works perfectly. | ||
GPSD_SOCKET="/usr/local/var/gpsd.sock" /usr/local/opt/gpsd/sbin/gpsdctl | ||
add /dev/tty.usbserial-XYZ | ||
|
||
Speech | ||
====== | ||
|
||
If you want (spoken) directions, get espeak from http://espeak.sourceforge.net, install as advised and use the following snippet in your navit.xml: | ||
|
||
.. code-block:: xml | ||
|
||
<speech type="cmdline" data="speak -vde+f4 '%s'"/> | ||
|
||
This will tell speak to use a female (f) german (de) voice. | ||
|
||
|
||
Using xcode | ||
=========== | ||
|
||
Download one of the `Git sources <https://github.com/navit-gps/navit>`_ that don't contain autogen.sh. | ||
|
||
Open X-Code and create a new project. Cocoa will suffice | ||
|
||
Add in a new target by clicking the triangle next to "Targets" and selected the location of the navit folder. Delete the previous target. | ||
|
||
Delete the default files, and add in the navit files. | ||
|
||
In a terminal, go into the navit folder. | ||
|
||
.. code-block:: bash | ||
------ | ||
|
||
./configure --disable-binding-python --disable-sample-map --disable-maptool | ||
If you want (spoken) directions, use the following snippet in your | ||
navit.xml: | ||
|
||
xcode can now build the navit | ||
.. code:: xml | ||
|
||
<speech type="cmdline" data="say '%s'"/> | ||
|
||
You can also use CMake. | ||
This will use the native say command. You can list all available voices | ||
by typing say -v ? in a terminal. Change the command to say -v | ||
<voicename> if you would like a non standard voice to be used. New | ||
voices can be added in system preferences->keyboard->dictation | ||
|
||
.. code-block:: bash | ||
Using Xcode | ||
----------- | ||
|
||
cd navit && cmake -G Xcode . | ||
cmake -G Xcode ../ -DUSE_PLUGINS=0 -DBUILD_MAPTOOL=1 -DXSLTS=macos | ||
-Dbinding/python=false -DCLANG_ENABLE_OBJC_WEAK=YES | ||
|
||
Something went wrong? | ||
===================== | ||
--------------------- | ||
|
||
Please let us know by filing an issue on Github or reach out on IRC. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// graphics_cocoa.h | ||
// graphics_cocoa | ||
// | ||
// Created by olf on 12.06.21. | ||
// | ||
|
||
#ifndef graphics_cocoa_h | ||
#define graphics_cocoa_h | ||
|
||
#if USE_UIKIT | ||
#import <UIKIT/UIKIT.h> | ||
#else | ||
#import <Cocoa/Cocoa.h> | ||
#endif | ||
|
||
CGContextRef current_context(void); | ||
|
||
#endif /* graphics_cocoa_h */ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all thank you for the feedback. I'm working on it.