Skip to content

Commit

Permalink
Unify version scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed May 21, 2018
1 parent 8176613 commit 997c007
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,5 @@ UEFITool
.qmake.stash
UEFITool.app/
uefitool_plugin_import.cpp
DerivedData
*.xcodeproj
1 change: 1 addition & 0 deletions UEFIPatch/uefipatch.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ HEADERS += uefipatch.h \
../ffsengine.h \
../treeitem.h \
../treemodel.h \
../version.h \
../LZMA/LzmaCompress.h \
../LZMA/LzmaDecompress.h \
../Tiano/EfiTianoDecompress.h \
Expand Down
4 changes: 3 additions & 1 deletion UEFIPatch/uefipatch_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand All @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion UEFIReplace/uefireplace.pro
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ HEADERS += uefireplace.h \
../ffsengine.h \
../treeitem.h \
../treemodel.h \
../version.h \
../LZMA/LzmaCompress.h \
../LZMA/LzmaDecompress.h \
../Tiano/EfiTianoDecompress.h \
../Tiano/EfiTianoCompress.h
../Tiano/EfiTianoCompress.h
4 changes: 3 additions & 1 deletion UEFIReplace/uefireplace_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand All @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion uefitool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 1 addition & 0 deletions uefitool.pro
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ HEADERS += uefitool.h \
treemodel.h \
messagelistitem.h \
guidlineedit.h \
version.h \
LZMA/LzmaCompress.h \
LZMA/LzmaDecompress.h \
Tiano/EfiTianoDecompress.h \
Expand Down
12 changes: 5 additions & 7 deletions unixbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -113,8 +111,8 @@ build_tool() {
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 UEFITool "$UEFITOOL_VER" uefitool.pro
build_tool UEFIPatch "$UEFITOOL_VER" uefipatch.pro patches*.txt
build_tool UEFIReplace "$UEFITOOL_VER" uefireplace.pro

exit 0
19 changes: 19 additions & 0 deletions version.h
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 997c007

Please sign in to comment.