diff --git a/Valentina.pro b/Valentina.pro index 9c5f07496..a3d4f4742 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -86,6 +86,7 @@ CONFIG(debug, debug|release){ -Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \ -Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\ -Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3 + -ftrapv } } else { *-g++{#Don't use additional GCC keys on Windows system. diff --git a/share/resources/valentina.rc b/share/resources/valentina.rc index 2ab63e289..3fde083b5 100644 --- a/share/resources/valentina.rc +++ b/share/resources/valentina.rc @@ -1 +1,31 @@ IDI_ICON1 ICON DISCARDABLE "icon/64x64/icon64x64.ico" + +#include +#include "version.h" + +VS_VERSION_INFO VERSIONINFO +FILEVERSION VER_FILEVERSION +PRODUCTVERSION VER_PRODUCTVERSION +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", VER_COMPANYNAME_STR + VALUE "FileDescription", VER_FILEDESCRIPTION_STR + VALUE "FileVersion", VER_FILEVERSION_STR + VALUE "InternalName", VER_INTERNALNAME_STR + VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR + VALUE "LegalTrademarks1", VER_LEGALTRADEMARKS1_STR + VALUE "LegalTrademarks2", VER_LEGALTRADEMARKS2_STR + VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR + VALUE "ProductName", VER_PRODUCTNAME_STR + VALUE "ProductVersion", VER_PRODUCTVERSION_STR + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END diff --git a/src/main.cpp b/src/main.cpp index de0214e9c..5677647d4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,6 +33,7 @@ #include #include #include "tablewindow.h" +#include "version.h" void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) { @@ -130,10 +131,12 @@ int main(int argc, char *argv[]) qInstallMessageHandler(noisyFailureMsgHandler); } #endif - app.setApplicationDisplayName("Valentina"); - app.setApplicationName("Valentina"); - app.setOrganizationName("ValentinaTeam"); - app.setOrganizationDomain("valentinaproject.bitbucket.org"); + app.setApplicationDisplayName(VER_PRODUCTNAME_STR); + app.setApplicationName(VER_INTERNALNAME_STR); + app.setOrganizationName(VER_COMPANYNAME_STR); + app.setOrganizationDomain(VER_COMPANYDOMAIN_STR); + // Setting the Application version + app.setApplicationVersion(APP_VERSION); QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QApplication::applicationName()); diff --git a/src/src.pri b/src/src.pri index 68200a263..31e8d0c14 100644 --- a/src/src.pri +++ b/src/src.pri @@ -1,7 +1,8 @@ SOURCES += src/main.cpp \ src/mainwindow.cpp \ src/tablewindow.cpp \ - src/stable.cpp + src/stable.cpp \ + src/version.cpp HEADERS += src/mainwindow.h \ src/options.h \ diff --git a/src/version.cpp b/src/version.cpp new file mode 100644 index 000000000..40ed3fe2a --- /dev/null +++ b/src/version.cpp @@ -0,0 +1,35 @@ +/************************************************************************ + ** + ** @file version.cpp + ** @author Roman Telezhinsky + ** @date 16 4, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. + ** + ** Valentina 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 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina 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 Valentina. If not, see . + ** + *************************************************************************/ + +extern const int MAJOR_VERSION = 0; +extern const int MINOR_VERSION = 2; +extern const int DEBUG_VERSION = 2; + +extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); +extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " + "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE."); diff --git a/src/version.h b/src/version.h index e4a035cfd..f5964d750 100644 --- a/src/version.h +++ b/src/version.h @@ -31,11 +31,28 @@ #include -extern const int MAJOR_VERSION = 0; -extern const int MINOR_VERSION = 2; -extern const int DEBUG_VERSION = 2; +extern const int MAJOR_VERSION; +extern const int MINOR_VERSION; +extern const int DEBUG_VERSION; + +extern const QString APP_VERSION; +extern const QString WARRANTY; + +#define VER_FILEVERSION 0,2,2,0 +#define VER_FILEVERSION_STR "0.2.2.0\0" + +#define VER_PRODUCTVERSION 0,2,2,0 +#define VER_PRODUCTVERSION_STR "0.2\0" + +#define VER_COMPANYNAME_STR "ValentinaTeam" +#define VER_FILEDESCRIPTION_STR "Valentina" +#define VER_INTERNALNAME_STR "Valentina" +#define VER_LEGALCOPYRIGHT_STR "Copyright © 2014 Valentina Team" +#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved" +#define VER_LEGALTRADEMARKS2_STR VER_LEGALTRADEMARKS1_STR +#define VER_ORIGINALFILENAME_STR "valentina.exe" +#define VER_PRODUCTNAME_STR "Valentina" + +#define VER_COMPANYDOMAIN_STR "www.valentina-project.org" -extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); -extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " - "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE."); #endif // VERSION_H