Unify version scheme and fix minor issues

This commit is contained in:
vit9696 2018-05-22 00:59:23 +03:00
parent daea6d8b16
commit 4f9f31ef71
12 changed files with 48 additions and 19 deletions

View File

@ -18,11 +18,10 @@ deploy:
auth_token:
secure: zSJnpSnrKY1NO5RPVBaD/uq7UPyc+GW7ecjPFqEMsLjtnd6H+iNfROdoeuxJgt5T
artifact: Binaries
prerelease: true
on:
appveyor_repo_tag: true
artifacts:
- path: dist\**\*.zip
name: Binaries

7
.gitignore vendored
View File

@ -232,9 +232,14 @@ pip-log.txt
*.o
Makefile
UEFITool/uefitool_plugin_import.cpp
uefitool_plugin_import.cpp
UEFITool.app/
UEFIDump/UEFIDump
UEFIExtract/UEFIExtract
UEFIFind/UEFIFind
.qmake.stash
CMakeCache.txt
CMakeFiles
cmake_install.cmake
DerivedData
*.xcodeproj

View File

@ -50,6 +50,7 @@ SET(PROJECT_HEADERS
../common/sha256.h
../common/bstrlib/bstrlib.h
../common/bstrlib/bstrwrap.h
../version.h
)
ADD_DEFINITIONS(-DU_ENABLE_NVRAM_PARSING_SUPPORT)

View File

@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <iostream>
#include <fstream>
#include "../version.h"
#include "uefidump.h"
int main(int argc, char *argv[])
@ -29,7 +30,7 @@ int main(int argc, char *argv[])
return (uefidumper.dump(buffer, UString(argv[1])) != U_SUCCESS);
}
std::cout << "UEFIDump 0.1.9" << std::endl << std::endl
std::cout << "UEFIDump " PROGRAM_VERSION << std::endl << std::endl
<< "Usage: UEFIDump imagefile" << std::endl;
return 0;
}

View File

@ -50,5 +50,6 @@ HEADERS += \
../common/ubytearray.h \
../common/ustring.h \
../common/bootguard.h \
../common/sha256.h
../common/sha256.h \
../version.h

View File

@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <iostream>
#include "../version.h"
#include "../common/ffsparser.h"
#include "../common/ffsreport.h"
#include "ffsdumper.h"
@ -121,7 +122,7 @@ int main(int argc, char *argv[])
}
}
// If parameters are different, show version and usage information
std::cout << "UEFIExtract 0.13.8" << std::endl << std::endl
std::cout << "UEFIExtract " PROGRAM_VERSION << std::endl << std::endl
<< "Usage: UEFIExtract imagefile - generate report and dump only leaf tree items into .dump folder." << std::endl
<< " UEFIExtract imagefile all - generate report and dump all tree items." << std::endl
<< " UEFIExtract imagefile dump - only generate dump, no report needed." << std::endl

View File

@ -43,4 +43,5 @@ HEADERS += uefifind.h \
../common/ustring.h \
../common/ubytearray.h \
../common/bootguard.h \
../common/sha256.h
../common/sha256.h \
../version.h

View File

@ -12,6 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
*/
#include <QCoreApplication>
#include <iostream>
#include "../version.h"
#include "uefifind.h"
int main(int argc, char *argv[])
@ -148,7 +150,7 @@ int main(int argc, char *argv[])
return U_SUCCESS;
}
else {
std::cout << "UEFIFind 0.10.13" << std::endl << std::endl <<
std::cout << "UEFIFind " PROGRAM_VERSION << std::endl << std::endl <<
"Usage: UEFIFind {header | body | all} {list | count} pattern imagefile" << std::endl <<
" or UEFIFind file patternsfile imagefile" << std::endl;
return U_INVALID_PARAMETER;

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("NE alpha 50"))
version(tr(PROGRAM_VERSION))
{
clipboard = QApplication::clipboard();
@ -723,7 +724,7 @@ void UEFITool::remove()
void UEFITool::about()
{
QMessageBox::about(this, tr("About UEFITool"), tr(
"Copyright (c) 2018, LongSoft"
"Copyright (c) 2018, LongSoft.<br>"
"Program icon made by <a href=https://www.behance.net/alzhidkov>Alexander Zhidkov</a>.<br>"
"The program uses QHexEdit2 library made by <a href=https://github.com/Simsys/>Simsys</a>.<br>"
"Qt-less engine is using Bstrlib made by <a href=https://github.com/websnarf/>Paul Hsieh</a>.<br><br>"

View File

@ -43,6 +43,7 @@ HEADERS += uefitool.h \
../common/ubytearray.h \
../common/bootguard.h \
../common/sha256.h \
../version.h \
qhexedit2/qhexedit.h \
qhexedit2/chunks.h \
qhexedit2/commands.h

View File

@ -57,10 +57,7 @@ fi
echo "Attempting to build UEFITool NE for ${UPLATFORM}..."
UEFITOOL_VER=$(cat UEFITool/uefitool.cpp | grep ^version | cut -d'"' -f2 | sed 's/NE alpha /A/')
UEFIDUMP_VER=$(cat UEFIDump/uefidump_main.cpp | grep '"UEFIDump [0-9]' | cut -d'"' -f2 | cut -d' ' -f2)
UEFIEXTRACT_VER=$(cat UEFIExtract/uefiextract_main.cpp | grep '"UEFIExtract [0-9]' | cut -d'"' -f2 | cut -d' ' -f2)
UEFIFIND_VER=$(cat UEFIFind/uefifind_main.cpp | grep '"UEFIFind [0-9]' | cut -d'"' -f2 | cut -d' ' -f2)
UEFITOOL_VER=$(cat version.h | grep PROGRAM_VERSION | cut -d'"' -f2 | sed 's/NE alpha /A/')
build_tool() {
echo "Building $1 $2"
@ -115,9 +112,9 @@ build_tool() {
rm -rf dist
mkdir -p dist || exit 1
build_tool UEFITool "$UEFITOOL_VER" uefitool.pro
build_tool UEFIDump "$UEFIDUMP_VER" ""
build_tool UEFIExtract "$UEFIEXTRACT_VER" uefiextract.pro
build_tool UEFIFind "$UEFIFIND_VER" uefifind.pro
build_tool UEFITool "$UEFITOOL_VER" uefitool.pro
build_tool UEFIDump "$UEFITOOL_VER" ""
build_tool UEFIExtract "$UEFITOOL_VER" uefiextract.pro
build_tool UEFIFind "$UEFITOOL_VER" uefifind.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 "NE alpha 50"
#endif