Unify version scheme

This commit is contained in:
vit9696 2018-05-22 00:43:34 +03:00
parent 8ea96ffd5d
commit 4bb759780f
9 changed files with 38 additions and 11 deletions

2
.gitignore vendored
View File

@ -238,3 +238,5 @@ UEFITool
.qmake.stash
UEFITool.app/
uefitool_plugin_import.cpp
DerivedData
*.xcodeproj

View File

@ -36,6 +36,7 @@ HEADERS += uefipatch.h \
../ffsengine.h \
../treeitem.h \
../treemodel.h \
../version.h \
../LZMA/LzmaCompress.h \
../LZMA/LzmaDecompress.h \
../Tiano/EfiTianoDecompress.h \

View File

@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <QStringList>
#include <iostream>
#include <string>
#include "../version.h"
#include "uefipatch.h"
int main(int argc, char *argv[])
@ -30,7 +32,7 @@ int main(int argc, char *argv[])
UINT32 argumentsCount = args.length();
if (argumentsCount < 2) {
std::cout << "UEFIPatch 0.3.15 - UEFI image file patching utility" << std::endl << std::endl <<
std::cout << "UEFIPatch " PROGRAM_VERSION " - UEFI image file patching utility" << std::endl << std::endl <<
"Usage: UEFIPatch image_file [patches.txt] [-o output]" << std::endl << std::endl <<
"Patches will be read from patches.txt file by default\n";
return ERR_SUCCESS;

View File

@ -36,6 +36,7 @@ HEADERS += uefireplace.h \
../ffsengine.h \
../treeitem.h \
../treemodel.h \
../version.h \
../LZMA/LzmaCompress.h \
../LZMA/LzmaDecompress.h \
../Tiano/EfiTianoDecompress.h \

View File

@ -14,6 +14,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <QString>
#include <QStringList>
#include <iostream>
#include "../version.h"
#include "uefireplace.h"
int main(int argc, char *argv[])
@ -28,7 +30,7 @@ int main(int argc, char *argv[])
QStringList args = a.arguments();
if (args.length() < 5) {
std::cout << "UEFIReplace 0.1.3 - UEFI image file replacement utility" << std::endl << std::endl <<
std::cout << "UEFIReplace " PROGRAM_VERSION " - UEFI image file replacement utility" << std::endl << std::endl <<
"Usage: UEFIReplace image_file guid section_type contents_file [-o output] [-all] [-asis]" << std::endl;
return ERR_SUCCESS;
}

View File

@ -11,13 +11,14 @@
*/
#include "version.h"
#include "uefitool.h"
#include "ui_uefitool.h"
UEFITool::UEFITool(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::UEFITool),
version(tr("0.24.0"))
version(tr(PROGRAM_VERSION))
{
clipboard = QApplication::clipboard();

View File

@ -39,6 +39,7 @@ HEADERS += uefitool.h \
treemodel.h \
messagelistitem.h \
guidlineedit.h \
version.h \
LZMA/LzmaCompress.h \
LZMA/LzmaDecompress.h \
Tiano/EfiTianoDecompress.h \

View File

@ -55,11 +55,9 @@ elif [ "$UPLATFORM" = "win32" ]; then
export PATH="/c/Qt/5.6/mingw49_32_release_static/bin:$PATH"
fi
echo "Attempting to build UEFITool NE for ${UPLATFORM}..."
echo "Attempting to build UEFITool for ${UPLATFORM}..."
UEFITOOL_VER=$(cat uefitool.cpp | grep ^version | cut -d'"' -f2)
UEFIPATCH_VER=$(cat UEFIPatch/uefipatch_main.cpp | grep '"UEFIPatch [0-9]' | cut -d'"' -f2 | cut -d' ' -f2)
UEFIREPLACE_VER=$(cat UEFIReplace/uefireplace_main.cpp | grep '"UEFIReplace [0-9]' | cut -d'"' -f2 | cut -d' ' -f2)
UEFITOOL_VER=$(cat version.h | grep PROGRAM_VERSION | cut -d'"' -f2)
build_tool() {
echo "Building $1 $2"
@ -114,7 +112,7 @@ rm -rf dist
mkdir -p dist || exit 1
build_tool UEFITool "$UEFITOOL_VER" uefitool.pro
build_tool UEFIPatch "$UEFIPATCH_VER" uefipatch.pro patches*.txt
build_tool UEFIReplace "$UEFIREPLACE_VER" uefireplace.pro
build_tool UEFIPatch "$UEFITOOL_VER" uefipatch.pro patches*.txt
build_tool UEFIReplace "$UEFITOOL_VER" uefireplace.pro
exit 0

19
version.h Normal file
View File

@ -0,0 +1,19 @@
/* types.h
Copyright (c) 2015, Nikolaj Schlej. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
*/
#ifndef __VERSION_H__
#define __VERSION_H__
#define PROGRAM_VERSION "0.25.0"
#endif