diff options
author | Mateusz Skowroński <skowri@gmail.com> | 2016-04-16 23:59:21 +0200 |
---|---|---|
committer | Thomas Karl Pietrowski <thopiekar@googlemail.com> | 2016-04-16 23:59:21 +0200 |
commit | 62768aba4a6938e0c65dd3aeb39d5938b5ca7c31 (patch) | |
tree | 57d4753d922bf507b39a785b0ad4bec67d6c727d /pylupdate | |
parent | cfc0276dcb1988a4001fa7deece028d63f5d5bc7 (diff) |
Rename tools to show they are compatible with PySide2 and allow insta… (#4)
* Rename tools to show they are compatible with PySide2 and allow installation parallel to PySide1 tools.
* Fix install target typo.
Diffstat (limited to 'pylupdate')
-rw-r--r-- | pylupdate/CMakeLists.txt | 9 | ||||
-rw-r--r-- | pylupdate/fetchtr.cpp | 10 | ||||
-rw-r--r-- | pylupdate/main.cpp | 24 | ||||
-rw-r--r-- | pylupdate/pyside2-lupdate.1 (renamed from pylupdate/pyside-lupdate.1) | 10 |
4 files changed, 26 insertions, 27 deletions
diff --git a/pylupdate/CMakeLists.txt b/pylupdate/CMakeLists.txt index 72cdf7d..83e5bf0 100644 --- a/pylupdate/CMakeLists.txt +++ b/pylupdate/CMakeLists.txt @@ -19,8 +19,8 @@ find_package(Qt5Widgets) set(lupdate_MOC_HEADERS translator.h) qt5_wrap_cpp(lupdate_MOC_OUTFILES ${lupdate_MOC_HEADERS}) -add_executable(pyside-lupdate ${lupdate_SRC} ${lupdate_MOC_OUTFILES}) -include_directories(pyside-lupdate +add_executable(pyside2-lupdate ${lupdate_SRC} ${lupdate_MOC_OUTFILES}) +include_directories(pyside2-lupdate ${CMAKE_CURRENT_SOURCE_DIR} ${Qt5Xml_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS} @@ -28,18 +28,17 @@ include_directories(pyside-lupdate ${Qt5Widgets_INCLUDE_DIRS} ) -target_link_libraries(pyside-lupdate +target_link_libraries(pyside2-lupdate ${Qt5Core_LIBRARIES} ${Qt5Xml_LIBRARIES} ${Qt5Gui_LIBRARIES} ${Qt5Widgets_LIBRARIES} ) -install(TARGETS pyside-lupdate RUNTIME DESTINATION bin) +install(TARGETS pyside2-lupdate RUNTIME DESTINATION bin) # Man pages if (NOT win32) file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/*.1") install(FILES ${manpages} DESTINATION share/man/man1) endif() - diff --git a/pylupdate/fetchtr.cpp b/pylupdate/fetchtr.cpp index 8f3d138..06485a4 100644 --- a/pylupdate/fetchtr.cpp +++ b/pylupdate/fetchtr.cpp @@ -478,7 +478,7 @@ static bool matchString( QByteArray *s ) static bool matchEncoding( bool *utf8 ) { // Remove any leading module paths. - if (yyTok == Tok_Ident && strcmp(yyIdent, "PySide") == 0) + if (yyTok == Tok_Ident && strcmp(yyIdent, "PySide2") == 0) { yyTok = getToken(); @@ -731,7 +731,7 @@ void fetchtr_py( const char *fileName, MetaTranslator *tor, char buf[100]; strerror_s(buf, sizeof(buf), errno); fprintf( stderr, - "pyside-lupdate error: Cannot open Python source file '%s': %s\n", + "pyside2-lupdate error: Cannot open Python source file '%s': %s\n", fileName, buf ); } #else @@ -739,7 +739,7 @@ void fetchtr_py( const char *fileName, MetaTranslator *tor, if ( yyInFile == 0 ) { if ( mustExist ) fprintf( stderr, - "pyside-lupdate error: Cannot open Python source file '%s': %s\n", + "pyside2-lupdate error: Cannot open Python source file '%s': %s\n", fileName, strerror(errno) ); #endif return; @@ -862,10 +862,10 @@ void fetchtr_ui( const char *fileName, MetaTranslator *tor, #if defined(_MSC_VER) && _MSC_VER >= 1400 char buf[100]; strerror_s(buf, sizeof(buf), errno); - fprintf( stderr, "pyside-lupdate error: cannot open UI file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: cannot open UI file '%s': %s\n", fileName, buf ); #else - fprintf( stderr, "pyside-lupdate error: cannot open UI file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: cannot open UI file '%s': %s\n", fileName, strerror(errno) ); #endif } diff --git a/pylupdate/main.cpp b/pylupdate/main.cpp index 1f4d3ce..f0e6d5b 100644 --- a/pylupdate/main.cpp +++ b/pylupdate/main.cpp @@ -54,8 +54,8 @@ typedef QList<MetaTranslatorMessage> TML; static void printUsage() { fprintf( stderr, "Usage:\n" - " pyside-lupdate [options] project-file\n" - " pyside-lupdate [options] source-files -ts ts-files\n" + " pyside2-lupdate [options] project-file\n" + " pyside2-lupdate [options] source-files -ts ts-files\n" "Options:\n" " -help Display this information and exit\n" " -noobsolete\n" @@ -63,7 +63,7 @@ static void printUsage() " -verbose\n" " Explain what is being done\n" " -version\n" - " Display the version of pyside-lupdate and exit\n" ); + " Display the version of pyside2-lupdate and exit\n" ); } static void updateTsFiles( const MetaTranslator& fetchedTor, @@ -90,10 +90,10 @@ static void updateTsFiles( const MetaTranslator& fetchedTor, #if defined(_MSC_VER) && _MSC_VER >= 1400 char buf[100]; strerror_s(buf, sizeof(buf), errno); - fprintf( stderr, "pyside-lupdate error: Cannot save '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot save '%s': %s\n", fn.toLatin1().constData(), buf ); #else - fprintf( stderr, "pyside-lupdate error: Cannot save '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot save '%s': %s\n", fn.toLatin1().constData(), strerror(errno) ); #endif } @@ -135,7 +135,7 @@ int main( int argc, char **argv ) verbose = true; continue; } else if ( qstrcmp(argv[i], "-version") == 0 ) { - fprintf( stderr, "pyside-lupdate version %s\n", QT_VERSION_STR ); + fprintf( stderr, "pyside2-lupdate version %s\n", QT_VERSION_STR ); return 0; } else if ( qstrcmp(argv[i], "-ts") == 0 ) { metTsFlag = true; @@ -152,10 +152,10 @@ int main( int argc, char **argv ) #if defined(_MSC_VER) && _MSC_VER >= 1400 char buf[100]; strerror_s(buf, sizeof(buf), errno); - fprintf( stderr, "pyside-lupdate error: Cannot open file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot open file '%s': %s\n", argv[i], buf ); #else - fprintf( stderr, "pyside-lupdate error: Cannot open file '%s': %s\n", + fprintf( stderr, "pyside2-lupdate error: Cannot open file '%s': %s\n", argv[i], strerror(errno) ); #endif return 1; @@ -207,12 +207,12 @@ int main( int argc, char **argv ) if ( !metSomething ) { fprintf( stderr, - "pyside-lupdate warning: File '%s' does not look like a" + "pyside2-lupdate warning: File '%s' does not look like a" " project file\n", argv[i] ); } else if ( tsFileNames.isEmpty() ) { fprintf( stderr, - "pyside-lupdate warning: Met no 'TRANSLATIONS' entry in" + "pyside2-lupdate warning: Met no 'TRANSLATIONS' entry in" " project file '%s'\n", argv[i] ); } @@ -224,13 +224,13 @@ int main( int argc, char **argv ) tsFileNames.append( argv[i] ); } else { fprintf( stderr, - "pyside-lupdate warning: For some reason, I cannot" + "pyside2-lupdate warning: For some reason, I cannot" " save '%s'\n", argv[i] ); } } else { fprintf( stderr, - "pyside-lupdate error: File '%s' lacks .ts extension\n", + "pyside2-lupdate error: File '%s' lacks .ts extension\n", argv[i] ); } } else { diff --git a/pylupdate/pyside-lupdate.1 b/pylupdate/pyside2-lupdate.1 index d2ea10d..d5e95e0 100644 --- a/pylupdate/pyside-lupdate.1 +++ b/pylupdate/pyside2-lupdate.1 @@ -1,12 +1,12 @@ -.TH PYSIDE-LUPDATE "1" "December 2010" "pyside-lupdate" "User Commands" +.TH PYSIDE-LUPDATE "1" "December 2010" "pyside2-lupdate" "User Commands" .SH NAME -pyside\-lupdate \- extracts translatable messages from Qt UI files and Python source code. +pyside2\-lupdate \- extracts translatable messages from Qt UI files and Python source code. .SH DESCRIPTION .SS "Usage:" .IP -pyside\-lupdate [options] project\-file +pyside2\-lupdate [options] project\-file .IP -pyside\-lupdate [options] source\-files \-ts ts\-files +pyside2\-lupdate [options] source\-files \-ts ts\-files .SS "Options:" .TP \fB\-noobsolete @@ -16,7 +16,7 @@ Drop all obsolete strings Explain what is being done .TP \fB\-version -Display the version of pyside-lupdate and exit +Display the version of pyside2-lupdate and exit .TP \fB\-help Display this information and exit |