Package: sponsorship-requests Severity: important X-Debbugs-CC: pkg-fgfs-crew@lists.alioth.debian.org Dear mentors and pkg-fgfs-crew maintainers, I am looking for a sponsor for the package "fgrun" into Unstable, perhaps into DELAYED/7 or DELAYED/10. * Package name : fgrun Version : 2016.4.0-0.1 Upstream Author : Frederic Bouvier <fredfgfs01@free.fr> * URL : https://sourceforge.net/p/flightgear/fgrun/ * License : GPL-2+ Section : games It builds those binary packages: fgrun - graphical frontend for running FlightGear To access further information about this package, please visit the following URL: https://mentors.debian.net/package/fgrun Alternatively, one can download the package with dget using this command: dget -x https://mentors.debian.net/debian/pool/main/f/fgrun/ fgrun_2016.4.0-0.1.dsc Alternatively, one can view and download detailed package information on deb- o-matic-amd64: dget -x http://debomatic-amd64.debian.net/distribution#unstable/fgrun/ 2016.4.0-0.1/ Changes since the last upload: fgrun (2016.4.0-0.1) unstable; urgency=medium . * Non-maintainer upload. * New upstream release. (Closes: #839357) - Drop patches applied upstream. - Refresh patches. * Switch upstream to SourceForge. - Update corresponding debian/watch file. (Closes: #851845) * Bump debhelper compat version to v10. * Apply "wrap-and-sort -abst". * Update Homepage information on SourceForge. Detailed explanations: * This package has a longstanding unfixed RC bug (FTBFS) and fell out of Stretch release. With absolutely zero reverse dependency and migration blocking, I believe fgrun should be able to enter unstable even though we are in freeze now (because it wouldn't affect other packages or Stretch release at all). * A stripped src debdiff is attached here to ease your review. The stripped part are translation PO file's updates. * For new d/watch file: I had a hard time making decisions and finally chose the sf.net redirector provided by qa.d.o, which points to flightgear *main* project tarballs. Fgrun is now a subproject of flightgear and I really couldn't find a better page to parse releases or even git tags. [1] Any suggestion would be welcome. [1] This should be the correct page but way too hard to write d/watch file: https://sourceforge.net/p/flightgear/fgrun/ref/next/tags/ -- Sincerely, Boyuan Yang
diff -Nru fgrun-3.4.0.final/CMakeLists.txt fgrun-2016.4.0/CMakeLists.txt --- fgrun-3.4.0.final/CMakeLists.txt 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/CMakeLists.txt 2017-03-08 00:57:18.000000000 +0800 @@ -20,7 +20,7 @@ set(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows") file(READ version versionFile) -string(STRIP ${versionFile} FGRUN_VERSION) +string(STRIP ${versionFile} FGRUN_VERSION) #packaging SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING") @@ -33,7 +33,7 @@ # split version string into components, note CMAKE_MATCH_0 is the entire regexp match string(REGEX MATCH "([0-9]+)\\.([0-9]+)" CPACK_PACKAGE_VERSION ${FGRUN_VERSION} ) -set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) +set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2}) message(STATUS "version is ${CPACK_PACKAGE_VERSION_MAJOR} dot ${CPACK_PACKAGE_VERSION_MINOR}") @@ -66,7 +66,7 @@ else (EXISTS ${TEST_3RDPARTY_DIR}) set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted") endif (EXISTS ${TEST_3RDPARTY_DIR}) - list(APPEND PLATFORM_LIBS "winmm.lib") + list(APPEND PLATFORM_LIBS "winmm.lib" "Shlwapi.lib") else (MSVC) set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted") endif (MSVC) @@ -75,13 +75,16 @@ message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}") set( OSG_MSVC "msvc" ) - if (${MSVC_VERSION} EQUAL 1700) + if (${MSVC_VERSION} EQUAL 1900) + set( OSG_MSVC ${OSG_MSVC}140 ) + elseif (${MSVC_VERSION} EQUAL 1800) + set( OSG_MSVC ${OSG_MSVC}120 ) + elseif (${MSVC_VERSION} EQUAL 1700) set( OSG_MSVC ${OSG_MSVC}110 ) elseif (${MSVC_VERSION} EQUAL 1600) set( OSG_MSVC ${OSG_MSVC}100 ) - else (${MSVC_VERSION} EQUAL 1700) - set( OSG_MSVC ${OSG_MSVC}90 ) - endif (${MSVC_VERSION} EQUAL 1700) + endif () + if (CMAKE_CL_64) set( OSG_MSVC ${OSG_MSVC}-64 ) set( MSVC_3RDPARTY_DIR 3rdParty.x64 ) @@ -97,7 +100,10 @@ set (CMAKE_LIBRARY_PATH ${FLTK_DIR}/lib ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/SimGear/lib ) set (CMAKE_INCLUDE_PATH ${FLTK_DIR}/include ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/SimGear/include) + + GET_FILENAME_COMPONENT(MSVC_ROOT_PARENT_DIR ${MSVC_3RDPARTY_ROOT} PATH) find_path(BOOST_ROOT boost/version.hpp + ${MSVC_ROOT_PARENT_DIR} ${MSVC_3RDPARTY_ROOT}/boost ${MSVC_3RDPARTY_ROOT}/boost_1_51_0 ${MSVC_3RDPARTY_ROOT}/boost_1_50_0 @@ -124,8 +130,8 @@ set(NOMINMAX 1) set( WINSOCK_LIBRARY "ws2_32.lib" ) - -endif(WIN32) + +endif(WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT") @@ -170,7 +176,7 @@ if (ENABLE_NLS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_NLS") endif (ENABLE_NLS) - + else (ENABLE_NLS AND GETTEXT_FOUND) set( INTL_LIBRARY "" ) @@ -224,7 +230,7 @@ endif() if ( CMAKE_DL_LIBS ) - list(APPEND FLTK_LIBRARIES ${CMAKE_DL_LIBS}) + list(APPEND FLTK_LIBRARIES ${CMAKE_DL_LIBS}) endif() set( CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR} ) @@ -240,7 +246,7 @@ HAVE_FLTK_1_3) if ( NOT HAVE_FLTK_1_3 ) - message( SEND_ERROR "FLTK 1.3 is required" ) + message( SEND_ERROR "FLTK 1.3 is required" ) endif ( NOT HAVE_FLTK_1_3 ) endif ( FLTK_FOUND ) diff -Nru fgrun-3.4.0.final/debian/changelog fgrun-2016.4.0/debian/changelog --- fgrun-3.4.0.final/debian/changelog 2016-07-24 16:28:17.000000000 +0800 +++ fgrun-2016.4.0/debian/changelog 2017-03-08 00:55:51.000000000 +0800 @@ -1,3 +1,17 @@ +fgrun (2016.4.0-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream release. (Closes: #839357) + - Drop patches applied upstream. + - Refresh patches. + * Switch upstream to SourceForge. + - Update corresponding debian/watch file. (Closes: #851845) + * Bump debhelper compat version to v10. + * Apply "wrap-and-sort -abst". + * Update Homepage information on SourceForge. + + -- Boyuan Yang <073plan@gmail.com> Wed, 08 Mar 2017 00:55:51 +0800 + fgrun (3.4.0.final-3) unstable; urgency=medium [ Gianfranco Costamagna ] diff -Nru fgrun-3.4.0.final/debian/compat fgrun-2016.4.0/debian/compat --- fgrun-3.4.0.final/debian/compat 2016-01-23 15:39:09.000000000 +0800 +++ fgrun-2016.4.0/debian/compat 2017-03-08 00:55:51.000000000 +0800 @@ -1 +1 @@ -9 +10 diff -Nru fgrun-3.4.0.final/debian/control fgrun-2016.4.0/debian/control --- fgrun-3.4.0.final/debian/control 2016-07-24 16:25:33.000000000 +0800 +++ fgrun-2016.4.0/debian/control 2017-03-08 00:55:51.000000000 +0800 @@ -2,20 +2,30 @@ Section: games Priority: optional Maintainer: Debian FlightGear Crew <pkg-fgfs-crew@lists.alioth.debian.org> -Uploaders: Christopher Baines <cbaines8@gmail.com>, - Markus Wanner <markus@bluegap.ch> -Build-Depends: debhelper (>= 9), cmake, libfltk1.3-dev, fluid, - libsimgear-dev (>= 3.4.0~), libboost-dev, libexpat-dev, - zlib1g-dev (>= 1:1.2.3.4.dfsg-3) +Uploaders: + Christopher Baines <cbaines8@gmail.com>, + Markus Wanner <markus@bluegap.ch>, +Build-Depends: + cmake, + debhelper (>= 10~), + fluid, + libboost-dev, + libexpat-dev, + libfltk1.3-dev, + libsimgear-dev (>= 3.4.0~), + zlib1g-dev (>= 1:1.2.3.4.dfsg-3), Standards-Version: 3.9.8 -Homepage: http://fgrun.sourceforge.net/ +Homepage: https://sourceforge.net/p/flightgear/fgrun/ Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/fgrun.git Vcs-Git: https://anonscm.debian.org/git/collab-maint/fgrun.git Package: fgrun Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: flightgear +Depends: + ${misc:Depends}, + ${shlibs:Depends}, +Recommends: + flightgear, Description: graphical frontend for running FlightGear FlightGear Launch Control (FGRun) is a graphical frontend for running the FlightGear Flight Simulator (fgfs). diff -Nru fgrun-3.4.0.final/debian/copyright fgrun-2016.4.0/debian/copyright --- fgrun-3.4.0.final/debian/copyright 2016-01-23 15:39:10.000000000 +0800 +++ fgrun-2016.4.0/debian/copyright 2017-03-08 00:55:51.000000000 +0800 @@ -7,7 +7,7 @@ Copyright: 2010, Bernie Bright 2010, Frederic Bouvier License: GPL-2+ - + Files: src/Fl_Table.cxx src/Fl_Table.H src/Fl_Table_Row.cxx @@ -47,4 +47,3 @@ . A copy of the license is available on Debian systems at /usr/share/common-licenses/LGPL-2 - diff -Nru fgrun-3.4.0.final/debian/patches/add-debian-defaults.diff fgrun-2016.4.0/debian/patches/add-debian-defaults.diff --- fgrun-3.4.0.final/debian/patches/add-debian-defaults.diff 2016-01-23 15:39:10.000000000 +0800 +++ fgrun-2016.4.0/debian/patches/add-debian-defaults.diff 2017-03-08 00:55:51.000000000 +0800 @@ -1,8 +1,15 @@ -Description: Add default directories used by Debian - If not given, fgrun asks the user to provide several directories. We - ease this process by defaulting to the install locations used by Debian. -Author: Markus Wanner <markus@bluegap.ch> +From: Markus Wanner <markus@bluegap.ch> +Date: Mon, 10 Feb 2014 13:37:04 +0100 +Subject: Add default directories used by Debian +If not given, fgrun asks the user to provide several directories. We +ease this process by defaulting to the install locations used by Debian. +--- + src/main.cxx | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/main.cxx b/src/main.cxx +index c9aee92..cf51f07 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -37,10 +37,10 @@ diff -Nru fgrun-3.4.0.final/debian/patches/find-and-link-libs.patch fgrun-2016.4.0/debian/patches/find-and-link-libs.patch --- fgrun-3.4.0.final/debian/patches/find-and-link-libs.patch 2016-07-24 16:25:33.000000000 +0800 +++ fgrun-2016.4.0/debian/patches/find-and-link-libs.patch 2017-03-08 00:55:51.000000000 +0800 @@ -1,15 +1,21 @@ -Description: Fix build failures by detecting and linking libraries: - - OPENGL - - Threads - - EXPAT +From: Gianfranco Costamagna <locutusofborg@debian.org> +Date: Sun, 11 Sep 2016 22:00:11 +0200 +Subject: Find and link libs -Author: Gianfranco Costamagna <locutusofborg@debian.org> +Fix build failures by detecting and linking libraries: +- OPENGL +- Threads +- EXPAT +--- + CMakeLists.txt | 4 ++++ + src/CMakeLists.txt | 2 ++ + 2 files changed, 6 insertions(+) -Index: fgrun-3.4.0.final/CMakeLists.txt -=================================================================== ---- fgrun-3.4.0.final.orig/CMakeLists.txt -+++ fgrun-3.4.0.final/CMakeLists.txt -@@ -133,6 +133,9 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03f3e47..9f18742 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -139,6 +139,9 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}") find_package(Boost REQUIRED) find_package(ZLIB REQUIRED) @@ -19,7 +25,7 @@ if (SHARED_FLTK) #see http://sources.debian.net/src/fltk1.3/1.3.2-4/README.CMake.txt lines 200-240 find_package(FLTK REQUIRED NO_MODULE) -@@ -143,6 +146,7 @@ +@@ -149,6 +152,7 @@ else (SHARED_FLTK) endif (SHARED_FLTK) find_package(OpenSceneGraph 2.8.1 REQUIRED osgText osgDB osgParticle osgUtil osgViewer osgGA) find_package(SimGear ${FGRUN_VERSION} REQUIRED) @@ -27,11 +33,11 @@ if (ENABLE_NLS) find_package(Gettext) endif (ENABLE_NLS) -Index: fgrun-3.4.0.final/src/CMakeLists.txt -=================================================================== ---- fgrun-3.4.0.final.orig/src/CMakeLists.txt -+++ fgrun-3.4.0.final/src/CMakeLists.txt -@@ -74,6 +74,8 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index f32e1c2..b619f3b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -74,6 +74,8 @@ target_link_libraries(fgrun ${PLATFORM_LIBS} ${OPENGL_LIBRARIES} ${CMAKE_DL_LIBS} diff -Nru fgrun-3.4.0.final/debian/patches/fix-cmake-dl fgrun-2016.4.0/debian/patches/fix-cmake-dl --- fgrun-3.4.0.final/debian/patches/fix-cmake-dl 2016-01-23 15:39:10.000000000 +0800 +++ fgrun-2016.4.0/debian/patches/fix-cmake-dl 2017-03-08 00:55:51.000000000 +0800 @@ -1,14 +1,18 @@ -Description: tell cmake to link against libdl -Author: Christopher Baines <cbaines8@gmail.com> +From: Christopher Baines <cbaines8@gmail.com> +Date: Thu, 30 Jan 2014 22:33:23 +0100 +Subject: tell cmake to link against libdl +--- + CMakeLists.txt | 2 ++ + src/CMakeLists.txt | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4de3865..03f3e47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -224,9 +224,11 @@ - endif() - - if ( CMAKE_DL_LIBS ) -- list(APPEND FLTK_LIBRARIES ${CMAKE_DL_LIBS}) -+ list(APPEND FLTK_LIBRARIES ${CMAKE_DL_LIBS}) +@@ -233,6 +233,8 @@ if ( FLTK_FOUND ) + list(APPEND FLTK_LIBRARIES ${CMAKE_DL_LIBS}) endif() + list(APPEND FLTK_LIBRARIES ${CMAKE_DL_LIBS}) @@ -16,9 +20,11 @@ set( CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR} ) set( CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES} ) message(STATUS "Using FLTK_LIBRARIES for fgrun: ${FLTK_LIBRARIES}") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8d51267..f32e1c2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -73,6 +73,7 @@ +@@ -73,6 +73,7 @@ target_link_libraries(fgrun ${OPENPTY_LIBRARY} ${PLATFORM_LIBS} ${OPENGL_LIBRARIES} diff -Nru fgrun-3.4.0.final/debian/patches/fix-scenery-dir-bug.diff fgrun-2016.4.0/debian/patches/fix-scenery-dir-bug.diff --- fgrun-3.4.0.final/debian/patches/fix-scenery-dir-bug.diff 2016-01-23 15:39:10.000000000 +0800 +++ fgrun-2016.4.0/debian/patches/fix-scenery-dir-bug.diff 1970-01-01 07:30:00.000000000 +0730 @@ -1,13 +0,0 @@ -Description: Fix a bug in case FG_SCENERY is not set. -Author: Rebecca Palmer - ---- a/src/wizard_funcs.cxx -+++ b/src/wizard_funcs.cxx -@@ -335,6 +335,7 @@ - else if (!def_fg_scenery.empty()) - { - fg_scenery = def_fg_scenery; -+ prefs.set("fg_scenery", def_fg_scenery.c_str()); - } - else if (fg_root_->size() > 0) - { diff -Nru fgrun-3.4.0.final/debian/patches/kfreebsd.patch fgrun-2016.4.0/debian/patches/kfreebsd.patch --- fgrun-3.4.0.final/debian/patches/kfreebsd.patch 2016-01-23 15:39:10.000000000 +0800 +++ fgrun-2016.4.0/debian/patches/kfreebsd.patch 2017-03-08 00:55:51.000000000 +0800 @@ -1,7 +1,17 @@ +From: Debian FlightGear Crew <pkg-fgfs-crew@lists.alioth.debian.org> +Date: Wed, 9 Nov 2011 11:18:56 +0000 +Subject: kfreebsd + Fixes bug #636366, OLCUC is a linux-specific extention to termios +--- + src/run_posix.cxx | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/run_posix.cxx b/src/run_posix.cxx +index 166203b..9adfc31 100644 --- a/src/run_posix.cxx +++ b/src/run_posix.cxx -@@ -60,7 +60,11 @@ +@@ -60,7 +60,11 @@ Wizard::run_fgfs( const std::string &args ) #if defined(HAVE_TERMIOS_H) struct termios term; tcgetattr( STDOUT_FILENO, &term ); diff -Nru fgrun-3.4.0.final/debian/patches/series fgrun-2016.4.0/debian/patches/series --- fgrun-3.4.0.final/debian/patches/series 2016-07-24 16:25:33.000000000 +0800 +++ fgrun-2016.4.0/debian/patches/series 2017-03-08 00:55:51.000000000 +0800 @@ -1,5 +1,4 @@ add-debian-defaults.diff -fix-scenery-dir-bug.diff kfreebsd.patch fix-cmake-dl find-and-link-libs.patch diff -Nru fgrun-3.4.0.final/debian/watch fgrun-2016.4.0/debian/watch --- fgrun-3.4.0.final/debian/watch 2016-01-23 15:39:10.000000000 +0800 +++ fgrun-2016.4.0/debian/watch 2017-03-08 00:55:51.000000000 +0800 @@ -1,5 +1,2 @@ -version=3 -opts="filenamemangle=s/.*fgrun-version\/([\d\.]+\S+)$/fgrun-$1/,\ -uversionmangle=s/\-final/.final/" \ -http://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=gitorious/fg/fgrun \ -.*=fgrun-version\/(\d+\.\d*[02468]\.\d[^\s/]*)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz) +version=4 +http://sf.net/flightgear/ flightgear-(.+)@ARCHIVE_EXT@ debian uupdate diff -Nru fgrun-3.4.0.final/po/CMakeLists.txt fgrun-2016.4.0/po/CMakeLists.txt --- fgrun-3.4.0.final/po/CMakeLists.txt 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/po/CMakeLists.txt 2017-03-08 00:13:16.000000000 +0800 @@ -1,4 +1,4 @@ if (ENABLE_NLS) - gettext_create_translations( fgrun.pot ALL de.po es.po fr.po it.po ja.po nl.po pl.po pt.po) + gettext_create_translations( fgrun.pot ALL de.po es.po fr.po it.po ja.po nl.po pl.po pt.po zh_CN.po) endif (ENABLE_NLS) diff -Nru fgrun-3.4.0.final/po/.gitignore fgrun-2016.4.0/po/.gitignore --- fgrun-3.4.0.final/po/.gitignore 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/po/.gitignore 1970-01-01 07:30:00.000000000 +0730 @@ -1 +0,0 @@ -*~ diff -Nru fgrun-3.4.0.final/po/zh_CN.po fgrun-2016.4.0/po/zh_CN.po --- fgrun-3.4.0.final/po/zh_CN.po 1970-01-01 07:30:00.000000000 +0730 +++ fgrun-2016.4.0/po/zh_CN.po 2017-03-08 00:10:49.000000000 +0800 @@ -0,0 +1,1668 @@ diff -Nru fgrun-3.4.0.final/src/fgfsrc.cxx fgrun-2016.4.0/src/fgfsrc.cxx --- fgrun-3.4.0.final/src/fgfsrc.cxx 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/src/fgfsrc.cxx 2017-03-08 00:14:21.000000000 +0800 @@ -47,8 +47,8 @@ char buf[ buflen ]; #if defined(WIN32) - prefs.get( "fg_root", buf, "", buflen-1 ); - strcat( buf, "/system.fgfsrc" ); + prefs.get( "fg_home", buf, "", buflen-1 ); + strcat( buf, "/fgfsrc" ); fl_filename_absolute( buf, buf ); #else fl_filename_expand( buf, "~/.fgfsrc" ); diff -Nru fgrun-3.4.0.final/src/wizard_funcs.cxx fgrun-2016.4.0/src/wizard_funcs.cxx --- fgrun-3.4.0.final/src/wizard_funcs.cxx 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/src/wizard_funcs.cxx 2017-03-08 00:16:06.000000000 +0800 @@ -296,14 +296,13 @@ } fg_root_->value( buf ); SGPath fgPath(buf); - if ( fg_root_->size() == 0 ) + if ( fgPath.isNull() ) { - char *e = getenv( "FG_ROOT" ); - if ( e ) + if (const char* e = getenv("FG_ROOT")) { + fgPath = SGPath::fromEnv("FG_ROOT"); prefs.set( "fg_root", e ); fg_root_->value( e ); - fgPath = e; } } @@ -335,6 +334,7 @@ else if (!def_fg_scenery.empty()) { fg_scenery = def_fg_scenery; + prefs.set("fg_scenery", def_fg_scenery.c_str()); } else if (fg_root_->size() > 0) { @@ -1099,19 +1099,12 @@ bool recursive, vector<SGPath>& ac ) { - string s( dir.str() ); - -#ifdef WIN32 - // Ensure there is a trailing slash. - if (*s.rbegin() != '/') - s.append( "/" ); -#endif - simgear::Dir directory( dir ); simgear::PathList files = directory.children(); for ( simgear::PathList::iterator ii = files.begin(); ii != files.end(); ++ii ) { - if (fl_filename_match(ii->c_str(), "*-set.xml")) + const std::string childName = ii->utf8Str(); + if (fl_filename_match(childName.c_str(), "*-set.xml")) { ac.push_back( *ii ); } @@ -1148,8 +1141,9 @@ { SGPath rpath( fg_root_->value() ); rpath.append( "Aircraft" ); - map<string, vector< SGPath > > ac; - search_aircraft_dir( rpath, true, ac[ rpath.str() ] ); + typedef std::map<std::string, simgear::PathList> AircraftDirSetMap; + AircraftDirSetMap ac; + search_aircraft_dir( rpath, true, ac[ rpath.utf8Str() ] ); const int buflen = FL_PATH_MAX; char buf[ buflen ]; @@ -1159,12 +1153,11 @@ fg_aircraft = buf; } - typedef vector<string> vs_t; - vs_t va( sgPathSplit( fg_aircraft ) ); - for (vs_t::size_type i = 0; i < va.size(); ++i) + + simgear::PathList va( SGPath::pathsFromUtf8( fg_aircraft ) ); + for (size_t i = 0; i < va.size(); ++i) { - SGPath path( va[ i ] ); - search_aircraft_dir( path, true, ac[ path.str() ] ); + search_aircraft_dir( va[i], true, ac[ va[i].utf8Str() ] ); } // Empty the aircraft browser list. @@ -1181,24 +1174,16 @@ bool selected = false; map<string,vector<AircraftData*>,ICompare> am; - for ( map<string, vector< SGPath > >::iterator ii = ac.begin(); ii != ac.end(); ++ii ) + for (AircraftDirSetMap::iterator ii = ac.begin(); ii != ac.end(); ++ii ) { // Populate the aircraft browser list. - for (vector<SGPath>::size_type vi = 0; vi < ii->second.size(); ++vi) + for (simgear::PathList::size_type vi = 0; vi < ii->second.size(); ++vi) { - SGPath path = ii->first; - string s( ii->second[vi].str() ), name( s ); - name.erase( 0, path.str().size() ); - if ( name[0] == '/' ) - name.erase( 0, 1 ); - string::size_type p = name.find( '/' ); - if ( p != string::npos ) - name.erase( p ); - + SGPath setPath = ii->second[vi]; SGPropertyNode props; try { - readProperties( s.c_str(), &props ); + readProperties( setPath, &props ); } catch (const sg_exception&) { @@ -1212,32 +1197,32 @@ if ( desc.find( "Alias " ) == string::npos ) { // Extract aircraft name from filename. - string::size_type pos = s.rfind( "/" ); - string::size_type epos = s.find( "-set.xml", pos ); - string ss( s.substr( pos+1, epos-pos-1 ) ); + std::string name = setPath.file(); + string::size_type epos = name.find( "-set.xml" ); + string ss( name.substr( 0, epos ) ); AircraftData* data = new AircraftData; data->name = ss; - data->dir = name; - data->root = path.str(); + data->dir = setPath.dirPath().file(); + data->root = ii->first; data->desc = desc; data->status = props.getStringValue( "/sim/status", _( "Unknown" ) ); data->modelPath = props.getStringValue( "/sim/model/path", _( "Unknown" ) ); string splash = props.getStringValue( "/sim/startup/splash-texture", _( "" ) ); if (splash.empty()) { - data->thumbnailPath = SGPath(s).dir() + "/thumbnail.jpg"; + data->thumbnailPath = setPath.dir() + "/thumbnail.jpg"; } else { - data->thumbnailPath = path.str().substr(0, path.str().size()-8) + splash; + data->thumbnailPath = setPath.dir() + splash; } data->author = props.getStringValue( "/sim/author", _( "Unknown" ) ); data->fdm = props.getIntValue( "/sim/rating/FDM", -1 ); data->systems = props.getIntValue( "/sim/rating/systems", -1 ); data->cockpit = props.getIntValue( "/sim/rating/cockpit", -1 ); data->model = props.getIntValue( "/sim/rating/model", -1 ); - am[name].push_back( data ); + am[data->dir].push_back( data ); } } } diff -Nru fgrun-3.4.0.final/version fgrun-2016.4.0/version --- fgrun-3.4.0.final/version 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/version 2017-03-08 00:13:25.000000000 +0800 @@ -1 +1 @@ -3.4.0 +2016.4.0 diff -Nru fgrun-3.4.0.final/xgettext.bat fgrun-2016.4.0/xgettext.bat --- fgrun-3.4.0.final/xgettext.bat 2015-01-19 23:59:25.000000000 +0800 +++ fgrun-2016.4.0/xgettext.bat 2017-03-08 00:13:52.000000000 +0800 @@ -7,4 +7,5 @@ ..\..\gettext\bin\msgmerge -U it.po fgrun.pot ..\..\gettext\bin\msgmerge -U pl.po fgrun.pot ..\..\gettext\bin\msgmerge -U es.po fgrun.pot -cd .. \ 文件尾没有换行符 +..\..\gettext\bin\msgmerge -U zh_CN.po fgrun.pot +cd ..
Attachment:
signature.asc
Description: This is a digitally signed message part.