+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ossohelpsource>
- <folder>
- <title>Maemo Mapper</title>
- <topic>
- <topictitle>Introduction</topictitle>
- <context contextUID="help_maemomapper_intro"/>
- <para>Welcome to Maemo Mapper.</para>
- <para>
- Maemo Mapper is a geographical mapping tool that can be used to:
- </para>
- <list>
- <listitem>
- Download map data to your device's main memory or to an external
- memory card.
- </listitem>
- <listitem>
- View that map data on the screen.
- </listitem>
- <listitem>
- Navigate that map data by panning around the screen and zooming in
- and out.
- </listitem>
- <listitem>
- Display your position and other GPS information from a GPS
- receiver.
- </listitem>
- <listitem>
- Store and display Point-of-Interest (POI) data.
- </listitem>
- <listitem>
- Download directions between arbitrary points on the map.
- </listitem>
- <listitem>
- Save or open track data or route data.
- </listitem>
- </list>
- <para>
- Use the <ref refid="help_maemomapper_" refdoc="index"/> to peruse the
- various sections of this help document, or go to <ref
- refid="help_maemomapper_getstarted" refdoc="Getting Started"/> to
- get up and running quickly.
- </para>
- </topic>
- <topic>
- <topictitle>Getting Started</topictitle>
- <context contextUID="help_maemomapper_getstarted"/>
- <para>
- When you first start Maemo Mapper, you will be presented with the
- <display_text>Settings</display_text> dialog box. Most of the
- settings have reasonable defaults, but if you have a GPS receiver,
- you should fill in the <display_text>MAC</display_text> field with
- the MAC address of your GPS receiver. If you don't know the MAC,
- turn on your GPS receiver and push the
- <display_text>Search</display_text> button. Maemo Mapper will
- attempt to automatically discover the MAC address of your receiver.
- For more information about the <display_text>Settings</display_text>
- dialog box, see <ref refid="help_maemomapper_settings"
- refdoc="Settings"/>.
- </para>
- <para>
- When you are finished setting up Maemo Mapper to your preferences,
- pressing the <display_text>Ok</display_text> button will lead you to
- another dialog box: the <display_text>Manage
- Repositories</display_text> dialog.
- </para>
- <para>
- To get started quickly, press the
- <display_text>Download...</display_text> button. Maemo Mapper will
- download a set of pre-defined repository information for you to use.
- If you use the pre-defined repositories, you can delete the
- <display_text>Default</display_text> repository. For more
- information about repositories and the <display_text>Manage
- Repositories</display_text> dialog, see
- <ref refid="help_maemomapper_repoman"
- refdoc="Managing Repositories"/>.
- </para>
- <para>
- Certain repositories (most notably, the commercial ones) may have
- license agreements attached with their use. It may be illegal to
- use a certain repository with Maemo Mapper or under certain
- conditions. This includes the repositories downloaded via the
- <display_text>Download...</display_text> button. If you are not
- sure if you are legally allowed to use a particular repository, you
- should delete it from your list of repositories. The authors of
- Maemo Mapper cannot be held responsible for your use of a particular
- repository.
- </para>
- <para>
- Once you have your Repositories set up the way you like, press the
- Ok button, and you will be presented with a blank screen, because
- you have not yet actually downloaded any map data to your device.
- To allow Maemo Mapper to automatically download map data as it
- becomes needed on the display, enable the
- <display_text>Auto-Download</display_text> checkbox in the
- <display_text>Maps</display_text> menu.
- </para>
- <para>
- If you have a working internet connection, Maemo Mapper will attempt
- to download maps and display them on the screen automatically as
- the downloads complete. You should see a map of the world. Be
- careful when you enable Auto-Download, because it can quickly fill
- your available disk space. See
- <ref refid="help_maemomapper_mapman" refdoc="Managing Maps"/> for
- details on how to manage disk space for a particular repository.
- </para>
- <heading>The Graphical User Interface</heading>
- <para>
- The main view of Maemo Mapper emphasizes simplicity. By default,
- the map is all that is displayed. You current position (if you have
- a GPS receiver) is indicated by a blue circle. The blue line
- extending from the blue circle indicates your current heading and
- speed. <i>Tracks</i> are red and represent where you have been.
- <i>Routes</i> are green and represent where you want to go, i.e.
- directions to a location.
- </para>
- <para>
- The hardware buttons on your device provide quick access to common
- functionality:
- </para>
- <list>
- <listitem>
- <graphic filename="2686KEY_full_screen"/> - Toggle
- Full-Screen Mode
- </listitem>
- <listitem>
- <graphic filename="2686KEY_zoom_in"/> - Zoom In - hold down to
- zoom multiple levels at a time
- </listitem>
- <listitem>
- <graphic filename="2686KEY_zoom_out"/> - Zoom Out - hold down to
- zoom multiple levels at a time
- </listitem>
- <listitem>
- <graphic filename="2686KEY_scroll_up"/> - Pan Up - hold down to
- scroll
- </listitem>
- <listitem>
- <graphic filename="2686KEY_scroll_down"/> - Pan Down - hold down
- to scroll
- </listitem>
- <listitem>
- <graphic filename="2686KEY_scroll_left"/> - Pan Left - hold down
- to scroll
- </listitem>
- <listitem>
- <graphic filename="2686KEY_scroll_right"/> - Pan Right - hold down
- to scroll
- </listitem>
- <listitem>
- <graphic filename="2686KEY_scroll_center"/> - Toggle
- <ref refid="Auto-Center" refdoc="Auto-Center"/>
- </listitem>
- <listitem>
- <graphic filename="2686KEY_esc"/> - Programmable; defaults
- to: Hide/Show Tracks and Routes
- </listitem>
- </list>
- <para>
- You can also pan around the map by tapping on the screen. Maemo
- Mapper will center the display on where you tapped. If you had
- <display_text>Auto-Center</display_text> enabled, tapping a location
- to center on it will automatically disable that functionality.
- </para>
- <para>
- From this point, you can use the menus to manage routes, tracks, and
- map data; to change the view; to change settings; or to see detailed
- GPS information (if you have a GPS receiver).
- </para>
- <para>
- There is also a context-sensitive menu that appears on the map when
- you tap and hold a location on the map. From that menu, you can
- download directions, calculate distances, or add/modify
- Point-of-Interest (POI) data.
- </para>
- <para>
- For help with any of these features, use the
- <ref refid="help_maemomapper_" refdoc="index"/>.
- </para>
- </topic>
- <topic>
- <topictitle>Main Menu</topictitle>
- <context contextUID="help_maemomapper_mainmenu"/>
- <para>
- This help topic describes the functionality of each of the menu
- items in Maemo Mapper.
- </para>
- <heading>Route</heading>
- <para>
- The <display_text>Route</display_text> menu is used to manipulate
- the current <i>route</i>. A route in Maemo Mapper is defined as a
- set of points and waypoints describing <i>where you would like to
- go</i>, e.g. driving directions from 123 Main Street to 456 Elm
- Street. It can include multiple segments. The current route is
- empty until you open or download a route.
- </para>
- <para>
- The <display_text>Route</display_text> menu has the following menu
- items:
- </para>
- <list>
- <listitem>
- <display_text>Open...</display_text> - Open a route from a GPX
- file on the file system. The opened route is <i>appended</i> to
- the current route, so you can string together different routes
- together to create a trip with multiple destinations.
- </listitem>
- <listitem>
- <display_text>Download...</display_text> - Download a route from
- the internet. See <ref refid="help_maemomapper_downroute"
- refdoc="Download Route"/> for more information.
- </listitem>
- <listitem>
- <display_text>Save...</display_text> - Save the current route to a
- GPX file on the file system.
- </listitem>
- <listitem>
- <display_text>Show Distance to Next Waypoint</display_text> - Show
- the distance left to be traveled (along the current route) until
- the next waypoint.
- </listitem>
- <listitem>
- <display_text>Show Distance to End of Route</display_text> - Show
- the distance left to be traveled (along the current route) until
- the end of the current route. The calculated distance includes
- the distance between breaks in the route (i.e. between the end of
- one route segment and the beginning of another route segment).
- </listitem>
- <listitem>
- <display_text>Reset</display_text> - Reset Maemo Mapper's tracking
- of your progress along the current route. Use this if Maemo
- Mapper loses track of where you are with respect to the current
- route.
- </listitem>
- <listitem>
- <display_text>Reset</display_text> - Clear the current route,
- effectively replacing it with an empty route.
- </listitem>
- </list>
- <heading>Track</heading>
- <para>
- The <display_text>Track</display_text> menu is used to manipulate
- your current <i>track</i>. A track in Maemo Mapper is defined as
- a set of points along which you have been traveling, i.e. <i>where
- you have been</i>. It can include multiple segments. Tracks are
- most useful if you have enabled a GPS receiver. The current track
- is empty until you get at least one valid position point from your
- GPS receiver, and it is appendeded to whenever you stray far enough
- from the last track point.
- </para>
- <para>
- The <display_text>Track</display_text> menu has the following menu
- items:
- </para>
- <list>
- <listitem>
- <display_text>Open...</display_text> - Open a track from a GPX
- file on the file system. In contrast to route data, the opened
- track is <i>prepended</i> to the current track, so if you are
- trying to rebuild previous track data, you must open the tracks
- backward in time (most recent tracks first).
- </listitem>
- <listitem>
- <display_text>Save...</display_text> - Save the current track to a
- GPX file on the file system.
- </listitem>
- <listitem>
- <display_text>Insert Break</display_text> - Artificially insert a
- break in your current track data. This simulates the loss and
- re-acquisition of a GPS fix, and it can be used to track, for
- example, refueling stops.
- </listitem>
- <listitem>
- <display_text>Insert Mark</display_text> - Artificially insert a
- mark with a description in your current track data. This can be
- used to mark important landmarks.
- </listitem>
- <listitem>
- <display_text>Show Distance from Last Break</display_text> - Show
- the distance traveled (along the current track) since the last
- break.
- </listitem>
- <listitem>
- <display_text>Show Distance from Beginning</display_text> - Show
- the distance traveled (along the current track) since the
- beginning of the track. The calculated distance includes the
- distance between breaks in the track (i.e. between when a GPS fix
- is lost and later re-acquired).
- </listitem>
- <listitem>
- <display_text>Clear</display_text> - Clear the current track,
- effectively replacing it with an empty track.
- </listitem>
- </list>
- <heading>Maps</heading>
- <para>
- The <display_text>Maps</display_text> menu is used to control your
- map repositories. This menu will be populated with a list of all of
- your map repositories, from which you can select to switch to a
- particular repository.
- </para>
- <para>
- The <display_text>Maps</display_text> menu has the following menu
- items in addition to the list of available repositories:
- </para>
- <list>
- <listitem>
- <display_text>Manage Maps...</display_text> - Download or delete
- maps for the currently selected repository. For more details, see
- <ref refid="help_maemomapper_mapman" refdoc="Managing Maps"/>.
- </listitem>
- <listitem>
- <display_text>Manage Repositories...</display_text> - Configure
- each of your available repositories, or add new ones. You can
- also download a pre-defined set of repositories. For more
- details, see <ref refid="help_maemomapper_repoman"
- refdoc="Managing Repositories"/>.
- </listitem>
- <listitem>
- <display_text>Auto-Download</display_text> - Toggle Maemo Mapper's
- ability to automatically download maps as they are needed in order
- to fill the screen with map data. This is useful for arbitrary
- exploration of the world while connected to the internet, or if
- you have a constant connection to the internet (i.e. via a
- cellular data service).
- </listitem>
- </list>
- <heading>View</heading>
- <para>
- The <display_text>View</display_text> menu allows you to customize
- the view by showing or hiding certain features of the display.
- </para>
- <para>
- The <display_text>View</display_text> menu has the following menu
- items:
- </para>
- <list>
- <listitem>
- <display_text>Zoom In</display_text> - Zoom in by one zoom level.
- You can also use the <graphic
- filename="2686KEY_zoom_in"/> button.
- </listitem>
- <listitem>
- <display_text>Zoom Out</display_text> - Zoom out by one zoom
- level. You can also use the <graphic
- filename="2686KEY_zoom_out"/> button.
- </listitem>
- <listitem>
- <display_text>Full Screen</display_text> - Toggle full-screen
- mode. You can also use the <graphic
- filename="2686KEY_full_screen"/> button to toggle
- full-screen mode.
- </listitem>
- <listitem>
- <display_text>Scale</display_text> - Toggle the display of the
- scale.
- </listitem>
- <listitem>
- <display_text>Route</display_text> - Toggle the display of routes.
- </listitem>
- <listitem>
- <display_text>Track</display_text> - Toggle the display of tracks.
- </listitem>
- <listitem>
- <display_text>Velocity Vector</display_text> - Toggle the display
- of the velocity vector (the blue line extending from the blue
- circle that represents your current location).
- </listitem>
- <listitem>
- <display_text>POIs</display_text> - Toggle the display of POIs.
- </listitem>
- <listitem>
- <display_text>POI Categories...</display_text> - Define POI
- categories and which categories are displayed on the map. For
- more details, see <ref refid="help_maemomapper_poicat" refdoc="POI
- Categories"/>.
- </listitem>
- </list>
- <heading>Auto-Center</heading>
- <para>
- The <display_text>Auto-Center</display_text> menu is used to control
- whether or not Maemo Mapper should re-center the display as your
- current location changes. The sensitivity of re-centering (how
- close you get to the edge of the display before Maemo Mapper
- re-centers the display) can be configured in the <ref
- refid="help_maemomapper_settings" refdoc="Settings"/> Dialog.
- </para>
- <para>
- There are three different modes of Auto-Center:
- </para>
- <list>
- <listitem>
- <display_text>Lat/Lon</display_text> - Keep your location centered
- on the display.
- </listitem>
- <listitem>
- <display_text>Lead</display_text> - Depending on your speed, keep
- a location in front of you centered on the screen. The faster you
- are going, the more lead distance is used.
- </listitem>
- <listitem>
- <display_text>None</display_text> - Do no re-center the display
- automatically.
- </listitem>
- </list>
- <heading>Go to</heading>
- <para>
- The <display_text>Go to</display_text> menu is used to center the
- view on a particular location.
- </para>
- <para>
- The <display_text>Go to</display_text> menu has the following menu
- items:
- </para>
- <list>
- <listitem>
- <display_text>Lat/Lon...</display_text> - Specify an exact
- Latitude and Longitude on which to center the display.
- </listitem>
- <listitem>
- <display_text>GPS Position</display_text> - Center the display on
- your current GPS position. This is the manual counter-part of
- the <display_text>Auto-Center</display_text> functionality
- mentioned above.
- </listitem>
- <listitem>
- <display_text>Next Waypoint</display_text> - Center the display on
- the next waypoint in your route. By default, the next waypoint is
- colored a slightly darker green than normal waypoints.
- </listitem>
- <listitem>
- <display_text>Nearest POI</display_text> - Center the display on
- the enabled POI nearest to the current view center.
- </listitem>
- </list>
- <heading>GPS</heading>
- <para>
- The <display_text>GPS</display_text> menu is used to access features
- of the GPS receiver, including textual information not displayed on
- the map. It is also used to control your connection to the GPS
- receiver.
- </para>
- <list>
- <listitem>
- <display_text>Enable GPS</display_text> - Toggle communication
- with a GPS receiver. You must have a GPS receiver set up in order
- to use this menu item. When on, Maemo Mapper will constantly
- search for the GPS receiver.
- </listitem>
- <listitem>
- <display_text>Show Information</display_text> - Toggle display of
- additional information provided by the GPS receiver. This
- information will appear in the main display as a panel on the
- left.
- </listitem>
- <listitem>
- <display_text>Details...</display_text> - Show even more
- information provided by the GPS receiver, including a polar plot
- of all GPS satellites in view.
- </listitem>
- <listitem>
- <display_text>Reset Bluetooth</display_text> - Attempt to reset
- the bluetooth radio, in case it locks up for some reason. In
- order for this to succeed, you <i>must</i> add the following line
- to your /etc/sudoers file (if you don't know what that means,
- don't try it): <b>user ALL = NOPASSWD: /usr/sbin/hciconfig hci0
- reset</b>
- </listitem>
- </list>
- <heading>Other</heading>
- <para>
- In addition to the above menus, there are a few other items in the
- main menu:
- </para>
- <list>
- <listitem>
- <display_text>Settings...</display_text> - Access and change
- settings for using Maemo Mapper. For more information, see <ref
- refid="help_maemomapper_settings" refdoc="Settings"/>.
- </listitem>
- <listitem>
- <display_text>Help...</display_text> - Access this help file.
- </listitem>
- <listitem>
- <display_text>About...</display_text> - Display version and
- copyright information.
- </listitem>
- <listitem>
- <display_text>Close</display_text> - Close Maemo Mapper.
- </listitem>
- </list>
- </topic>
- <topic>
- <topictitle>Context Menu</topictitle>
- <context contextUID="help_maemomapper_cmenu"/>
- <para>
- By tapping and holding on the screen, you can access the context
- menu to execute actions on either that location, the nearest route
- waypoint, or the nearest POI.
- </para>
- <para>
- The context menu is separated into two hierarchical levels. The
- first level (<display_text>Location</display_text>,
- <display_text>Waypoint</display_text>, or
- <display_text>POI</display_text>) determines what kind of data on
- which the operation applies.
- </para>
- <heading>Location</heading>
- <para>
- The <display_text>Location</display_text> submenu performs actions
- on the exactly latitude and longitude on which the tap-and-hold
- operation was performed. With that location, you can do the
- following actions:
- </para>
- <list>
- <listitem>
- <display_text>Show Lat/Lon</display_text> - Display the latitude
- and longitude of the selected location, in the style chosen in
- <display_text>Settings</display_text>
- </listitem>
- <listitem>
- <display_text>Copy Lat/Lon</display_text> - Copy the latitude and
- longitude of the selected location to the clipboard, in
- comma-separated decimal format.
- </listitem>
- <listitem>
- <display_text>Show Distance to</display_text> - Display the
- distance (in a straight line) to the selected location.
- </listitem>
- <listitem>
- <display_text>Download Route to...</display_text> - Open the
- <ref refid="help_maemomapper_downroute"
- refdoc="Download Route"/> dialog with the selected location
- pre-filled as the destination.
- </listitem>
- <listitem>
- <display_text>Add Route Point</display_text> - Add a point to the
- current route, based on the selected location. The point is not a
- waypoint.
- </listitem>
- <listitem>
- <display_text>Add Waypoint...</display_text> - Add a waypoint
- to the current route, based on the selected location. You must
- provide a description for the waypoint to be legitimate. By
- specifying an empty description, however, you can create a break
- in the route. The break will not be connected to the rest of the
- route, so it can be used to start a new segment.
- </listitem>
- <listitem>
- <display_text>Add POI...</display_text> - Add a POI to the POI
- database, based on the selected location. If the category in
- which you place the POI is disabled, it will not be visible on the
- map after creation, but it will still be in the database.
- </listitem>
- <listitem>
- <display_text>Set as GPS Position</display_text> - Force Maemo
- Mapper to consider the selected location to be the current GPS
- location. This will not affect the current track, but it will
- change the location of the blue circle that represents your
- current location, and it can be used to calculate a route from
- that location.
- </listitem>
- </list>
- <heading>Waypoint</heading>
- <para>
- The <display_text>Waypoint</display_text> submenu performs actions
- on the waypoint nearest to the point on which the tap-and-hold
- operation was performed. If no waypoints are nearby, an error
- message will be displayed.
- </para>
- <list>
- <listitem>
- <display_text>Show Lat/Lon</display_text> - Show the latitude and
- longitude of the selected waypoint, in the style chosen in
- <display_text>Settings</display_text>.
- </listitem>
- <listitem>
- <display_text>Show Description</display_text> - Show the
- description attached to the select waypoint. When downloading
- routes via the <ref refid="help_maemomapper_downroute"
- refdoc="Download Route"/> dialog, the description will contain
- the directions needed to take at that waypoint (e.g. "Turn left at
- Main Street. Go 2.5 kilometers.").
- </listitem>
- <listitem>
- <display_text>Copy Lat/Lon</display_text> - Copy the latitude and
- longitude of the selected waypoint to the clipboard, in
- comma-separated decimal format.
- </listitem>
- <listitem>
- <display_text>Copy Description</display_text> - Copy the
- description of the waypoint to the clipboard.
- </listitem>
- <listitem>
- <display_text>Show Distance to</display_text> - Show the distance
- left to be traveled (along the current route) until the selected
- waypoint. The calculated distance includes the distance between
- breaks in the route (i.e. between the end of one route segment and
- the beginning of another route segment).
- </listitem>
- <listitem>
- <display_text>Download Route to...</display_text> - Open the
- <ref refid="help_maemomapper_downroute"
- refdoc="Download Route"/> dialog with the selected waypoint's
- location pre-filled as the destination.
- </listitem>
- <listitem>
- <display_text>Delete...</display_text> - Delete the selected
- waypoint from the current route. This will delete all route
- segments surrounding the route, including (and limited to) all the
- points from that waypoint to the next and previous waypoints.
- </listitem>
- <listitem>
- <display_text>Add POI...</display_text> - Add a POI to the POI
- database, based on the selected waypoint's location. If the
- category in which you place the POI is disabled, it will not be
- visible on the map after creation, but it will still be in the
- database.
- </listitem>
- </list>
- <heading>POI</heading>
- <para>
- The <display_text>POI</display_text> submenu performs actions
- on the POI nearest to the point on which the tap-and-hold operation
- was performed. If no POIs are nearby, an error message will be
- displayed.
- </para>
- <list>
- <listitem>
- <display_text>View/Edit</display_text> - View and/or edit the
- selected POI.
- </listitem>
- <listitem>
- <display_text>Show Distance to</display_text> - Display the
- distance (in a straight line) to the selected POI.
- </listitem>
- <listitem>
- <display_text>Download Route to...</display_text> - Open the
- <ref refid="help_maemomapper_downroute"
- refdoc="Download Route"/> dialog with the selected POI's
- location pre-filled as the destination.
- </listitem>
- <listitem>
- <display_text>Add Route Point</display_text> - Add a point to the
- current route, based on the selected POI's location. The point is
- not a waypoint.
- </listitem>
- <listitem>
- <display_text>Add Waypoint...</display_text> - Add a waypoint
- to the current route, based on the selected location. You must
- provide a description for the waypoint to be legitimate. By
- specifying an empty description, however, you can create a break
- in the route. The break will not be connected to the rest of the
- route, so it can be used to start a new segment.
- </listitem>
- </list>
- </topic>
- <topic>
- <topictitle>Managing Repositories</topictitle>
- <context contextUID="help_maemomapper_repoman"/>
- <para>
- In Maemo Mapper, map data is divided into specific areas called
- <i>repositories</i>. A repository is a source of map data, each of
- which has its own way of visualizing the Earth. For example,
- repositories based on street maps typically draw roads as lines and
- buildings as areas, whereas repositories based on satellite data
- draw the Earth as it would appear from space. There are also
- "hybrid" repositories that overlay street map data on top of
- satellite data, as well as topographical maps that show altitude
- data.
- </para>
- <para>
- Each repository is made up of maps at 16 different zoom levels.
- Zoom Level 0 is the highest resolution (closest to the Earth, i.e.
- "zoomed in"), and Zoom Level 15 is the lowest resolution (furthest
- from the Earth, i.e. "zoomed out"). Not all repositories are
- available at all zoom levels, and some repositories may even produce
- an error (which you can ignore) if you try to download maps at that
- zoom level.
- </para>
- <para>
- Once you have set up at least one repository, you can start
- downloading maps from that repository to your device's file system.
- For details on how to do this, see
- <ref refid="help_maemomapper_mapman" refdoc="Managing Maps"/>.
- </para>
- <para>
- You can set up any number of repositories in Maemo Mapper, but only
- one can be active at any given time. The <display_text>Manage
- Repositories</display_text> dialog is accessed via the
- <display_text>Manage Repositories...</display_text> menu item of the
- <display_text>Maps</display_text> menu, and it allows you to add,
- edit, and remove repositories.
- </para>
- <para>
- The <display_text>Manage Repositories...</display_text> has a combo
- box that controls which repository is being viewed and edited. When
- a repository is selected, the controls below it display the current
- settings, which you can change:
- </para>
- <list>
- <listitem>
- <display_text>URL Format</display_text> - A specially formatted
- string that looks like a URL, but it needs to have at least one
- printf-style substitution strings (like %f or %s). Normally, you
- must either get these URL formats from the internet
- (www.internettablettalk.com is a good source), or you can use the
- <display_text>Download...</display_text> button in the
- Repositories dialog box to download a sample.
- </listitem>
- <listitem>
- <display_text>Cache Dir.</display_text> - A directory on the file
- system (either on the device's internal memory, or an external
- memory card) in which maps are stored. Maps are kept here
- indefinitely (until you delete them), so pick a directory with a
- lot of free space. You can use the
- <display_text>Browse...</display_text> button to select the
- directory with a graphical file system browser, or you can enter
- the directory manually.
- </listitem>
- <listitem>
- <display_text>Download Zoom Steps</display_text> - Controls which
- zoom levels should be avoided when automatically downloading maps
- (i.e. Auto-Download is enabled). The lowest setting (one bar)
- means to download every zoom level. The highest setting (four
- bars) causes Maemo Mapper to only download every fourth zoom level
- (0, 4, 8, and 16).
- </listitem>
- <listitem>
- <display_text>View Zoom Steps</display_text> - Similar to the
- above-described <display_text>Download Zoom Steps</display_text>
- option, except that it controls how Maemo Mapper behaves when
- zooming. For example, at two bars, pressing
- <graphic filename="2686KEY_zoom_in"/> causes Maemo Mapper to zoom
- in two levels instead of just one. Setting this equal to
- <display_text>Download Zoom Steps</display_text> ensures that you
- see all maps at their native resolution.
- </listitem>
- <listitem>
- <display_text>Double Pixels</display_text> - This forces Maemo
- Mapper to avoid using the native resolution of any maps, instead
- using pixel-doubling. This is useful if your repository's maps
- contain small, hard-to-read text, and you want to double the size
- of the images to make them more readable. This setting can also
- affect the zoom levels that are downloaded when Auto-Download is
- enabled.
- </listitem>
- <listitem>
- <display_text>Next-able</display_text> - This oddly-named option
- determines whether or not the "Select Next Repository" action
- (which can be mapped to any of the hardware keys) will be able to
- select this repository. When unset, the "Select Next Repository"
- action will simply skip over this repository.
- </listitem>
- </list>
- <para>
- In addition to the per-repository controls, there are a few buttons
- that provide additional functionality:
- </para>
- <list>
- <listitem>
- <display_text>Rename...</display_text> - Renames the currently
- selected repository.
- </listitem>
- <listitem>
- <display_text>Delete...</display_text> - Deletes the currently
- selected repository.
- </listitem>
- <listitem>
- <display_text>New...</display_text> - Adds a new repository.
- </listitem>
- <listitem>
- <display_text>Reset...</display_text> - Resets your repository
- list to the factory default. This will remove all of your
- repositories and replace them with the single default repository
- that comes with Maemo Mapper.
- </listitem>
- <listitem>
- <display_text>Download...</display_text> - Downloads information
- about several preset repositories, and adds them to your
- repository list. They will be appended to any existing
- repositories you already have. They are not read-only - you may
- edit them as you wish. This is a good way to get started.
- </listitem>
- </list>
- <note>
- Certain repositories (most notably, the commercial ones) may
- have license agreements attached with their use. It may be
- illegal to use a certain repository with Maemo Mapper or under
- certain conditions. This includes the repositories downloaded
- via the <display_text>Download...</display_text> button. If you
- are not sure if you are legally allowed to use a particular
- repository, you should delete it from your list of repositories.
- The authors of Maemo Mapper cannot be held responsible for your
- use of a particular repository.
- </note>
- </topic>
- <topic>
- <topictitle>Downloading Routes</topictitle>
- <context contextUID="help_maemomapper_downroute"/>
- <para>
- Route data can be loaded from GPX files, like the ones provided by
- the GPX Driving Directions web service
- (http://www.gnuite.com/cgi-bin/gpx.cgi). Or, route data can be
- downloaded directly within Maemo Mapper using the
- <display_text>Download Route</display_text> dialog.
- </para>
- <para>
- Downloading routes requires an active connection to the internet,
- but once a route is loaded into Maemo Mapper, the internet
- connection is no longer needed (unless
- <display_text>Auto-Update</display_text> is enabled). The route
- download functionality in Maemo Mapper actually uses the
- aforementioned GPX Driving Directions web service.
- </para>
- <para>
- The <display_text>Download Route</display_text> dialog contains the
- following controls:
- </para>
- <list>
- <listitem>
- <display_text>Source URL</display_text> - The web service from
- which driving directions are retrieved. The default is fine, and
- it is usually left unchanged.
- </listitem>
- <listitem>
- <display_text>Auto-Update</display_text> - This option, only
- available if <display_text>Use GPS Location</display_text> is
- enabled, will cause Maemo Mapper to automatically re-download a
- new route if you stray from the route. Note that you must have a
- continuous connection to the internet (i.e. cellular data service)
- for Auto-Update to work.
- </listitem>
- <listitem>
- <display_text>Use GPS Location</display_text> - If selected, then
- the current GPS location will be used as the
- <display_text>Origin</display_text>.
- </listitem>
- <listitem>
- <display_text>Use End of Route</display_text> - If selected, then
- the end of the route will be used as the
- <display_text>Origin</display_text>. This is useful for stringing
- together multiple route downloads into a single route.
- </listitem>
- <listitem>
- <display_text>Origin</display_text> - If selected, then you must
- enter your own origin. An origin can be specified in any format
- understood by Google Maps. Some examples: "25, -43" (lat/lon),
- "68712" (zip code), "San Francisco, CA", "123 Main St, 45112",
- "5th and Main, 12151". In fact, if your route download fails with
- a "Could not generate directions" error message, you can use
- Google Maps to test your origin for accuracy.
- </listitem>
- <listitem>
- <display_text>Destination</display_text> - The destination to
- which the directions will lead. Like the
- <display_text>Origin</display_text>, a destination can be
- specified in any format understood by Google Maps.
- </listitem>
- </list>
- </topic>
- <topic>
- <topictitle>Managing Maps</topictitle>
- <context contextUID="help_maemomapper_mapman"/>
- <para>
- In Maemo Mapper, <i>repositories</i> represent sources of map data,
- and <i>maps</i> are just image files (e.g. PNG or JPEG) that are
- drawn onto the screen. Once you have a repository set up (see
- <ref refid="help_maemomapper_repoman"
- refdoc="Managing Repositories"/>), you can download maps from a
- repository into a Map Cache, which is just a directory on your
- device's file system.
- </para>
- <para>
- Maemo Mapper downloads maps from the current repository so that they
- can be drawn onto the screen and later recalled from disk, instead
- of downloading a map every time it is needed. This is called
- <i>caching</i>, and it allows you to use Maemo Mapper even when you
- are not connected to the internet.
- </para>
- <para>
- Because Maemo Mapper downloads maps to your device's file system,
- you must be aware of how much disk space your maps are taking up,
- especially if you enable Auto-Download.
- </para>
- <para>
- Aside from the Auto-Download functionality, you can also download
- maps manually using the <display_text>Manage Maps...</display_text>
- menu item of the <display_text>Maps</display_text> menu. The
- <display_text>Manage Maps</display_text> dialog allows you to
- download, overwrite, or delete maps, either by area or along your
- current route. It contains up to three tabs, all of which control
- which and how many maps are downloaded.
- </para>
- <heading>Setup</heading>
- <para>
- The <display_text>Setup</display_text> tab controls what you what to
- do. You can download maps (optionally overwriting
- already-downloaded maps) from the current repository to your
- device's file system, or you can delete maps (pertaining to the
- current repository) from your device's file system. Both of these
- operations can be done either over a rectangular area or along your
- current route.
- </para>
- <list>
- <listitem>
- <display_text>Download Maps</display_text> - If selected, Maemo
- Mapper will download maps from the current repository to your
- device's file system, for the area you specify. By default, Maemo
- Mapper only downloads the maps that you don't already have.
- </listitem>
- <listitem>
- <display_text>Overwrite</display_text> - If selected, then Maemo
- Mapper will download maps and overwrite any maps that you may have
- already downloaded.
- </listitem>
- <listitem>
- <display_text>Delete Maps</display_text> - If selected, Maemo
- Mapper will delete maps from your file system, for the area you
- specify.
- </listitem>
- <listitem>
- <display_text>By Area</display_text> - If selected, Maemo Mapper
- will download or delete maps for a particular rectangular area of
- the world, based on the latitude and longitude of an upper-left
- and lower-right corner. See the <display_text>Area</display_text>
- tab to specify the coordinates.
- </listitem>
- <listitem>
- <display_text>Along Route</display_text> - If selected, Maemo
- Mapper will download or delete maps along your current route.
- This is useful if, for example, you are about to embark on a trip
- and want to make sure that you have maps for all points along the
- route.
- </listitem>
- <listitem>
- <display_text>Radius (tiles)</display_text> - If
- <display_text>Along Route</display_text> is selected, then you can
- specify the radius around your route for which maps will be
- downloaded or deleted. For example, if you specify 4 (the
- default), then Maemo Mapper will download all tiles that are
- within 4 tiles of your route.
- </listitem>
- </list>
- <heading>Zoom</heading>
- <para>
- The <display_text>Zoom</display_text> tab controls which zoom levels
- at which maps are downloaded or deleted. The current zoom level is
- selected by default, but you can enable or disable any zoom levels
- that you like.
- </para>
- <heading>Area</heading>
- <para>
- The <display_text>Area</display_text> tab, available if the
- <display_text>By Area</display_text> option is selected in the
- <display_text>Setup</display_text> tab, defines the rectangular area
- of the world for which maps will be downloaded or deleted. If
- applicable, the fields are pre-filled with your current and previous
- view center coordinates. This allows you to graphically choose your
- rectangle by first centering on one corner of the rectangle, then
- centering on the opposite corner, by tapping the screen or by using
- the <display_text>Lat/Lon</display_text> menu item of the
- <display_text>Go to</display_text> menu.
- </para>
- </topic>
- <topic>
- <topictitle>POI Categories</topictitle>
- <context contextUID="help_maemomapper_poicat"/>
- <para>
- POI Categories are a means by which you can organize your POIs for
- selective display. The <display_text>POI Categories</display_text>
- dialog is accessed from the <display_text>View</display_text> menu
- and allows you to enable/disable, add, edit, or delete categories.
- </para>
- <para>
- Each row in the table represents a category. There are three
- columns displayed for each category:
- </para>
- <list>
- <listitem>
- <display_text>Enabled</display_text> - Controls whether or not
- POIs in this category are drawn on the map.
- </listitem>
- <listitem>
- <display_text>Label</display_text> - A short label to describe the
- category. This is the name that will be visible when viewing a
- POI.
- </listitem>
- <listitem>
- <display_text>Description</display_text> - A longer description of
- the category. This description is not visible anywhere except in
- this dialog; it is only used to get an idea of how the category is
- meant to be used.
- </listitem>
- </list>
- <para>
- Selecting a row in the table and pressing the
- <display_text>Edit</display_text> button will allow you to edit the
- above three attributes of a category, and to delete a category. You
- can also add a new category by using the
- <display_text>Add</display_text> button.
- </para>
- <note>
- A POI may only be associated with a single category at a time.
- </note>
- </topic>
- <topic>
- <topictitle>Settings</topictitle>
- <context contextUID="help_maemomapper_settings"/>
- <para>
- The <display_text>Settings</display_text> dialog (accessible from
- the main menu) provides access to a plethora of configurable options
- that control how Maemo Mapper appears and runs. In addition to the
- tabs, which are described below, there are also two buttons at the
- bottom of the diagram labeled <display_text>Hardware
- Keys...</display_text> and <display_text>Colors...</display_text>.
- </para>
- <para>
- The <display_text>Hardware Keys...</display_text> button brings up
- another dialog box, which allows you to customize the actions that
- each hardware key causes. For example, you can map the
- <graphic filename="2686KEY_esc"/> button to cycle through map
- repositories, giving you quick access to switching among them.
- </para>
- <para>
- The <display_text>Colors...</display_text> button allows you to
- customize the colors that are used for drawing on-map objects.
- </para>
- <heading>GPS</heading>
- <para>
- The <display_text>GPS</display_text> tab tells Maemo Mapper which
- bluetooth device from which to retrieve GPS data. It is only
- applicable if you have a bluetooth GPS receiver with which to use
- Maemo Mapper.
- </para>
- <para>
- Enter the MAC address in the field provided. If you don't know the
- MAC address, turn on your receiver and press the
- <display_text>Scan...</display_text> button to select it from a
- list of nearby bluetooth devices.
- </para>
- <para>
- <i>Alternatively</i>, if you are using rfcomm or any other
- file-system-based NMEA input source, you can provide a pathname
- (beginning with a leading slash) such as "/dev/rfcomm1". In this
- case, Maemo Mapper will read NMEA sentences from the file system
- instead of via bluetooth.
- </para>
- <heading>Auto-Center</heading>
- <para>
- The <display_text>Auto-Center</display_text> tab allows you to
- configure how Maemo Mapper automatically re-centers the display when
- either <display_text>Lat/Lon</display_text> or
- <display_text>Lead</display_text> is enabled from the
- <display_text>Auto-Center</display_text> menu. The Auto-Center
- feature is most useful in conjunction with a GPS receiver.
- </para>
- <list>
- <listitem>
- <display_text>Sensitivity</display_text> - Controls how often
- Maemo Mapper re-centers the display, based on how close your
- position (or the position of your <i>lead</i>) gets to the edge of
- the screen. When set to a low value, Maemo Mapper will only
- re-center the screen when you are near the edge of the screen.
- When set to the maximum, Maemo Mapper will keep your position as
- close to the center as possible.
- </listitem>
- <listitem>
- <display_text>Lead Amount</display_text> - When Auto-Center is set
- to <display_text>Lead</display_text>, then Maemo Mapper will keep
- the center of the screen focused on an area in front of you. When
- driving, this allows you to view more of the road ahead of you.
- The distance in front of you on which the screen is centered is
- based on two variables: your current speed and the value of the
- <display_text>Lead Amount</display_text> option.
- </listitem>
- </list>
- <heading>Announce</heading>
- <para>
- The <display_text>Announce</display_text> tab controls how and when
- Maemo Mapper displays or speaks waypoint information. When you
- approach a waypoint in your route (defined by the presence of a
- description in the GPX file), Maemo Mapper will pop up a text box
- with the contents of that description. When downloading routes from
- within Maemo Mapper, the text describes your next action, e.g. "Turn
- left at Main Street. Go 2.4 miles."
- </para>
- <para>
- As you approach a waypoint, Maemo Mapper will continue to display
- the description of that waypoint, so long as you are within the
- range defined by the <display_text>Advance Notice</display_text>
- option, or until you pass the waypoint. Because the amount of
- notice is dependent on your speed, it is possible to see the text,
- then slow down to a point where the notice disappears. This is
- possible, for example, if you are stopped at a red light. The text
- will reappear when you have picked up enough speed to again break
- the <display_text>Advance Notice</display_text> range.
- </para>
- <para>
- If you have installed <i>flite</i>, which is available in the same
- repository from which you downloaded Maemo Mapper, then Maemo Mapper
- can optionally also speak the same directions that appear on screen.
- Maemo Mapper will only speak the directions once, at the exact
- moment you first reach the distance from the waypoint defined by the
- <display_text>Advance Notice</display_text> option. The same
- directions are on-screen if you need to reference them.
- </para>
- <list>
- <listitem>
- <display_text>Advance Notice</display_text> - Controls how much in
- advance Maemo Mapper begins to provide the waypoint description.
- The exact distance at which Maemo Mapper begins to announce a
- waypoint also depends on your speed, so the value of this option
- can be thought of more accurately in units of time. At the
- minimum value, Maemo Mapper gives you almost no notice. At the
- maximum value, Maemo Mapper gives you about two minutes of notice.
- Experiment to find your happy medium.
- </listitem>
- <listitem>
- <display_text>Enable Voice Synthesis</display_text> - If you have
- installed <i>flite</i>, this option will cause Maemo Mapper to
- speak the description of the next waypoint when you enter the
- range defined by the <display_text>Advance Notice</display_text>
- option.
- </listitem>
- </list>
- <heading>Misc.</heading>
- <para>
- The <display_text>Misc.</display_text> and <display_text>Misc.
- 2</display_text> tabs contain miscellaneous options.
- </para>
- <list>
- <listitem>
- <display_text>Line Width</display_text> - Controls the thickness
- of all lines drawn on top of the map images. This includes your
- mark, all tracks and routes, and the default POI image.
- </listitem>
- <listitem>
- <display_text>Keep Display On Only in Fullscreen
- Mode</display_text> - Controls whether or not Maemo Mapper
- should limit its "Keep the display on" behavior to full screen
- mode only. If disabled, then Maemo Mapper will always keep the
- screen on, as long as you are moving. If enabled, Maemo Mapper
- will only keep the screen on in full screen mode.
- </listitem>
- <listitem>
- <display_text>Information Font Size</display_text> - Controls the
- font size for all information that is popped up to the user in the
- upper-right corner, including waypoint descriptions.
- </listitem>
- <listitem>
- <display_text>Units</display_text> - Controls the units in which
- distances and speeds are displayed in the user interface.
- </listitem>
- <listitem>
- <display_text>Degrees Format</display_text> - Controls how
- latitude and longitudes are displayed in the user interface.
- </listitem>
- <listitem>
- <display_text>Speed Limit</display_text> - Enables notification
- when you have exceeded the given speed limit (specified in the
- units defined via the <display_text>Units</display_text> option.
- </listitem>
- <listitem>
- <display_text>Location</display_text> - Controls the location on
- the screen of the speed warning.
- </listitem>
- </list>
- <heading>POI</heading>
- <para>
- The <display_text>POI</display_text> tab allows you to define your
- POI database and how POIs are drawn on the screen.
- </para>
- <list>
- <listitem>
- <display_text>POI database</display_text> - The location on the
- file system where the POI database is located. The database must
- be in sqlite3 format. A default (empty) POI database is
- automatically created for you when you first run Maemo Mapper.
- </listitem>
- <listitem>
- <display_text>Show POI below zoom</display_text> - Defines the
- maximum zoom (furthest away from the Earth) at which POIs will be
- drawn. When zoomed out beyond this level, no POIs will be drawn.
- </listitem>
- </list>
- </topic>
- <topic>
- <topictitle>About Maemo Mapper</topictitle>
- <context contextUID="help_maemomapper_about"/>
- <para>
- Current Version: 1.4.4
- </para>
- <para>
- Maemo Mapper was created and developed by John Costigan (aka
- <display_text>gnuite</display_text>).
- </para>
- <para>
- Copyright © 2006-2007 John Costigan.
- </para>
- <para>
- POI and GPS-Info code originally written by Cezary Jackiewicz.
- </para>
- <para>
- Default map data provided by http://www.openstreetmap.org/ - other
- map repositories are subject to their own licenses and may or may not
- be suitable for use with Maemo Mapper. It may be illegal to use a
- certain repository with Maemo Mapper or under certain conditions. This
- includes the repositories downloadable directly in Maemo Mapper. If
- you are not sure if you are legally allowed to use a particular
- repository, you should delete it from your list of repositories. The
- authors of Maemo Mapper cannot be held responsible for your use of a
- particular repository.
- </para>
- <para>
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- </para>
- <para>
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- </para>
- <para>
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- </para>
- </topic>
- </folder>
-</ossohelpsource>
+++ /dev/null
-#!/scratchbox/tools/bin/perl -w
-# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
-
-#
-# The Intltool Message Updater
-#
-# Copyright (C) 2000-2003 Free Software Foundation.
-#
-# Intltool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# version 2 published by the Free Software Foundation.
-#
-# Intltool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# Authors: Kenneth Christiansen <kenneth@gnu.org>
-# Maciej Stachowiak
-# Darin Adler <darin@bentspoon.com>
-
-## Release information
-my $PROGRAM = "intltool-update";
-my $VERSION = "0.33";
-my $PACKAGE = "intltool";
-
-## Loaded modules
-use strict;
-use Getopt::Long;
-use Cwd;
-use File::Copy;
-use File::Find;
-
-## Scalars used by the option stuff
-my $HELP_ARG = 0;
-my $VERSION_ARG = 0;
-my $DIST_ARG = 0;
-my $POT_ARG = 0;
-my $HEADERS_ARG = 0;
-my $MAINTAIN_ARG = 0;
-my $REPORT_ARG = 0;
-my $VERBOSE = 0;
-my $GETTEXT_PACKAGE = "";
-my $OUTPUT_FILE = "";
-
-my @languages;
-my %varhash = ();
-my %po_files_by_lang = ();
-
-# Regular expressions to categorize file types.
-# FIXME: Please check if the following is correct
-
-my $xml_support =
-"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required)
-"ui|". # Bonobo specific - User Interface desc. files
-"lang|". # ?
-"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required)
-"scm(?:\\.in)*|". # ? (Note: .in is not required)
-"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files
-"etspec|". # ?
-"server(?:\\.in)+|". # Bonobo specific
-"sheet(?:\\.in)+|". # ?
-"schemas(?:\\.in)+|". # GConf specific
-"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer.
-"kbd(?:\\.in)+"; # GOK specific.
-
-my $ini_support =
-"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
-"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
-"caves(?:\\.in)+|". # GNOME Games specific
-"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
-"soundlist(?:\\.in)+|". # GNOME specific
-"keys(?:\\.in)+|". # GNOME Mime database specific
-"theme(?:\\.in)+"; # http://www.freedesktop.org/Standards/icon-theme-spec
-
-my $buildin_gettext_support =
-"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
-
-## Always flush buffer when printing
-$| = 1;
-
-## Sometimes the source tree will be rooted somewhere else.
-my $SRCDIR = ".";
-my $POTFILES_in;
-
-$SRCDIR = $ENV{"srcdir"} if $ENV{"srcdir"};
-$POTFILES_in = "<$SRCDIR/POTFILES.in";
-
-## Handle options
-GetOptions
-(
- "help" => \$HELP_ARG,
- "version" => \$VERSION_ARG,
- "dist|d" => \$DIST_ARG,
- "pot|p" => \$POT_ARG,
- "headers|s" => \$HEADERS_ARG,
- "maintain|m" => \$MAINTAIN_ARG,
- "report|r" => \$REPORT_ARG,
- "verbose|x" => \$VERBOSE,
- "gettext-package|g=s" => \$GETTEXT_PACKAGE,
- "output-file|o=s" => \$OUTPUT_FILE,
- ) or &Console_WriteError_InvalidOption;
-
-&Console_Write_IntltoolHelp if $HELP_ARG;
-&Console_Write_IntltoolVersion if $VERSION_ARG;
-
-my $arg_count = ($DIST_ARG > 0)
- + ($POT_ARG > 0)
- + ($HEADERS_ARG > 0)
- + ($MAINTAIN_ARG > 0)
- + ($REPORT_ARG > 0);
-
-&Console_Write_IntltoolHelp if $arg_count > 1;
-
-# --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || &FindPackageName;
-
-if ($POT_ARG)
-{
- &GenerateHeaders;
- &GeneratePOTemplate;
-}
-elsif ($HEADERS_ARG)
-{
- &GenerateHeaders;
-}
-elsif ($MAINTAIN_ARG)
-{
- &FindLeftoutFiles;
-}
-elsif ($REPORT_ARG)
-{
- &GenerateHeaders;
- &GeneratePOTemplate;
- &Console_Write_CoverageReport;
-}
-elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/)
-{
- my $lang = $ARGV[0];
-
- ## Report error if the language file supplied
- ## to the command line is non-existent
- &Console_WriteError_NotExisting("$SRCDIR/$lang.po")
- if ! -s "$SRCDIR/$lang.po";
-
- if (!$DIST_ARG)
- {
- print "Working, please wait..." if $VERBOSE;
- &GenerateHeaders;
- &GeneratePOTemplate;
- }
- &POFile_Update ($lang, $OUTPUT_FILE);
- &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE);
-}
-else
-{
- &Console_Write_IntltoolHelp;
-}
-
-exit;
-
-#########
-
-sub Console_Write_IntltoolVersion
-{
- print <<_EOF_;
-${PROGRAM} (${PACKAGE}) $VERSION
-Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.
-
-Copyright (C) 2000-2003 Free Software Foundation, Inc.
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-_EOF_
- exit;
-}
-
-sub Console_Write_IntltoolHelp
-{
- print <<_EOF_;
-Usage: ${PROGRAM} [OPTION]... LANGCODE
-Updates PO template files and merge them with the translations.
-
-Mode of operation (only one is allowed):
- -p, --pot generate the PO template only
- -s, --headers generate the header files in POTFILES.in
- -m, --maintain search for left out files from POTFILES.in
- -r, --report display a status report for the module
- -d, --dist merge LANGCODE.po with existing PO template
-
-Extra options:
- -g, --gettext-package=NAME override PO template name, useful with --pot
- -o, --output-file=FILE write merged translation to FILE
- -x, --verbose display lots of feedback
- --help display this help and exit
- --version output version information and exit
-
-Examples of use:
-${PROGRAM} --pot just create a new PO template
-${PROGRAM} xy create new PO template and merge xy.po with it
-
-Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
-or send email to <xml-i18n-tools\@gnome.org>.
-_EOF_
- exit;
-}
-
-sub echo_n
-{
- my $str = shift;
- my $ret = `echo "$str"`;
-
- $ret =~ s/\n$//; # do we need the "s" flag?
-
- return $ret;
-}
-
-sub POFile_DetermineType ($)
-{
- my $type = $_;
- my $gettext_type;
-
- my $xml_regex = "(?:" . $xml_support . ")";
- my $ini_regex = "(?:" . $ini_support . ")";
- my $buildin_regex = "(?:" . $buildin_gettext_support . ")";
-
- if ($type =~ /\[type: gettext\/([^\]].*)]/)
- {
- $gettext_type=$1;
- }
- elsif ($type =~ /schemas(\.in)+$/)
- {
- $gettext_type="schemas";
- }
- elsif ($type =~ /glade2?(\.in)*$/)
- {
- $gettext_type="glade";
- }
- elsif ($type =~ /scm(\.in)*$/)
- {
- $gettext_type="scheme";
- }
- elsif ($type =~ /keys(\.in)+$/)
- {
- $gettext_type="keys";
- }
-
- # bucket types
-
- elsif ($type =~ /$xml_regex$/)
- {
- $gettext_type="xml";
- }
- elsif ($type =~ /$ini_regex$/)
- {
- $gettext_type="ini";
- }
- elsif ($type =~ /$buildin_regex$/)
- {
- $gettext_type="buildin";
- }
- else
- {
- $gettext_type="unknown";
- }
-
- return "gettext\/$gettext_type";
-}
-
-sub TextFile_DetermineEncoding ($)
-{
- my $gettext_code="ASCII"; # All files are ASCII by default
- my $filetype=`file $_ | cut -d ' ' -f 2`;
-
- if ($? eq "0")
- {
- if ($filetype =~ /^(ISO|UTF)/)
- {
- chomp ($gettext_code = $filetype);
- }
- elsif ($filetype =~ /^XML/)
- {
- $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8
- }
- }
-
- return $gettext_code;
-}
-
-sub isNotValidMissing
-{
- my ($file) = @_;
-
- return if $file =~ /^\{arch\}\/.*$/;
- return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/;
-}
-
-sub FindLeftoutFiles
-{
- my (@buf_i18n_plain,
- @buf_i18n_xml,
- @buf_i18n_xml_unmarked,
- @buf_i18n_ini,
- @buf_potfiles,
- @buf_potfiles_ignore,
- @buf_allfiles,
- @buf_allfiles_sorted,
- @buf_potfiles_sorted
- );
-
- ## Search and find all translatable files
- find sub {
- push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
- push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
- push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
- push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
- }, "..";
-
-
- open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n";
- @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
- close POTFILES;
-
- foreach (@buf_potfiles) {
- s/^\[.*]\s*//;
- }
-
- print "Searching for missing translatable files...\n" if $VERBOSE;
-
- ## Check if we should ignore some found files, when
- ## comparing with POTFILES.in
- foreach my $ignore ("POTFILES.skip", "POTFILES.ignore")
- {
- (-s $ignore) or next;
-
- if ("$ignore" eq "POTFILES.ignore")
- {
- print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n".
- "content of this file to POTFILES.skip.\n";
- }
-
- print "Found $ignore: Ignoring files...\n" if $VERBOSE;
- open FILE, "<$ignore" or die "ERROR: Failed to open $ignore!\n";
-
- while (<FILE>)
- {
- push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/;
- }
- close FILE;
-
- @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
- }
-
- foreach my $file (@buf_i18n_plain)
- {
- my $in_comment = 0;
- my $in_macro = 0;
-
- open FILE, "<$file";
- while (<FILE>)
- {
- # Handle continued multi-line comment.
- if ($in_comment)
- {
- next unless s-.*\*/--;
- $in_comment = 0;
- }
-
- # Handle continued macro.
- if ($in_macro)
- {
- $in_macro = 0 unless /\\$/;
- next;
- }
-
- # Handle start of macro (or any preprocessor directive).
- if (/^\s*\#/)
- {
- $in_macro = 1 if /^([^\\]|\\.)*\\$/;
- next;
- }
-
- # Handle comments and quoted text.
- while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
- {
- my $match = $1;
- if ($match eq "/*")
- {
- if (!s-/\*.*?\*/--)
- {
- s-/\*.*--;
- $in_comment = 1;
- }
- }
- elsif ($match eq "//")
- {
- s-//.*--;
- }
- else # ' or "
- {
- if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
- {
- warn "mismatched quotes at line $. in $file\n";
- s-$match.*--;
- }
- }
- }
-
- if (/\.GetString ?\(QUOTEDTEXT/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- ## Remove the first 3 chars and add newline
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
-
- if (/_\(QUOTEDTEXT/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- ## Remove the first 3 chars and add newline
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_xml)
- {
- open FILE, "<$file";
-
- while (<FILE>)
- {
- # FIXME: share the pattern matching code with intltool-extract
- if (/\s_(.*)=\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_ini)
- {
- open FILE, "<$file";
- while (<FILE>)
- {
- if (/_(.*)=/)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- last;
- }
- }
- close FILE;
- }
-
- foreach my $file (@buf_i18n_xml_unmarked)
- {
- if (defined isNotValidMissing (unpack("x3 A*", $file))) {
- push @buf_allfiles, unpack("x3 A*", $file) . "\n";
- }
- }
-
-
- @buf_allfiles_sorted = sort (@buf_allfiles);
- @buf_potfiles_sorted = sort (@buf_potfiles);
-
- my %in2;
- foreach (@buf_potfiles_sorted)
- {
- $in2{$_} = 1;
- }
-
- my @result;
-
- foreach (@buf_allfiles_sorted)
- {
- if (!exists($in2{$_}))
- {
- push @result, $_
- }
- }
-
- my @buf_potfiles_notexist;
-
- foreach (@buf_potfiles_sorted)
- {
- chomp (my $dummy = $_);
- if ("$dummy" ne "" and ! -f "../$dummy")
- {
- push @buf_potfiles_notexist, $_;
- }
- }
-
- ## Save file with information about the files missing
- ## if any, and give information about this procedure.
- if (@result + @buf_potfiles_notexist > 0)
- {
- if (@result)
- {
- print "\n" if $VERBOSE;
- unlink "missing";
- open OUT, ">missing";
- print OUT @result;
- close OUT;
- warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n".
- "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n";
- print STDERR @result, "\n";
- warn "If some of these files are left out on purpose then please add them to\n".
- "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n".
- "of left out files has been written in the current directory.\n";
- }
- if (@buf_potfiles_notexist)
- {
- unlink "notexist";
- open OUT, ">notexist";
- print OUT @buf_potfiles_notexist;
- close OUT;
- warn "\n" if ($VERBOSE or @result);
- warn "\e[1mThe following files do not exist anymore:\e[0m\n\n";
- warn @buf_potfiles_notexist, "\n";
- warn "Please remove them from POTFILES.in or POTFILES.skip. A file \e[1m'notexist'\e[0m\n".
- "containing this list of absent files has been written in the current directory.\n";
- }
- }
-
- ## If there is nothing to complain about, notify the user
- else {
- print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE;
- }
-}
-
-sub Console_WriteError_InvalidOption
-{
- ## Handle invalid arguments
- print STDERR "Try `${PROGRAM} --help' for more information.\n";
- exit 1;
-}
-
-sub GenerateHeaders
-{
- my $EXTRACT = "/home/milang/src/mapper/intltool-extract";
- chomp $EXTRACT;
-
- $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
-
- ## Generate the .h header files, so we can allow glade and
- ## xml translation support
- if (! -x "$EXTRACT")
- {
- print STDERR "\n *** The intltool-extract script wasn't found!"
- ."\n *** Without it, intltool-update can not generate files.\n";
- exit;
- }
- else
- {
- open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n";
-
- while (<FILE>)
- {
- chomp;
- next if /^\[\s*encoding/;
-
- ## Find xml files in POTFILES.in and generate the
- ## files with help from the extract script
-
- my $gettext_type= &POFile_DetermineType ($1);
-
- if (/\.($xml_support|$ini_support)$/ || /^\[/)
- {
- s/^\[[^\[].*]\s*//;
-
- my $filename = "../$_";
-
- if ($VERBOSE)
- {
- system ($EXTRACT, "--update", "--srcdir=$SRCDIR",
- "--type=$gettext_type", $filename);
- }
- else
- {
- system ($EXTRACT, "--update", "--type=$gettext_type",
- "--srcdir=$SRCDIR", "--quiet", $filename);
- }
- }
- }
- close FILE;
- }
-}
-
-#
-# Generate .pot file from POTFILES.in
-#
-sub GeneratePOTemplate
-{
- my $XGETTEXT = $ENV{"XGETTEXT"} || "/scratchbox/tools/bin/xgettext";
- my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
- chomp $XGETTEXT;
-
- if (! -x $XGETTEXT)
- {
- print STDERR " *** xgettext is not found on this system!\n".
- " *** Without it, intltool-update can not extract strings.\n";
- exit;
- }
-
- print "Building $MODULE.pot...\n" if $VERBOSE;
-
- open INFILE, $POTFILES_in;
- unlink "POTFILES.in.temp";
- open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing");
-
- my $gettext_support_nonascii = 0;
-
- # checks for GNU gettext >= 0.12
- my $dummy = `$XGETTEXT --version --from-code=UTF-8 >/dev/null 2>/dev/null`;
- if ($? == 0)
- {
- $gettext_support_nonascii = 1;
- }
- else
- {
- # urge everybody to upgrade gettext
- print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n".
- " strings. That means you should install a version of gettext\n".
- " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n".
- " or have to let non-ASCII strings untranslated. (If there is any)\n";
- }
-
- my $encoding = "ASCII";
- my $forced_gettext_code;
- my @temp_headers;
- my $encoding_problem_is_reported = 0;
-
- while (<INFILE>)
- {
- next if (/^#/ or /^\s*$/);
-
- chomp;
-
- my $gettext_code;
-
- if (/^\[\s*encoding:\s*(.*)\s*\]/)
- {
- $forced_gettext_code=$1;
- }
- elsif (/\.($xml_support|$ini_support)$/ || /^\[/)
- {
- s/^\[.*]\s*//;
- print OUTFILE "../$_.h\n";
- push @temp_headers, "../$_.h";
- $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code);
- }
- else
- {
- if ($SRCDIR eq ".") {
- print OUTFILE "../$_\n";
- } else {
- print OUTFILE "$SRCDIR/../$_\n";
- }
- $gettext_code = &TextFile_DetermineEncoding ("../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
- }
-
- next if (! $gettext_support_nonascii);
-
- if (defined $forced_gettext_code)
- {
- $encoding=$forced_gettext_code;
- }
- elsif (defined $gettext_code and "$encoding" ne "$gettext_code")
- {
- if ($encoding eq "ASCII")
- {
- $encoding=$gettext_code;
- }
- elsif ($gettext_code ne "ASCII")
- {
- # Only report once because the message is quite long
- if (! $encoding_problem_is_reported)
- {
- print STDERR "WARNING: You should use the same file encoding for all your project files,\n".
- " but $PROGRAM thinks that most of the source files are in\n".
- " $encoding encoding, while \"$_\" is (likely) in\n".
- " $gettext_code encoding. If you are sure that all translatable strings\n".
- " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n".
- " line to POTFILES.in:\n\n".
- " [encoding: UTF-8]\n\n".
- " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n".
- "(such warning message will only be reported once.)\n";
- $encoding_problem_is_reported = 1;
- }
- }
- }
- }
-
- close OUTFILE;
- close INFILE;
-
- unlink "$MODULE.pot";
- my @xgettext_argument=("$XGETTEXT",
- "--add-comments",
- "--directory\=\.",
- "--output\=$MODULE\.pot",
- "--files-from\=\.\/POTFILES\.in\.temp");
- my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
- push @xgettext_argument, $XGETTEXT_KEYWORDS;
- push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
- push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
- my $xgettext_command = join ' ', @xgettext_argument;
-
- # intercept xgettext error message
- print "Running $xgettext_command\n" if $VERBOSE;
- my $xgettext_error_msg = `$xgettext_command 2>\&1`;
- my $command_failed = $?;
-
- unlink "POTFILES.in.temp";
-
- print "Removing generated header (.h) files..." if $VERBOSE;
- unlink foreach (@temp_headers);
- print "done.\n" if $VERBOSE;
-
- if (! $command_failed)
- {
- if (! -e "$MODULE.pot")
- {
- print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE;
- }
- else
- {
- print "Wrote $MODULE.pot\n" if $VERBOSE;
- }
- }
- else
- {
- if ($xgettext_error_msg =~ /--from-code/)
- {
- # replace non-ASCII error message with a more useful one.
- print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n".
- " string marked for translation. Please make sure that all strings marked\n".
- " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n".
- " following line to POTFILES.in and rerun $PROGRAM:\n\n".
- " [encoding: UTF-8]\n\n";
- }
- else
- {
- print STDERR "$xgettext_error_msg";
- if (-e "$MODULE.pot")
- {
- # is this possible?
- print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n".
- " Please consult error message above if there is any.\n";
- }
- else
- {
- print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n".
- " error message above if there is any.\n";
- }
- }
- exit (1);
- }
-}
-
-sub POFile_Update
-{
- -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
-
- my $MSGMERGE = $ENV{"MSGMERGE"} || "/scratchbox/tools/bin/msgmerge";
- my ($lang, $outfile) = @_;
-
- print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
-
- my $infile = "$SRCDIR/$lang.po";
- $outfile = "$SRCDIR/$lang.po" if ($outfile eq "");
-
- # I think msgmerge won't overwrite old file if merge is not successful
- system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot");
-}
-
-sub Console_WriteError_NotExisting
-{
- my ($file) = @_;
-
- ## Report error if supplied language file is non-existing
- print STDERR "$PROGRAM: $file does not exist!\n";
- print STDERR "Try '$PROGRAM --help' for more information.\n";
- exit;
-}
-
-sub GatherPOFiles
-{
- my @po_files = glob ("./*.po");
-
- @languages = map (&POFile_GetLanguage, @po_files);
-
- foreach my $lang (@languages)
- {
- $po_files_by_lang{$lang} = shift (@po_files);
- }
-}
-
-sub POFile_GetLanguage ($)
-{
- s/^(.*\/)?(.+)\.po$/$2/;
- return $_;
-}
-
-sub Console_Write_TranslationStatus
-{
- my ($lang, $output_file) = @_;
- my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
-
- $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
-
- system ("$MSGFMT", "-o", "/dev/null", "--statistics", $output_file);
-}
-
-sub Console_Write_CoverageReport
-{
- my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
-
- &GatherPOFiles;
-
- foreach my $lang (@languages)
- {
- print "$lang: ";
- &POFile_Update ($lang, "");
- }
-
- print "\n\n * Current translation support in $MODULE \n\n";
-
- foreach my $lang (@languages)
- {
- print "$lang: ";
- system ("$MSGFMT", "-o", "/dev/null", "--statistics", "$SRCDIR/$lang.po");
- }
-}
-
-sub SubstituteVariable
-{
- my ($str) = @_;
-
- # always need to rewind file whenever it has been accessed
- seek (CONF, 0, 0);
-
- # cache each variable. varhash is global to we can add
- # variables elsewhere.
- while (<CONF>)
- {
- if (/^(\w+)=(.*)$/)
- {
- ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/;
- }
- }
-
- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
- {
- my $rest = $3;
- my $untouched = $1;
- my $sub = $varhash{$2};
-
- return SubstituteVariable ("$untouched$sub$rest");
- }
-
- # We're using Perl backticks ` and "echo -n" here in order to
- # expand any shell escapes (such as backticks themselves) in every variable
- return echo_n ($str);
-}
-
-sub CONF_Handle_Open
-{
- my $base_dirname = getcwd();
- $base_dirname =~ s@.*/@@;
-
- my ($conf_in, $src_dir);
-
- if ($base_dirname =~ /^po(-.+)?$/)
- {
- if (-f "Makevars")
- {
- my $makefile_source;
-
- local (*IN);
- open (IN, "<Makevars") || die "can't open Makevars: $!";
-
- while (<IN>)
- {
- if (/^top_builddir[ \t]*=/)
- {
- $src_dir = $_;
- $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
-
- chomp $src_dir;
- if (-f "$src_dir" . "/configure.ac") {
- $conf_in = "$src_dir" . "/configure.ac" . "\n";
- } else {
- $conf_in = "$src_dir" . "/configure.in" . "\n";
- }
- last;
- }
- }
- close IN;
-
- $conf_in || die "Cannot find top_builddir in Makevars.";
- }
- elsif (-f "../configure.ac")
- {
- $conf_in = "../configure.ac";
- }
- elsif (-f "../configure.in")
- {
- $conf_in = "../configure.in";
- }
- else
- {
- my $makefile_source;
-
- local (*IN);
- open (IN, "<Makefile") || return;
-
- while (<IN>)
- {
- if (/^top_srcdir[ \t]*=/)
- {
- $src_dir = $_;
- $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
-
- chomp $src_dir;
- $conf_in = "$src_dir" . "/configure.in" . "\n";
-
- last;
- }
- }
- close IN;
-
- $conf_in || die "Cannot find top_srcdir in Makefile.";
- }
-
- open (CONF, "<$conf_in");
- }
- else
- {
- print STDERR "$PROGRAM: Unable to proceed.\n" .
- "Make sure to run this script inside the po directory.\n";
- exit;
- }
-}
-
-sub FindPackageName
-{
- my $version;
- my $domain = &FindMakevarsDomain;
- my $name = $domain || "untitled";
-
- &CONF_Handle_Open;
-
- my $conf_source; {
- local (*IN);
- open (IN, "<&CONF") || return $name;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $conf_source = <IN>;
- close IN;
- }
-
- # priority for getting package name:
- # 1. GETTEXT_PACKAGE
- # 2. first argument of AC_INIT (with >= 2 arguments)
- # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument)
-
- # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m
- # the \s makes this not work, why?
- if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m)
- {
- ($name, $version) = ($1, $2);
- $name =~ s/[\[\]\s]//g;
- $version =~ s/[\[\]\s]//g;
- $varhash{"AC_PACKAGE_NAME"} = $name;
- $varhash{"PACKAGE"} = $name;
- $varhash{"AC_PACKAGE_VERSION"} = $version;
- $varhash{"VERSION"} = $version;
- }
-
- if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m)
- {
- ($name, $version) = ($1, $2);
- $name =~ s/[\[\]\s]//g;
- $version =~ s/[\[\]\s]//g;
- $varhash{"AC_PACKAGE_NAME"} = $name;
- $varhash{"PACKAGE"} = $name;
- $varhash{"AC_PACKAGE_VERSION"} = $version;
- $varhash{"VERSION"} = $version;
- }
-
- # \s makes this not work, why?
- $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
-
- # prepend '$' to auto* internal variables, usually they are
- # used in configure.in/ac without the '$'
- $name =~ s/AC_/\$AC_/g;
- $name =~ s/\$\$/\$/g;
-
- $name = $domain if $domain;
-
- $name = SubstituteVariable ($name);
- $name =~ s/^["'](.*)["']$/$1/;
-
- return $name if $name;
-}
-
-
-sub FindPOTKeywords
-{
-
- my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_";
- my $varname = "XGETTEXT_OPTIONS";
- my $make_source; {
- local (*IN);
- open (IN, "<Makevars") || (open(IN, "<Makefile.in.in") && ($varname = "XGETTEXT_KEYWORDS")) || return $keywords;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $make_source = <IN>;
- close IN;
- }
-
- $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m;
-
- return $keywords;
-}
-
-sub FindMakevarsDomain
-{
-
- my $domain = "";
- my $makevars_source; {
- local (*IN);
- open (IN, "<Makevars") || return $domain;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $makevars_source = <IN>;
- close IN;
- }
-
- $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m;
- $domain =~ s/^\s+//;
- $domain =~ s/\s+$//;
-
- return $domain;
-}