Re-organized project directory structure.
This commit is contained in:
parent
2717fc9504
commit
5fd4e486cb
48
etc/7zSD.cmd
48
etc/7zSD.cmd
@ -1,48 +0,0 @@
|
||||
@echo off
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
|
||||
REM Print help screen
|
||||
if "%~4"=="" (
|
||||
echo 7-Zip SFX Builder
|
||||
echo Usage: 7zSD.cmd ^<input^> ^<output^> ^<title^> ^<fname^>
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Generate temp file names
|
||||
set "SEVENZIP_SFX_CFG=%TMP%\~7zSD%RANDOM%%RANDOM%.cf"
|
||||
set "SEVENZIP_SFX_ARC=%TMP%\~7zSD%RANDOM%%RANDOM%.7z"
|
||||
|
||||
REM Create the configuration file
|
||||
echo ;^^!@Install@^^!UTF-8^^!> "%SEVENZIP_SFX_CFG%"
|
||||
echo Title="%~3">> "%SEVENZIP_SFX_CFG%"
|
||||
echo ExecuteFile="%~n4.exe">> "%SEVENZIP_SFX_CFG%"
|
||||
echo ;^^!@InstallEnd@^^!>> "%SEVENZIP_SFX_CFG%"
|
||||
|
||||
REM Create the 7-Zip archive
|
||||
"%~dp0\7za.exe" a -t7z "%SEVENZIP_SFX_ARC%" "%~1"
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
del "%SEVENZIP_SFX_CFG%"
|
||||
del "%SEVENZIP_SFX_ARC%"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Rename the embedded file
|
||||
"%~dp0\7za.exe" rn "%SEVENZIP_SFX_ARC%" "%~nx1" "%~n4.exe"
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
del "%SEVENZIP_SFX_CFG%"
|
||||
del "%SEVENZIP_SFX_ARC%"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Actually build the SFX file
|
||||
copy /b "%~dp0\7zSD.sfx" + "%SEVENZIP_SFX_CFG%" + "%SEVENZIP_SFX_ARC%" "%~2"
|
||||
if %ERRORLEVEL% NEQ 0 (
|
||||
del "%SEVENZIP_SFX_CFG%"
|
||||
del "%SEVENZIP_SFX_ARC%"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Final clean-up
|
||||
del "%SEVENZIP_SFX_CFG%"
|
||||
del "%SEVENZIP_SFX_ARC%"
|
||||
exit /b 0
|
387
etc/7zSD.diff
387
etc/7zSD.diff
@ -1,387 +0,0 @@
|
||||
CPP/7zip/Bundles/SFXSetup/Compat.xml | 1 +
|
||||
CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp | 51 +++++++++++++---
|
||||
CPP/7zip/Bundles/SFXSetup/resource.rc | 4 +-
|
||||
CPP/7zip/UI/Explorer/MyMessages.cpp | 4 +-
|
||||
CPP/7zip/UI/Explorer/MyMessages.h | 2 +-
|
||||
CPP/7zip/UI/FileManager/FormatUtils.cpp | 2 +-
|
||||
CPP/7zip/UI/FileManager/ProgressDialog.cpp | 4 +-
|
||||
CPP/Common/MyWindows.h | 1 +
|
||||
CPP/Windows/FileDir.cpp | 97 ++++++++++++++++++++++++++----
|
||||
CPP/Windows/FileDir.h | 1 +
|
||||
10 files changed, 137 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/CPP/7zip/Bundles/SFXSetup/Compat.xml b/CPP/7zip/Bundles/SFXSetup/Compat.xml
|
||||
new file mode 100644
|
||||
index 0000000..76fecef
|
||||
--- /dev/null
|
||||
+++ b/CPP/7zip/Bundles/SFXSetup/Compat.xml
|
||||
@@ -0,0 +1 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"><application><supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/><supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/><supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/><supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/></application></compatibility></assembly>
|
||||
\ No newline at end of file
|
||||
diff --git a/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp b/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
|
||||
index aef2e19..53608cf 100644
|
||||
--- a/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
|
||||
+++ b/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
|
||||
@@ -37,6 +37,26 @@ static CFSTR kTempDirPrefix = FTEXT("7zS");
|
||||
|
||||
#define _SHELL_EXECUTE
|
||||
|
||||
+static HWND GetCurrentHwnd(void)
|
||||
+{
|
||||
+ HWND result = ::GetActiveWindow();
|
||||
+ if(!(result && IsWindowVisible(result)))
|
||||
+ {
|
||||
+ for (int i = 0; i < 256; ++i)
|
||||
+ {
|
||||
+ ::Sleep(1); /*some delay*/
|
||||
+ if(const HWND hwnd = ::GetForegroundWindow())
|
||||
+ {
|
||||
+ if(IsWindowVisible(result = hwnd))
|
||||
+ {
|
||||
+ break; /*success*/
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
static bool ReadDataString(CFSTR fileName, LPCSTR startID,
|
||||
LPCSTR endID, AString &stringResult)
|
||||
{
|
||||
@@ -145,7 +165,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
|
||||
UString archiveName, switches;
|
||||
#ifdef _SHELL_EXECUTE
|
||||
- UString executeFile, executeParameters;
|
||||
+ UString executeFile, executeParameters, executeErrorMsg;
|
||||
#endif
|
||||
NCommandLineParser::SplitCommandLine(GetCommandLineW(), archiveName, switches);
|
||||
|
||||
@@ -191,7 +211,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
dirPrefix = pairs[index].String;
|
||||
if (!installPrompt.IsEmpty() && !assumeYes)
|
||||
{
|
||||
- if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
|
||||
+ if (MessageBoxW(NULL, installPrompt, friendlyName, MB_YESNO | MB_SYSTEMMODAL |
|
||||
MB_ICONQUESTION) != IDYES)
|
||||
return 0;
|
||||
}
|
||||
@@ -200,6 +220,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
#ifdef _SHELL_EXECUTE
|
||||
executeFile = GetTextConfigValue(pairs, L"ExecuteFile");
|
||||
executeParameters = GetTextConfigValue(pairs, L"ExecuteParameters");
|
||||
+ executeErrorMsg = GetTextConfigValue(pairs, L"ExecuteErrorMsg");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -243,7 +264,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
{
|
||||
if (errorMessage.IsEmpty())
|
||||
errorMessage = NError::MyFormatMessage(result);
|
||||
- ::MessageBoxW(0, errorMessage, NWindows::MyLoadString(IDS_EXTRACTION_ERROR_TITLE), MB_ICONERROR);
|
||||
+ ::MessageBoxW(NULL, errorMessage, NWindows::MyLoadString(IDS_EXTRACTION_ERROR_TITLE), MB_ICONERROR | MB_SYSTEMMODAL);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
@@ -287,13 +308,25 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
execInfo.lpDirectory = NULL;
|
||||
execInfo.nShow = SW_SHOWNORMAL;
|
||||
execInfo.hProcess = 0;
|
||||
- /* BOOL success = */ ::ShellExecuteEx(&execInfo);
|
||||
- UINT32 result = (UINT32)(UINT_PTR)execInfo.hInstApp;
|
||||
- if (result <= 32)
|
||||
+
|
||||
+ for (;;)
|
||||
{
|
||||
- if (!assumeYes)
|
||||
- ShowErrorMessage(L"Can not open file");
|
||||
- return 1;
|
||||
+ execInfo.hwnd = GetCurrentHwnd(); /*prevent UAC dialog from appearing in the background!*/
|
||||
+ /* BOOL success = */ ::ShellExecuteEx(&execInfo);
|
||||
+ UINT32 result = (UINT32)(UINT_PTR)execInfo.hInstApp;
|
||||
+ if (result <= 32)
|
||||
+ {
|
||||
+ if (!assumeYes)
|
||||
+ {
|
||||
+ const wchar_t *const lpErrorMessage = executeErrorMsg.IsEmpty() ? L"Failed to launch installer. Please try again!" : executeErrorMsg;
|
||||
+ if (MessageBoxW(NULL, lpErrorMessage, L"Setup", MB_SYSTEMMODAL | MB_ICONEXCLAMATION | MB_RETRYCANCEL) == IDRETRY)
|
||||
+ {
|
||||
+ continue; /*retry*/
|
||||
+ }
|
||||
+ }
|
||||
+ return 1;
|
||||
+ }
|
||||
+ break; /*success*/
|
||||
}
|
||||
hProcess = execInfo.hProcess;
|
||||
}
|
||||
diff --git a/CPP/7zip/Bundles/SFXSetup/resource.rc b/CPP/7zip/Bundles/SFXSetup/resource.rc
|
||||
index 47e1b76..c796e65 100644
|
||||
--- a/CPP/7zip/Bundles/SFXSetup/resource.rc
|
||||
+++ b/CPP/7zip/Bundles/SFXSetup/resource.rc
|
||||
@@ -1,14 +1,14 @@
|
||||
#include "../../MyVersionInfo.rc"
|
||||
#include "resource.h"
|
||||
|
||||
-MY_VERSION_INFO_APP("7z Setup SFX", "7zS.sfx")
|
||||
+MY_VERSION_INFO_APP("Setup SFX", "7zS.sfx")
|
||||
|
||||
IDI_ICON ICON "setup.ico"
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_EXTRACTION_ERROR_TITLE "Extraction Failed"
|
||||
- IDS_EXTRACTION_ERROR_MESSAGE "File is corrupt"
|
||||
+ IDS_EXTRACTION_ERROR_MESSAGE "File is corrupt. Please download again!"
|
||||
IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
|
||||
IDS_PROGRESS_EXTRACTING "Extracting"
|
||||
END
|
||||
diff --git a/CPP/7zip/UI/Explorer/MyMessages.cpp b/CPP/7zip/UI/Explorer/MyMessages.cpp
|
||||
index 70c2a46..84ac8f4 100644
|
||||
--- a/CPP/7zip/UI/Explorer/MyMessages.cpp
|
||||
+++ b/CPP/7zip/UI/Explorer/MyMessages.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
// MyMessages.cpp
|
||||
|
||||
-#include "StdAfx.h"
|
||||
+//#include "StdAfx.h"
|
||||
|
||||
#include "MyMessages.h"
|
||||
|
||||
@@ -13,7 +13,7 @@ using namespace NWindows;
|
||||
|
||||
void ShowErrorMessage(HWND window, LPCWSTR message)
|
||||
{
|
||||
- ::MessageBoxW(window, message, L"7-Zip", MB_OK | MB_ICONSTOP);
|
||||
+ ::MessageBoxW(window, message, L"Setup", MB_OK | MB_SYSTEMMODAL | MB_ICONSTOP);
|
||||
}
|
||||
|
||||
void ShowErrorMessageHwndRes(HWND window, UINT resID)
|
||||
diff --git a/CPP/7zip/UI/Explorer/MyMessages.h b/CPP/7zip/UI/Explorer/MyMessages.h
|
||||
index d5822f4..3bd6e2e 100644
|
||||
--- a/CPP/7zip/UI/Explorer/MyMessages.h
|
||||
+++ b/CPP/7zip/UI/Explorer/MyMessages.h
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "../../../Common/MyString.h"
|
||||
|
||||
void ShowErrorMessage(HWND window, LPCWSTR message);
|
||||
-inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(0, message); }
|
||||
+inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(NULL, message); }
|
||||
|
||||
void ShowErrorMessageHwndRes(HWND window, UInt32 langID);
|
||||
void ShowErrorMessageRes(UInt32 langID);
|
||||
diff --git a/CPP/7zip/UI/FileManager/FormatUtils.cpp b/CPP/7zip/UI/FileManager/FormatUtils.cpp
|
||||
index 2143c3f..3a18712 100644
|
||||
--- a/CPP/7zip/UI/FileManager/FormatUtils.cpp
|
||||
+++ b/CPP/7zip/UI/FileManager/FormatUtils.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
// FormatUtils.cpp
|
||||
|
||||
-#include "StdAfx.h"
|
||||
+//#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/IntToString.h"
|
||||
|
||||
diff --git a/CPP/7zip/UI/FileManager/ProgressDialog.cpp b/CPP/7zip/UI/FileManager/ProgressDialog.cpp
|
||||
index 65201a9..4d23499 100644
|
||||
--- a/CPP/7zip/UI/FileManager/ProgressDialog.cpp
|
||||
+++ b/CPP/7zip/UI/FileManager/ProgressDialog.cpp
|
||||
@@ -1,6 +1,6 @@
|
||||
// ProgressDialog.cpp
|
||||
|
||||
-#include "StdAfx.h"
|
||||
+//#include "StdAfx.h"
|
||||
|
||||
#include "../../../Common/IntToString.h"
|
||||
|
||||
@@ -165,7 +165,7 @@ bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
|
||||
bool paused = Sync.GetPaused();
|
||||
Sync.SetPaused(true);
|
||||
_inCancelMessageBox = true;
|
||||
- int res = ::MessageBoxW(*this, L"Are you sure you want to cancel?", _title, MB_YESNOCANCEL);
|
||||
+ int res = ::MessageBoxW(*this, L"Are you sure you want to cancel?", _title, MB_YESNOCANCEL | MB_SYSTEMMODAL);
|
||||
_inCancelMessageBox = false;
|
||||
Sync.SetPaused(paused);
|
||||
if (res == IDCANCEL || res == IDNO)
|
||||
diff --git a/CPP/Common/MyWindows.h b/CPP/Common/MyWindows.h
|
||||
index 139a4e8..c40767f 100644
|
||||
--- a/CPP/Common/MyWindows.h
|
||||
+++ b/CPP/Common/MyWindows.h
|
||||
@@ -6,6 +6,7 @@
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <windows.h>
|
||||
+#include <shlobj.h>
|
||||
|
||||
#ifdef UNDER_CE
|
||||
#undef VARIANT_TRUE
|
||||
diff --git a/CPP/Windows/FileDir.cpp b/CPP/Windows/FileDir.cpp
|
||||
index da71b71..dae9f93 100644
|
||||
--- a/CPP/Windows/FileDir.cpp
|
||||
+++ b/CPP/Windows/FileDir.cpp
|
||||
@@ -14,6 +14,8 @@
|
||||
extern bool g_IsNT;
|
||||
#endif
|
||||
|
||||
+static CFSTR kTempDirName = FTEXT("TEMP");
|
||||
+
|
||||
using namespace NWindows;
|
||||
using namespace NFile;
|
||||
using namespace NName;
|
||||
@@ -67,6 +69,36 @@ bool GetSystemDir(FString &path)
|
||||
}
|
||||
return (needLength > 0 && needLength <= MAX_PATH);
|
||||
}
|
||||
+
|
||||
+bool GetAppDataDir(FString &path)
|
||||
+{
|
||||
+ HRESULT hResult;
|
||||
+ static const int FolderId[] = { CSIDL_LOCAL_APPDATA, CSIDL_APPDATA, CSIDL_PROFILE, NULL };
|
||||
+ for(size_t i = 0; i < 3; ++i)
|
||||
+ {
|
||||
+ #ifndef _UNICODE
|
||||
+ if (!g_IsNT)
|
||||
+ {
|
||||
+ TCHAR s[MAX_PATH + 2];
|
||||
+ s[0] = 0;
|
||||
+ hResult = ::SHGetFolderPath(NULL, FolderId[i] | CSIDL_FLAG_CREATE, NULL, 0, s);
|
||||
+ path = fas2fs(s);
|
||||
+ }
|
||||
+ else
|
||||
+ #endif
|
||||
+ {
|
||||
+ WCHAR s[MAX_PATH + 2];
|
||||
+ s[0] = 0;
|
||||
+ hResult = ::SHGetFolderPathW(NULL, FolderId[i] | CSIDL_FLAG_CREATE, NULL, 0, s);
|
||||
+ path = us2fs(s);
|
||||
+ }
|
||||
+ if(hResult == S_OK)
|
||||
+ {
|
||||
+ return true; /*success*/
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
#endif
|
||||
|
||||
bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime)
|
||||
@@ -566,7 +598,7 @@ bool MyGetTempPath(FString &path)
|
||||
{
|
||||
WCHAR s[MAX_PATH + 2];
|
||||
s[0] = 0;
|
||||
- needLength = ::GetTempPathW(MAX_PATH + 1, s);;
|
||||
+ needLength = ::GetTempPathW(MAX_PATH + 1, s);
|
||||
path = us2fs(s);
|
||||
}
|
||||
return (needLength > 0 && needLength <= MAX_PATH);
|
||||
@@ -625,6 +657,35 @@ static bool CreateTempFile(CFSTR prefix, bool addRandom, FString &path, NIO::COu
|
||||
return false;
|
||||
}
|
||||
|
||||
+static bool CreateTempFileSafely(CFSTR prefix, bool addRandom, FString &path, NIO::COutFile *outFile)
|
||||
+{
|
||||
+ FString tempPath;
|
||||
+ if (MyGetTempPath(tempPath))
|
||||
+ {
|
||||
+ if (CreateTempFile(tempPath + prefix, addRandom, path, outFile))
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ for(Byte retry = 0; retry < 2; ++retry)
|
||||
+ {
|
||||
+ if (retry ? GetWindowsDir(tempPath) : GetAppDataDir(tempPath))
|
||||
+ {
|
||||
+ tempPath.Add_PathSepar();
|
||||
+ tempPath += kTempDirName;
|
||||
+ if(CreateComplexDir(tempPath))
|
||||
+ {
|
||||
+ tempPath.Add_PathSepar();
|
||||
+ if (CreateTempFile(tempPath + prefix, addRandom, path, outFile))
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
bool CTempFile::Create(CFSTR prefix, NIO::COutFile *outFile)
|
||||
{
|
||||
if (!Remove())
|
||||
@@ -639,10 +700,7 @@ bool CTempFile::CreateRandomInTempFolder(CFSTR namePrefix, NIO::COutFile *outFil
|
||||
{
|
||||
if (!Remove())
|
||||
return false;
|
||||
- FString tempPath;
|
||||
- if (!MyGetTempPath(tempPath))
|
||||
- return false;
|
||||
- if (!CreateTempFile(tempPath + namePrefix, true, _path, outFile))
|
||||
+ if (!CreateTempFileSafely(namePrefix, true, _path, outFile))
|
||||
return false;
|
||||
_mustBeDeleted = true;
|
||||
return true;
|
||||
@@ -652,8 +710,16 @@ bool CTempFile::Remove()
|
||||
{
|
||||
if (!_mustBeDeleted)
|
||||
return true;
|
||||
- _mustBeDeleted = !DeleteFileAlways(_path);
|
||||
- return !_mustBeDeleted;
|
||||
+ for(UInt32 i = 0; i < 256; ++i)
|
||||
+ {
|
||||
+ if(DeleteFileAlways(_path))
|
||||
+ {
|
||||
+ _mustBeDeleted = false;
|
||||
+ return true;
|
||||
+ }
|
||||
+ ::Sleep(1);
|
||||
+ }
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool CTempFile::MoveTo(CFSTR name, bool deleteDestBefore)
|
||||
@@ -670,10 +736,7 @@ bool CTempDir::Create(CFSTR prefix)
|
||||
{
|
||||
if (!Remove())
|
||||
return false;
|
||||
- FString tempPath;
|
||||
- if (!MyGetTempPath(tempPath))
|
||||
- return false;
|
||||
- if (!CreateTempFile(tempPath + prefix, true, _path, NULL))
|
||||
+ if (!CreateTempFileSafely(prefix, true, _path, NULL))
|
||||
return false;
|
||||
_mustBeDeleted = true;
|
||||
return true;
|
||||
@@ -683,8 +746,16 @@ bool CTempDir::Remove()
|
||||
{
|
||||
if (!_mustBeDeleted)
|
||||
return true;
|
||||
- _mustBeDeleted = !RemoveDirWithSubItems(_path);
|
||||
- return !_mustBeDeleted;
|
||||
+ for(UInt32 i = 0; i < 256; ++i)
|
||||
+ {
|
||||
+ if(RemoveDirWithSubItems(_path))
|
||||
+ {
|
||||
+ _mustBeDeleted = false;
|
||||
+ return true;
|
||||
+ }
|
||||
+ ::Sleep(1);
|
||||
+ }
|
||||
+ return false;
|
||||
}
|
||||
|
||||
}}}
|
||||
diff --git a/CPP/Windows/FileDir.h b/CPP/Windows/FileDir.h
|
||||
index b13d1cc..1d87bbf 100644
|
||||
--- a/CPP/Windows/FileDir.h
|
||||
+++ b/CPP/Windows/FileDir.h
|
||||
@@ -13,6 +13,7 @@ namespace NDir {
|
||||
|
||||
bool GetWindowsDir(FString &path);
|
||||
bool GetSystemDir(FString &path);
|
||||
+bool GetAppDataDir(FString &path);
|
||||
|
||||
bool SetDirTime(CFSTR path, const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime);
|
||||
bool SetFileAttrib(CFSTR path, DWORD attrib);
|
BIN
etc/7zSD.sfx
BIN
etc/7zSD.sfx
Binary file not shown.
BIN
etc/7za.exe
BIN
etc/7za.exe
Binary file not shown.
@ -1,56 +0,0 @@
|
||||
7-Zip
|
||||
~~~~~
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
7-Zip Copyright (C) 1999-2016 Igor Pavlov.
|
||||
|
||||
Licenses for files are:
|
||||
|
||||
1) 7z.dll: GNU LGPL + unRAR restriction
|
||||
2) All other files: GNU LGPL
|
||||
|
||||
The GNU LGPL + unRAR restriction means that you must follow both
|
||||
GNU LGPL rules and unRAR restriction rules.
|
||||
|
||||
|
||||
Note:
|
||||
You can use 7-Zip on any computer, including a computer in a commercial
|
||||
organization. You don't need to register or pay for 7-Zip.
|
||||
|
||||
|
||||
GNU LGPL information
|
||||
--------------------
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You can receive a copy of the GNU Lesser General Public License from
|
||||
http://www.gnu.org/
|
||||
|
||||
|
||||
unRAR restriction
|
||||
-----------------
|
||||
|
||||
The decompression engine for RAR archives was developed using source
|
||||
code of unRAR program.
|
||||
All copyrights to original unRAR code are owned by Alexander Roshal.
|
||||
|
||||
The license for original unRAR code has the following restriction:
|
||||
|
||||
The unRAR sources cannot be used to re-create the RAR compression algorithm,
|
||||
which is proprietary. Distribution of modified unRAR sources in separate form
|
||||
or as a part of other software is permitted, provided that it is clearly
|
||||
stated in the documentation and source comments that the code may
|
||||
not be used to develop a RAR (WinRAR) compatible archiver.
|
||||
|
||||
|
||||
--
|
||||
Igor Pavlov
|
@ -1,51 +0,0 @@
|
||||
7-Zip 16.04
|
||||
-----------
|
||||
|
||||
7-Zip is a file archiver for Windows NT / 2000 / 2003 / 2008 / 2012 / XP / Vista / 7 / 8 / 10.
|
||||
|
||||
7-Zip Copyright (C) 1999-2016 Igor Pavlov.
|
||||
|
||||
The main features of 7-Zip:
|
||||
|
||||
- High compression ratio in the new 7z format
|
||||
- Supported formats:
|
||||
- Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM.
|
||||
- Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS,
|
||||
IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR,
|
||||
RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z.
|
||||
- Fast compression and decompression
|
||||
- Self-extracting capability for 7z format
|
||||
- Strong AES-256 encryption in 7z and ZIP formats
|
||||
- Integration with Windows Shell
|
||||
- Powerful File Manager
|
||||
- Powerful command line version
|
||||
- Localizations for 85 languages
|
||||
|
||||
|
||||
7-Zip is free software distributed under the GNU LGPL (except for unRar code).
|
||||
Read License.txt for more information about license.
|
||||
|
||||
|
||||
This distribution package contains the following files:
|
||||
|
||||
7zFM.exe - 7-Zip File Manager
|
||||
7-zip.dll - Plugin for Windows Shell
|
||||
7-zip32.dll - Plugin for Windows Shell (32-bit plugin for 64-bit system)
|
||||
7zg.exe - GUI module
|
||||
7z.exe - Command line version
|
||||
7z.dll - 7-Zip engine module
|
||||
7z.sfx - SFX module (Windows version)
|
||||
7zCon.sfx - SFX module (Console version)
|
||||
|
||||
License.txt - License information
|
||||
readme.txt - This file
|
||||
History.txt - History of 7-Zip
|
||||
7-zip.chm - User's Manual in HTML Help format
|
||||
descript.ion - Description for files
|
||||
|
||||
Lang\en.ttt - English (base) localization file
|
||||
Lang\*.txt - Localization files
|
||||
|
||||
|
||||
---
|
||||
End of document
|
BIN
etc/auto_inc.exe
BIN
etc/auto_inc.exe
Binary file not shown.
BIN
etc/cat.exe
BIN
etc/cat.exe
Binary file not shown.
BIN
etc/date.exe
BIN
etc/date.exe
Binary file not shown.
BIN
etc/mt.exe
BIN
etc/mt.exe
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
<?xml version ="1.0"?>
|
||||
<!-- This allows mt.exe to run on machines with the CLR v4 installed but not 1.1 or 2.0 -->
|
||||
<configuration>
|
||||
<startup useLegacyV2RuntimeActivationPolicy="true">
|
||||
<supportedRuntime version="v4.0"/>
|
||||
<supportedRuntime version="v2.0.50727"/>
|
||||
<supportedRuntime version="v1.1.4322"/>
|
||||
</startup>
|
||||
</configuration>
|
BIN
etc/rhash.exe
BIN
etc/rhash.exe
Binary file not shown.
@ -1,470 +0,0 @@
|
||||
<!-- manual page source format generated by PolyglotMan v3.2, -->
|
||||
<!-- available at http://polyglotman.sourceforge.net/ -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>RHASH(1) manual page</title>
|
||||
</head>
|
||||
<body bgcolor='white'>
|
||||
<a href='#toc'>Table of Contents</a><p>
|
||||
|
||||
<h2><a name='sect0' href='#toc0'>Name</a></h2>
|
||||
rhash - calculate/check CRC32, MD5, SHA1, GOST, TTH, BTIH or other hash
|
||||
sums.
|
||||
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
|
||||
<b>rhash [</b> <i>option</i> <b>]... [</b> <i>file</i> <b>]...</b>
|
||||
<h2><a name='sect2' href='#toc2'>Description</a></h2>
|
||||
<b>RHash</b> (Recursive Hasher)
|
||||
computes and verifies various message digests (hash sums) of files. Supported
|
||||
message digests include CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, Tiger,
|
||||
DC++ TTH, BitTorrent BTIH, AICH, ED2K, GOST R 34.11-94, RIPEMD-160, HAS-160,
|
||||
EDON-R 256/512, Whirlpool, Snefru-128/256.
|
||||
<p> The program can create and verify
|
||||
Magnet links and eDonkey ed2k:// links, see --magnet and --ed2k-link options.
|
||||
|
||||
<p> A dash string parameter ‘-’ is interpreted as stdin file.
|
||||
<p> By default <b>rhash</b>
|
||||
prints sums in SFV format with CRC32 hash sum only. The format can be changed
|
||||
by options --bsd, --magnet, --simple, --printf, --template. To output all sums use
|
||||
the ‘-a’ option.
|
||||
<p> The default output format can also be changed by renaming
|
||||
the program or placing a hardlink/symlink to it with a name containing
|
||||
strings ‘crc32’, ‘md4’, ‘md5’, ‘sha1’, ‘sha256’ ‘sha512’, ‘tiger’, ‘tth’, ‘btih’, ‘aich’, ‘ed2k’,
|
||||
‘ed2k-link’, ‘gost’, ‘gost-cryptopro’, ‘ripemd160’, ‘has160’, ‘whirlpool’, ‘edonr256’,
|
||||
‘edonr512’, ‘snefru128’, ‘snefru256’, ‘sfv’ or ‘magnet’.
|
||||
<p>
|
||||
<h2><a name='sect3' href='#toc3'>Program Mode Options</a></h2>
|
||||
The
|
||||
default mode is to print hash sums for all files and directory trees specified
|
||||
by command line. The mode can be set by the following options.
|
||||
<dl>
|
||||
|
||||
<dt>-c, --check</dt>
|
||||
<dd>Check
|
||||
hash files specified by command line. RHash can verify hash files in SFV
|
||||
and BSD formats, standard MD5 and SHA1 files, and text files containing
|
||||
magnet or ed2k links (one link per line). Empty lines and lines starting
|
||||
with ‘;’ or ‘#’ are skipped. In fact RHash can verify most hash files generated
|
||||
by itself without formating options --printf and --template. </dd>
|
||||
|
||||
<dt>-u, --update</dt>
|
||||
<dd>Update
|
||||
hash files specified by command line. The program calculates and appends
|
||||
hashes to the updated hash file in the format specified by formating options.
|
||||
Hashes are calculated for those files from the same directory as the hash
|
||||
file, which are yet not present in it. </dd>
|
||||
|
||||
<dt>-k, --check-embedded</dt>
|
||||
<dd>Verify files by crc32
|
||||
sum embedded in their names. </dd>
|
||||
|
||||
<dt>--torrent</dt>
|
||||
<dd>Create a torrent file for each processed
|
||||
file. </dd>
|
||||
|
||||
<dt>-h, --help</dt>
|
||||
<dd>Help: print help screen and exit. </dd>
|
||||
|
||||
<dt>-V, --version</dt>
|
||||
<dd>Version: print version
|
||||
and exit. </dd>
|
||||
|
||||
<dt>-B, --benchmark</dt>
|
||||
<dd>Run benchmark for selected algorithm(s).
|
||||
<p> </dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name='sect4' href='#toc4'>Hash Sums
|
||||
Options</a></h2>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>-C, --crc32</dt>
|
||||
<dd>CRC32: calculate and print CRC32 hash sum. </dd>
|
||||
|
||||
<dt>--md4</dt>
|
||||
<dd>MD4: calculate
|
||||
and print MD4 hash sum. </dd>
|
||||
|
||||
<dt>-M, --md5</dt>
|
||||
<dd>MD5: calculate and print MD5 hash sum. </dd>
|
||||
|
||||
<dt>-H, --sha1</dt>
|
||||
<dd>SHA1:
|
||||
calculate and print SHA1 hash sum. </dd>
|
||||
|
||||
<dt>--sha224, --sha256, --sha384, --sha512</dt>
|
||||
<dd>Calculate
|
||||
specified SHA2 hash sum. </dd>
|
||||
|
||||
<dt>--sha3-224, --sha3-256, --sha3-384, --sha3-512</dt>
|
||||
<dd>Calculate specified
|
||||
SHA3 hash sum. </dd>
|
||||
|
||||
<dt>--tiger</dt>
|
||||
<dd>Tiger: calculate and print Tiger hash sum. </dd>
|
||||
|
||||
<dt>-T, --tth</dt>
|
||||
<dd>TTH:
|
||||
calculate and print DC++ TTH sum. </dd>
|
||||
|
||||
<dt>--btih</dt>
|
||||
<dd>BTIH: calculate and print BitTorrent
|
||||
Info Hash. </dd>
|
||||
|
||||
<dt>-A, --aich</dt>
|
||||
<dd>AICH: calculate and print AICH hash. </dd>
|
||||
|
||||
<dt>-E, --ed2k</dt>
|
||||
<dd>ED2K: calculate
|
||||
and print eDonkey 2000 hash sum. </dd>
|
||||
|
||||
<dt>-L, --ed2k-link</dt>
|
||||
<dd>eDonkey link: calculate and
|
||||
print eDonkey link. </dd>
|
||||
|
||||
<dt>-W, --whirlpool</dt>
|
||||
<dd>Whirlpool: calculate and print Whirlpool
|
||||
hash sum. </dd>
|
||||
|
||||
<dt>-G, --gost</dt>
|
||||
<dd>GOST: calculate and print GOST R 34.11-94 hash, the Russian
|
||||
GOST standard hash function. </dd>
|
||||
|
||||
<dt>--gost-cryptopro</dt>
|
||||
<dd>GOST-CRYPTOPRO: calculate and print
|
||||
CryptoPro version of the GOST R 34.11-94 hash function. </dd>
|
||||
|
||||
<dt>--ripemd160</dt>
|
||||
<dd>RIPEMD-160:
|
||||
calculate and print RIPEMD-160 hash sum. </dd>
|
||||
|
||||
<dt>--has160</dt>
|
||||
<dd>HAS-160: calculate and print
|
||||
HAS-160 hash sum. </dd>
|
||||
|
||||
<dt>--snefru128, --snefru256</dt>
|
||||
<dd>SNEFRU: calculate and print SNEFRU-128/256
|
||||
hash sums. </dd>
|
||||
|
||||
<dt>--edonr256, --edonr512</dt>
|
||||
<dd>EDON-R: calculate and print EDON-R 256/512 hash
|
||||
sums.
|
||||
<p> </dd>
|
||||
|
||||
<dt>-a, --all</dt>
|
||||
<dd>Calculate all supported hash sums. </dd>
|
||||
|
||||
<dt>--list-hashes</dt>
|
||||
<dd>List names of all
|
||||
supported hashes, one per line.
|
||||
<p> </dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name='sect5' href='#toc5'>Miscellaneous Options</a></h2>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>-r, --recursive</dt>
|
||||
<dd>Process
|
||||
directories recursively. </dd>
|
||||
|
||||
<dt>-v, --verbose</dt>
|
||||
<dd>Be verbose. </dd>
|
||||
|
||||
<dt>--percents</dt>
|
||||
<dd>Show percents, while
|
||||
calculating or checking sums </dd>
|
||||
|
||||
<dt>--skip-ok</dt>
|
||||
<dd>Don’t print OK messages for successfully
|
||||
verified files. </dd>
|
||||
|
||||
<dt>-i, --ignore-case</dt>
|
||||
<dd>Ignore case of filenames when updating crc
|
||||
files. </dd>
|
||||
|
||||
<dt>--speed</dt>
|
||||
<dd>Print per-file and the total processing speed. </dd>
|
||||
|
||||
<dt>-e, --embed-crc</dt>
|
||||
<dd>Rename
|
||||
files by inserting crc32 sum into name. </dd>
|
||||
|
||||
<dt>--embed-crc-delimiter=<delimiter></dt>
|
||||
<dd>Insert
|
||||
specified <delimiter> before a crc sum in the --embed-crc mode, default is
|
||||
white space. The <delimiter> can be a character or empty string. </dd>
|
||||
|
||||
<dt>--path-separator=<separator></dt>
|
||||
<dd>Use
|
||||
specified path separator to display paths. </dd>
|
||||
|
||||
<dt>-q, --accept=<list></dt>
|
||||
<dd>Set a comma-delimited
|
||||
list of extensions of the files to process. </dd>
|
||||
|
||||
<dt>--exclude=<list></dt>
|
||||
<dd>Set a comma-delimited
|
||||
list of extensions of the files to exclude from processing. </dd>
|
||||
|
||||
<dt>-t, --crc-accept=<list></dt>
|
||||
<dd>Set
|
||||
a comma-delimited list of extensions of the hash files to verify. </dd>
|
||||
|
||||
<dt>--maxdepth=<levels></dt>
|
||||
<dd>Descend
|
||||
at most <levels> (a non-negative integer) levels of directories below the
|
||||
command line arguments. ‘--maxdepth 0’ means only apply the tests and actions
|
||||
to the command line arguments. </dd>
|
||||
|
||||
<dt>-o, --output=<file-path></dt>
|
||||
<dd>Set the file to output
|
||||
calculated hashes and verification results to. </dd>
|
||||
|
||||
<dt>-l, --log=<file-path></dt>
|
||||
<dd>Set the file
|
||||
to log errors and verbose information to. </dd>
|
||||
|
||||
<dt>--openssl=<list></dt>
|
||||
<dd>Specify which hash
|
||||
functions should be calculated using the OpenSSL library. The <list> is a
|
||||
comma delimited list of hash names, but only those supported by openssl
|
||||
are allowed, e.g. md4, md5, sha1, sha256, ripemd160. See openssl documentation
|
||||
for the full list. </dd>
|
||||
|
||||
<dt>--gost-reverse</dt>
|
||||
<dd>Reverse bytes in hexadecimal output of the
|
||||
GOST hash sum. The most significant bytes of the hash will be printed first.
|
||||
Default order is the least significant bytes first. </dd>
|
||||
|
||||
<dt>--bt-batch=<file-path></dt>
|
||||
<dd>Turn
|
||||
on torrent batch mode (implies torrent mode). Calculates batch-torrent for
|
||||
the files specified at command line and saves the torrent file to the file-path.
|
||||
The option -r <directory> can be useful in this mode. </dd>
|
||||
|
||||
<dt>--bt-private</dt>
|
||||
<dd>Generate BTIH
|
||||
for a private BitTorrent tracker. </dd>
|
||||
|
||||
<dt>--bt-piece-length</dt>
|
||||
<dd>Set the <i>piece length</i> value
|
||||
for torrent file. </dd>
|
||||
|
||||
<dt>--bt-announce=<announce-url></dt>
|
||||
<dd>Add a tracker announce URL to the
|
||||
created torrent file(s). Several URLs can be passed by specifying the option
|
||||
mutltiple times. This option doesn’t change the BTIH hash. </dd>
|
||||
|
||||
<dt>--benchmark-raw</dt>
|
||||
<dd>Switch
|
||||
benchmark output format to be a machine-readable tab-delimited text with
|
||||
hash function name, speed, cpu clocks per byte. This option works only if
|
||||
the --benchmark option was specified. </dd>
|
||||
|
||||
<dt>-- (double dash)</dt>
|
||||
<dd>Mark the end of command
|
||||
line options. All parameters following the double dash are interpreted as
|
||||
files or directories. It is typically used to process filenames starting
|
||||
with a dash ‘-’. Alternatively you can specify ’./’ or full path before such files,
|
||||
so they will not look like options anymore.
|
||||
<p> </dd>
|
||||
</dl>
|
||||
|
||||
<h2><a name='sect6' href='#toc6'>Output Format Options</a></h2>
|
||||
|
||||
<dl>
|
||||
|
||||
<dt>--ansi</dt>
|
||||
<dd>Use
|
||||
Windows codepage for output. </dd>
|
||||
|
||||
<dt>--oem</dt>
|
||||
<dd>Use DOS (OEM) codepage for output. </dd>
|
||||
|
||||
<dt>--utf8</dt>
|
||||
<dd>Use
|
||||
UTF-8 codepage for output. </dd>
|
||||
|
||||
<dt>--sfv</dt>
|
||||
<dd>Print hash sums in the SFV (Simple File Verification)
|
||||
output format (default). But unlike common SFV file, not only CRC32, but
|
||||
any hash sums specified by options can be printed. </dd>
|
||||
|
||||
<dt>-m, --magnet</dt>
|
||||
<dd>Print hash sums
|
||||
formatted as magnet links. </dd>
|
||||
|
||||
<dt>--bsd</dt>
|
||||
<dd>Use BSD output format. Each hash sum is printed
|
||||
on separate line after hash name and file’s path, enclosed in parentheses.
|
||||
</dd>
|
||||
|
||||
<dt>--simple</dt>
|
||||
<dd>Use simple output format. Each line will consist of filename and hash
|
||||
sums specified by options. </dd>
|
||||
|
||||
<dt>--uppercase</dt>
|
||||
<dd>Print hash sums in upper case. </dd>
|
||||
|
||||
<dt>--lowercase</dt>
|
||||
<dd>Print
|
||||
hash sums in lower case. </dd>
|
||||
|
||||
<dt>--template=<file></dt>
|
||||
<dd>Read printf-like template from given
|
||||
<file>. See the --printf option. </dd>
|
||||
|
||||
<dt>-p, --printf=<format></dt>
|
||||
<dd>Format: print <i>format</i> string
|
||||
the standard output, interpreting ‘\’ escapes and ‘%’ directives. The escapes
|
||||
and directives are: <blockquote></dd>
|
||||
|
||||
<dt>\n</dt>
|
||||
<dd>Newline. </dd>
|
||||
|
||||
<dt>\r</dt>
|
||||
<dd>Carriage return. </dd>
|
||||
|
||||
<dt>\t</dt>
|
||||
<dd>Horizontal tab. </dd>
|
||||
|
||||
<dt>\\</dt>
|
||||
<dd>A literal
|
||||
backslash (‘\’). </dd>
|
||||
|
||||
<dt>\0</dt>
|
||||
<dd>ASCII NUL. </dd>
|
||||
|
||||
<dt>\NNN</dt>
|
||||
<dd>The character which octal ASCII code is NNN.
|
||||
</dd>
|
||||
|
||||
<dt>\xNN</dt>
|
||||
<dd>The character which hexadecimal ASCII code is NN. </dd>
|
||||
</dl>
|
||||
<p>
|
||||
A ‘\’ character followed
|
||||
by any other character is treated as an ordinary character, so they both
|
||||
are printed.
|
||||
<dl>
|
||||
|
||||
<dt>%%</dt>
|
||||
<dd>A literal percent sign. </dd>
|
||||
|
||||
<dt>%p</dt>
|
||||
<dd>File’s path. </dd>
|
||||
|
||||
<dt>%f</dt>
|
||||
<dd>File’s name. </dd>
|
||||
|
||||
<dt>%u</dt>
|
||||
<dd>URL-encoded
|
||||
filename. </dd>
|
||||
|
||||
<dt>%s</dt>
|
||||
<dd>File’s size in bytes. </dd>
|
||||
|
||||
<dt>%{mtime}</dt>
|
||||
<dd>File’s last modification time. </dd>
|
||||
|
||||
<dt>%a
|
||||
or %A</dt>
|
||||
<dd>AICH hash sum. </dd>
|
||||
|
||||
<dt>%c or %C</dt>
|
||||
<dd>CRC32 hash sum. Use %c for lowercase and %C
|
||||
for uppercase characters. </dd>
|
||||
|
||||
<dt>%g or %G</dt>
|
||||
<dd>GOST R 34.11-94 hash. </dd>
|
||||
|
||||
<dt>%h or %H</dt>
|
||||
<dd>SHA1 hash. </dd>
|
||||
|
||||
<dt>%e
|
||||
or %E</dt>
|
||||
<dd>ED2K hash sum. </dd>
|
||||
|
||||
<dt>%l or %L</dt>
|
||||
<dd>EDonkey ed2k://... link. </dd>
|
||||
|
||||
<dt>%m or %M</dt>
|
||||
<dd>MD5 hash. </dd>
|
||||
|
||||
<dt>%r or
|
||||
%R</dt>
|
||||
<dd>RIPEMD-160 hash. </dd>
|
||||
|
||||
<dt>%t or %T</dt>
|
||||
<dd>TTH sum. </dd>
|
||||
|
||||
<dt>%w or %W</dt>
|
||||
<dd>Whirlpool hash. </dd>
|
||||
|
||||
<dt>%{md4}, %{sha-224},
|
||||
%{sha-256}, %{sha-384}, %{sha-512}, %{sha3-224},</dt>
|
||||
<dd> %{sha3-256}, %{sha3-384}, %{sha3-512}
|
||||
%{tiger}, %{btih}, %{gost-cryptopro},<br>
|
||||
%{has160}, %{snefru128}, %{snefru256}, %{edon-r256}, %{edon-r512}"<br>
|
||||
Print specified hash sum. Actually the %{<hash sum>} directive can print
|
||||
any supported hash sum. If a hash sum name starts with a capital letter
|
||||
then the hash is printed in uppercase, e.g. %{TTH}, %{Sha-512}. </dd>
|
||||
|
||||
<dt>%x<hash>, %b<hash>,
|
||||
%B<hash>, %@<hash></dt>
|
||||
<dd>Use one of these prefixes to output a hash sum in hexadecimal,
|
||||
base32, base64 or raw (binary) format respectively, e.g. %b{md4}, %BH or
|
||||
%xT. </dd>
|
||||
</dl>
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
<h2><a name='sect7' href='#toc7'>Config File</a></h2>
|
||||
RHash looks for a config file on Windows at %APPDATA%\RHash\rhashrc,
|
||||
|
||||
<p>%HOMEDRIVE%%HOMEPATH%\rhashrc
|
||||
<p> and on Linux/Unix at $HOME/.rhashrc and /etc/rhashrc.
|
||||
|
||||
<p> The config file consists of lines formatted as <blockquote>variable = value </blockquote>
|
||||
|
||||
<p> where
|
||||
the <i>variable</i> can be a name of any command line option, like <i>magnet,</i> <i>printf,</i>
|
||||
<i>percents,</i> etc. A boolean variable can be set to true by a value ‘on’, ‘yes’
|
||||
or ‘true’, any other value sets the variable to false.
|
||||
<p> Empty lines and lines
|
||||
starting with ‘#’ or ‘;’ are ignored.
|
||||
<p> Example config file: <br>
|
||||
<pre># This is a comment line
|
||||
percents = on
|
||||
crc-accept = .sfv,.md5,.sha1,.sha256,.sha512,.tth,.magnet
|
||||
</pre>
|
||||
<p>
|
||||
<h2><a name='sect8' href='#toc8'>Author</a></h2>
|
||||
Aleksey Kravchenko <rhash.admin@gmail.com>
|
||||
<h2><a name='sect9' href='#toc9'>See Also</a></h2>
|
||||
<i><b>md5sum</b>(1)</i> <i><b>cksfv</b>(1)</i>
|
||||
<i><b>ed2k_hash</b>(1)</i>
|
||||
<h2><a name='sect10' href='#toc10'>Bugs</a></h2>
|
||||
Bug reports are welcome! Send them by email or post to
|
||||
the SourceForge Bug Tracking System <i><i>http://sourceforge.net/projects/rhash/</i></i>
|
||||
<p>
|
||||
|
||||
<hr><p>
|
||||
<a name='toc'><b>Table of Contents</b></a><p>
|
||||
<ul>
|
||||
<li><a name='toc0' href='#sect0'>Name</a></li>
|
||||
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
|
||||
<li><a name='toc2' href='#sect2'>Description</a></li>
|
||||
<li><a name='toc3' href='#sect3'>Program Mode Options</a></li>
|
||||
<li><a name='toc4' href='#sect4'>Hash Sums Options</a></li>
|
||||
<li><a name='toc5' href='#sect5'>Miscellaneous Options</a></li>
|
||||
<li><a name='toc6' href='#sect6'>Output Format Options</a></li>
|
||||
<li><a name='toc7' href='#sect7'>Config File</a></li>
|
||||
<li><a name='toc8' href='#sect8'>Author</a></li>
|
||||
<li><a name='toc9' href='#sect9'>See Also</a></li>
|
||||
<li><a name='toc10' href='#sect10'>Bugs</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
BIN
etc/sha1.exe
BIN
etc/sha1.exe
Binary file not shown.
BIN
etc/upx.exe
BIN
etc/upx.exe
Binary file not shown.
@ -1,138 +0,0 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
|
||||
|
||||
ooooo ooo ooooooooo. ooooooo ooooo
|
||||
`888' `8' `888 `Y88. `8888 d8'
|
||||
888 8 888 .d88' Y888..8P
|
||||
888 8 888ooo88P' `8888'
|
||||
888 8 888 .8PY888.
|
||||
`88. .8' 888 d8' `888b
|
||||
`YbodP' o888o o888o o88888o
|
||||
|
||||
|
||||
The Ultimate Packer for eXecutables
|
||||
Copyright (c) 1996-2000 Markus Oberhumer & Laszlo Molnar
|
||||
http://wildsau.idv.uni-linz.ac.at/mfx/upx.html
|
||||
http://www.nexus.hu/upx
|
||||
http://upx.tsx.org
|
||||
|
||||
|
||||
PLEASE CAREFULLY READ THIS LICENSE AGREEMENT, ESPECIALLY IF YOU PLAN
|
||||
TO MODIFY THE UPX SOURCE CODE OR USE A MODIFIED UPX VERSION.
|
||||
|
||||
|
||||
ABSTRACT
|
||||
========
|
||||
|
||||
UPX and UCL are copyrighted software distributed under the terms
|
||||
of the GNU General Public License (hereinafter the "GPL").
|
||||
|
||||
The stub which is imbedded in each UPX compressed program is part
|
||||
of UPX and UCL, and contains code that is under our copyright. The
|
||||
terms of the GNU General Public License still apply as compressing
|
||||
a program is a special form of linking with our stub.
|
||||
|
||||
As a special exception we grant the free usage of UPX for all
|
||||
executables, including commercial programs.
|
||||
See below for details and restrictions.
|
||||
|
||||
|
||||
COPYRIGHT
|
||||
=========
|
||||
|
||||
UPX and UCL are copyrighted software. All rights remain with the authors.
|
||||
|
||||
UPX is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer
|
||||
UPX is Copyright (C) 1996-2000 Laszlo Molnar
|
||||
|
||||
UCL is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
==========================
|
||||
|
||||
UPX and the UCL library are free software; you can redistribute them
|
||||
and/or modify them under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
UPX and UCL are distributed in the hope that they 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 this program; see the file COPYING.
|
||||
|
||||
|
||||
SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES
|
||||
============================================
|
||||
|
||||
The stub which is imbedded in each UPX compressed program is part
|
||||
of UPX and UCL, and contains code that is under our copyright. The
|
||||
terms of the GNU General Public License still apply as compressing
|
||||
a program is a special form of linking with our stub.
|
||||
|
||||
Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special
|
||||
permission to freely use and distribute all UPX compressed programs
|
||||
(including commercial ones), subject to the following restrictions:
|
||||
|
||||
1. You must compress your program with a completely unmodified UPX
|
||||
version; either with our precompiled version, or (at your option)
|
||||
with a self compiled version of the unmodified UPX sources as
|
||||
distributed by us.
|
||||
2. This also implies that the UPX stub must be completely unmodfied, i.e.
|
||||
the stub imbedded in your compressed program must be byte-identical
|
||||
to the stub that is produced by the official unmodified UPX version.
|
||||
3. The decompressor and any other code from the stub must exclusively get
|
||||
used by the unmodified UPX stub for decompressing your program at
|
||||
program startup. No portion of the stub may get read, copied,
|
||||
called or otherwise get used or accessed by your program.
|
||||
|
||||
|
||||
ANNOTATIONS
|
||||
===========
|
||||
|
||||
- You can use a modified UPX version or modified UPX stub only for
|
||||
programs that are compatible with the GNU General Public License.
|
||||
|
||||
- We grant you special permission to freely use and distribute all UPX
|
||||
compressed programs. But any modification of the UPX stub (such as,
|
||||
but not limited to, removing our copyright string or making your
|
||||
program non-decompressible) will immediately revoke your right to
|
||||
use and distribute a UPX compressed program.
|
||||
|
||||
- UPX is not a software protection tool; by requiring that you use
|
||||
the unmodified UPX version for your proprietary programs we
|
||||
make sure that any user can decompress your program. This protects
|
||||
both you and your users as nobody can hide malicious code -
|
||||
any program that cannot be decompressed is highly suspicious
|
||||
by definition.
|
||||
|
||||
- You can integrate all or part of UPX and UCL into projects that
|
||||
are compatible with the GNU GPL, but obviously you cannot grant
|
||||
any special exceptions beyond the GPL for our code in your project.
|
||||
|
||||
- We want to actively support manufacturers of virus scanners and
|
||||
similar security software. Please contact us if you would like to
|
||||
incorporate parts of UPX or UCL into such a product.
|
||||
|
||||
|
||||
|
||||
Markus F.X.J. Oberhumer Laszlo Molnar
|
||||
markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu
|
||||
|
||||
Linz, Austria, 25 Feb 2000
|
||||
|
||||
|
||||
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: 2.6.3ia
|
||||
Charset: noconv
|
||||
|
||||
iQCVAwUBOLaLS210fyLu8beJAQFYVAP/ShzENWKLTvedLCjZbDcwaBEHfUVcrGMI
|
||||
wE7frMkbWT2zmkdv9hW90WmjMhOBu7yhUplvN8BKOtLiolEnZmLCYu8AGCwr5wBf
|
||||
dfLoClxnzfTtgQv5axF1awp4RwCUH3hf4cDrOVqmAsWXKPHtm4hx96jF6L4oHhjx
|
||||
OO03+ojZdO8=
|
||||
=CS52
|
||||
-----END PGP SIGNATURE-----
|
@ -1,139 +0,0 @@
|
||||
ooooo ooo ooooooooo. ooooooo ooooo
|
||||
`888' `8' `888 `Y88. `8888 d8'
|
||||
888 8 888 .d88' Y888..8P
|
||||
888 8 888ooo88P' `8888'
|
||||
888 8 888 .8PY888.
|
||||
`88. .8' 888 d8' `888b
|
||||
`YbodP' o888o o888o o88888o
|
||||
|
||||
|
||||
The Ultimate Packer for eXecutables
|
||||
Copyright (c) 1996-2016 Markus Oberhumer, Laszlo Molnar & John Reiser
|
||||
https://upx.github.io
|
||||
|
||||
|
||||
|
||||
WELCOME
|
||||
=======
|
||||
|
||||
Welcome to UPX !
|
||||
|
||||
Please don't forget to read the file LICENSE - UPX is distributed
|
||||
under the GNU General Public License (GPL) with special exceptions
|
||||
allowing the distribution of all compressed executables, including
|
||||
commercial programs.
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
============
|
||||
|
||||
UPX is an advanced executable file compressor. UPX will typically
|
||||
reduce the file size of programs and DLLs by around 50%-70%, thus
|
||||
reducing disk space, network load times, download times and
|
||||
other distribution and storage costs.
|
||||
|
||||
Programs and libraries compressed by UPX are completely self-contained
|
||||
and run exactly as before, with no runtime or memory penalty for most
|
||||
of the supported formats.
|
||||
|
||||
UPX supports a number of different executable formats, including
|
||||
Windows 95/98/ME/NT/2000/XP/CE programs and DLLs, DOS programs,
|
||||
and Linux executables and kernels.
|
||||
|
||||
UPX is free software distributed under the term of the GNU General
|
||||
Public License. Full source code is available.
|
||||
|
||||
UPX may be distributed and used freely, even with commercial applications.
|
||||
See the UPX License Agreement for details.
|
||||
|
||||
UPX is rated number one in the well known Archive Comparison Test. Visit
|
||||
http://compression.ca/ .
|
||||
|
||||
UPX aims to be Commercial Quality Freeware.
|
||||
|
||||
|
||||
SHORT DOCUMENTATION
|
||||
===================
|
||||
|
||||
'upx program.exe' will compress a program or DLL. For best compression
|
||||
results try 'upx --brute program.exe'.
|
||||
|
||||
Please see the file UPX.DOC for the full documentation. The files
|
||||
NEWS and BUGS also contain various tidbits of information.
|
||||
|
||||
|
||||
DISCLAIMER
|
||||
==========
|
||||
|
||||
UPX comes with ABSOLUTELY NO WARRANTY; for details see the file LICENSE.
|
||||
|
||||
Having said that, we think that UPX is quite stable now. Indeed we
|
||||
have compressed lots of files without any problems. Also, the
|
||||
current version has undergone several months of beta testing -
|
||||
actually it's almost 8 years since our first public beta.
|
||||
|
||||
This is the first production quality release, and we plan that future
|
||||
releases will be backward compatible with this version.
|
||||
|
||||
Please report all problems or suggestions to the authors. Thanks.
|
||||
|
||||
|
||||
THE FUTURE
|
||||
==========
|
||||
|
||||
- AArch64 (64-bit ARM) for Linux and iOS.
|
||||
|
||||
- The Linux approach could probably get ported to a lot of other Unix
|
||||
variants, at least for other i386 architectures it shouldn't be too
|
||||
much work. If someone sends me a fresh hard disk and an official
|
||||
FreeBSD/OpenBSD/NetBSD/Solaris/BeOS... CD I might take a look at it ;-)
|
||||
|
||||
- We will *NOT* add any sort of protection and/or encryption.
|
||||
This only gives people a false feeling of security because
|
||||
by definition all protectors/compressors can be broken.
|
||||
And don't trust any advertisement of authors of other executable
|
||||
compressors about this topic - just do a websearch on "unpackers"...
|
||||
|
||||
- Fix all remaining bugs - keep your reports coming ;-)
|
||||
|
||||
- See the file PROJECTS in the source code distribution if you want
|
||||
to contribute.
|
||||
|
||||
|
||||
COPYRIGHT
|
||||
=========
|
||||
|
||||
Copyright (C) 1996-2016 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2016 Laszlo Molnar
|
||||
Copyright (C) 2000-2016 John F. Reiser
|
||||
|
||||
This program may be used freely, and you are welcome to
|
||||
redistribute it under certain conditions.
|
||||
|
||||
This program 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
|
||||
UPX License Agreement for more details.
|
||||
|
||||
You should have received a copy of the UPX License Agreement along
|
||||
with this program; see the file LICENSE. If not, visit the UPX home page.
|
||||
|
||||
|
||||
Share and enjoy,
|
||||
Markus & Laszlo & John
|
||||
|
||||
|
||||
Markus F.X.J. Oberhumer Laszlo Molnar
|
||||
<markus@oberhumer.com> <ezerotven+github@gmail.com>
|
||||
|
||||
John F. Reiser
|
||||
<jreiser@BitWagon.com>
|
||||
|
||||
|
||||
[ The term UPX is a shorthand for the Ultimate Packer for eXecutables
|
||||
and holds no connection with potential owners of registered trademarks
|
||||
or other rights. ]
|
||||
|
||||
[ Feel free to contact us if you have commercial compression requirements
|
||||
or interesting job offers. ]
|
||||
|
BIN
etc/verpatch.exe
BIN
etc/verpatch.exe
Binary file not shown.
@ -1,290 +0,0 @@
|
||||
|
||||
Verpatch - a tool to patch win32 version resources on .exe or .dll files,
|
||||
|
||||
Version: 1.0.15 (25-Oct-2016)
|
||||
|
||||
Verpatch is a command line tool for adding and editing the version information
|
||||
of Windows executable files (applications, DLLs, kernel drivers)
|
||||
without rebuilding the executable.
|
||||
|
||||
It can also add or replace Win32 (native) resources, and do some other
|
||||
modifications of executable files.
|
||||
|
||||
Verpatch sets ERRORLEVEL 0 on success, otherwise errorlevel is non-zero.
|
||||
Verpatch modifies files in place, so please make copies of precious files.
|
||||
|
||||
|
||||
Command line syntax
|
||||
===================
|
||||
|
||||
verpatch filename [version] [/options]
|
||||
|
||||
Where
|
||||
- filename : any Windows PE file (exe, dll, sys, ocx...) that can have version resource
|
||||
- version : one to four decimal numbers, separated by dots, ex.: 1.2.3.4
|
||||
Additional text can follow the numbers; see examples below. Ex.: "1.2.3.4 extra text"
|
||||
|
||||
Common Options:
|
||||
|
||||
/va - creates a version resource. Use when the file has no version resource at all,
|
||||
or existing version resource should be replaced.
|
||||
If this option not specified, verpatch will read version resourse from the file.
|
||||
/s name "value" - add a version resource string attribute
|
||||
The name can be either a full attribute name or alias; see below.
|
||||
/sc "comment" - add or replace Comments string (shortcut for /s Comments "comment")
|
||||
/pv <version> - specify Product version
|
||||
where <version> arg has same form as the file version (1.2.3.4 or "1.2.3.4 text")
|
||||
/high - when less than 4 version numbers, these are higher numbers.
|
||||
The string representation will have as many components as specified.
|
||||
|
||||
Other options:
|
||||
|
||||
/fn - preserves Original filename, Internal name in the existing version resource of the file.
|
||||
/langid <number> - language id for new version resource.
|
||||
Use with /va. Default is Language Neutral.
|
||||
<number> is combination of primary and sublanguage IDs. ENU is 1033 or 0x409.
|
||||
/vo - outputs the version info in RC format to stdout.
|
||||
This can be used with /xi to dump a version resource without modification.
|
||||
Output of /vo can be pasted to a .rc file and compiled with rc.
|
||||
/xi- test mode. does all operations in memory but does not modify the file
|
||||
/xlb - test mode. Re-parses the version resource after modification.
|
||||
/rpdb - removes path to the .pdb file in debug information; leaves only file name.
|
||||
/rf #id file - add or replace a raw binary resource from file (see below)
|
||||
/noed - do not check for extra data appended to exe file
|
||||
/vft2 num - specify driver subtype (VFT2_xxx value, see winver.h)
|
||||
The application type (VFT_xxx) is retained from the existing version resource of the file,
|
||||
or filled automatically, based on the filename extension (.exe->app, .sys->driver, anything else->dll)
|
||||
|
||||
|
||||
Examples
|
||||
========
|
||||
|
||||
verpatch d:\foo.dll 1.2.33.44
|
||||
- Sets the file version to 1.2.33.44
|
||||
The Original file name and Internal name strings are set to "foo.dll".
|
||||
File foo.dll should already have a version resource (since /va not specified)
|
||||
|
||||
verpatch d:\foo.dll 1.2.33 /high
|
||||
- Sets three higher 3 numbers of the file version.
|
||||
The 4th number is not changed in the binary version struct,
|
||||
and the version as string will have three components.
|
||||
File foo.dll should already have a version resource.
|
||||
|
||||
verpatch d:\foo.dll 33.44 /s comment "a comment"
|
||||
- Replaces only two last numbers of the file version and adds a comment.
|
||||
File foo.dll should already have a version resource.
|
||||
|
||||
verpatch d:\foo.dll "33.44 special release" /pv 1.2.3.4
|
||||
- same as previous, with additional text in the version argument.
|
||||
- Product version is also specified
|
||||
|
||||
verpatch d:\foo.dll "1.2.33.44" /va /s description "foo.dll"
|
||||
/s company "My Company" /s copyright "(c) 2009"
|
||||
- creates or replaces version resource to foo.dll, with several string values.
|
||||
( all options should be one line)
|
||||
|
||||
verpatch d:\foo.dll /vo /xi
|
||||
- dumps the version resource in RC format, does not update the file.
|
||||
|
||||
Misc. functions
|
||||
================
|
||||
|
||||
* Add resource from a file
|
||||
|
||||
The /rf switch adds a resource from a file, or replaces a resource with same type and id.
|
||||
|
||||
The argument "#id" is a 32-bit hex number, prefixed with #.
|
||||
Low 16 bits of this value are resource id; can not be 0.
|
||||
Next 8 bits are resource type: one of RT_xxx symbols in winuser.h, or user defined.
|
||||
If the type value is 0, RT_RCDATA (10) is assumed.
|
||||
High 8 bits of the #id arg are reserved0.
|
||||
The language code of resources added by this switch is 0 (Neutral).
|
||||
Named resource types and ids are not implemented.
|
||||
The file is added as opaque binary chunk; the resource size is rounded up to 4 bytes
|
||||
and padded with zero bytes.
|
||||
|
||||
* Handling appended data
|
||||
|
||||
The program detects extra data appended to executable files, saves it and appends
|
||||
again after modifying resources.
|
||||
Command switch /noed disables checking for extra data.
|
||||
|
||||
Such extra data is used by some installers, self-extracting archives and other applications.
|
||||
However, the way we restore the data may be not compatible with these applications.
|
||||
Please, verify that executable files that contain extra data work correctly after modification.
|
||||
Make backup of valuable files before modification.
|
||||
|
||||
* Remove the path from debug info (.PDB) string
|
||||
|
||||
Use switch /rpdb to remove the path to the .pdb file in debug information; leave only file name.
|
||||
|
||||
Remarks
|
||||
=======
|
||||
|
||||
In "patch" mode (no /va option), verpatch replaces the version number in existing file
|
||||
version info resource with the values given on the command line.
|
||||
The version resource in the file is parsed, then parameters specified on the command line are applied.
|
||||
|
||||
If the file has no version resource, or you want to discard the existing resource, use /va switch.
|
||||
|
||||
Quotes surrounding arguments are needed for the command shell (cmd.exe),
|
||||
for any argument that contains spaces.
|
||||
Also, other characters should be escaped (ex. &, |, and ^ for cmd.exe).
|
||||
Null values can be specified as empty string ("").
|
||||
|
||||
The command line can become very long, so you may want to use a batch file or script.
|
||||
See the example batch files.
|
||||
|
||||
Verpatch can be run on same PE file any number of times.
|
||||
|
||||
The Version argument can be specified as 1 to 4 dot separated decimal numbers.
|
||||
Additional suffix can follow the version numbers, separated by a dash (-) or space.
|
||||
If the separator is space, the whole version argument must be enclosed in quotes.
|
||||
|
||||
If the switch /high not specified and less than 4 numbers are given,
|
||||
they are considered as minor numbers.
|
||||
The higher version parts are retained from existing version resource.
|
||||
For example, if the existing version info block has version number 1.2.3.4
|
||||
and 55.66 specified on the command line, the result will be 1.2.55.66.
|
||||
|
||||
If the switch /high is specified and less than 4 numbers are given,
|
||||
they are considered as higher numbers.
|
||||
For example, if the existing version info has version number 1.2.3.4
|
||||
and 55.66 /high specified on the command line, the result will be 55.66.3.4.
|
||||
|
||||
The /high switch has been added to support the "Semantic Versioning" syntax
|
||||
as described here: http://semver.org
|
||||
The "Semantic versioning", however, specifies only 3 parts for the version number,
|
||||
while Windows version numbers have 4 parts.
|
||||
Switch /high allows 3-part version numbers with optional "tail" separated by '-' or '+'
|
||||
but the text representation will not be displayed by Windows Explorer in Vista or newer.
|
||||
The file version displayed will always have 4 parts.
|
||||
|
||||
|
||||
Verpatch ensures that the version numbers in the binary part
|
||||
of the version structure and in the string part (as text) are same,
|
||||
or the text string begins with the same numbers as in the binary part.
|
||||
|
||||
By default, Original File Name and Internal File Name are replaced to the actual filename.
|
||||
Use /fn to preserve existing values in the version resource.
|
||||
|
||||
String attribute names for option /s must be language-neutral,
|
||||
not translations (example: PrivateBuild, not "Private Build Description").
|
||||
See below for the list of known attrbute names and their aliases.
|
||||
The examples above use the aliases.
|
||||
|
||||
String arguments for File version and Product version parameters are handled
|
||||
in a special way, the /s switch should not be used to set these:
|
||||
- The File version can be specified as the 2nd positional argument only
|
||||
- The Product version can be specified using /pv switch
|
||||
|
||||
|
||||
====================================================================
|
||||
Known string keys in VS_VERSION_INFO resource
|
||||
====================================================================
|
||||
|
||||
The aliases in the right column can be used with /s switch,
|
||||
in place of language-neutral (LN) attribute names.
|
||||
Attribute names are not case sensitive.
|
||||
|
||||
-------------------+----+-------------------------------+------------
|
||||
Lang.Neutral name |note| English translation | Aliases
|
||||
-------------------+----+-------------------------------+------------
|
||||
Comments Comments comment
|
||||
CompanyName Company company
|
||||
FileDescription E Description description, desc
|
||||
FileVersion *1 File Version
|
||||
InternalName Internal Name title
|
||||
*2 Language
|
||||
LegalCopyright E Copyright copyright, (c)
|
||||
LegalTrademarks E Legal Trademarks tm, (tm)
|
||||
OriginalFilename Original File Name
|
||||
ProductName Product Name product
|
||||
ProductVersion *3 Product Version productversion (*)
|
||||
PrivateBuild Private Build Description pb, private
|
||||
SpecialBuild Special Build Description sb, build
|
||||
OleSelfRegister A -
|
||||
AssemblyVersion N
|
||||
|
||||
Notes
|
||||
*1: FileVersion, ProductVersion should not be specified with /s switch.
|
||||
See the command line parameters above.
|
||||
The string values normally begin with same 1.2.3.4 version number as in the binary header,
|
||||
but can be any text. Explorer of WinXP also displays File Version text in the strings box.
|
||||
In Win7 or newer, Explorer displays the version numbers from the binary header only.
|
||||
|
||||
*2: The "Language" value is the name of the language code specified in the header of the
|
||||
string block of VS_VERSION_INFO resource (or taken from VarFileInfo block?)
|
||||
It is displayed by Windows XP Explorer.
|
||||
|
||||
*3 When Productversion is specified as a string attribute (/s productversion)
|
||||
rather than with /pv, the argument string will be put literally.
|
||||
This can be used to specify leading zeros in version numbers.
|
||||
|
||||
E: Displayed by Windows Explorer in Vista+
|
||||
A: Intended for some API (OleSelfRegister is used in COM object registration)
|
||||
N: Added by some .NET compilers. This version number is not contained in the
|
||||
binary part of the version struct and can differ from the file version.
|
||||
To change it, use switch /s AssemblyVersion [value]. Note: this will not
|
||||
change the actual .NET assembly version.
|
||||
====================================================================
|
||||
|
||||
|
||||
|
||||
Known issues and TO DO's:
|
||||
=========================
|
||||
|
||||
- Does not work on old PE files that have link version 5.x (before VC6?)
|
||||
No known workaround; this seems to be limitation of Windows UpdateResource API.
|
||||
Since the UpdateResource API is part of Windows, its behaviour may differ on
|
||||
different Windows releases. On Win7 SP1 you may get better results than on WinXP.
|
||||
|
||||
- Import of version resource does not work if it is not encoded in UTF-16.
|
||||
|
||||
- Does not work on files signed with digital certificates (TO DO: warn and remove certificate)
|
||||
Until we do this, certificates can be removed with 3rd party delcert tool.
|
||||
|
||||
- A second version resource may be added to a file that already has a version resource
|
||||
in other language. Switch /va won't help.
|
||||
TO DO: ensure that a file has only one version resource!
|
||||
|
||||
- When verpatch is invoked from command prompt, or batch file, the string
|
||||
arguments can contain only ANSI characters, because cmd.exe batch files cannot be
|
||||
in Unicode format. If you need to include characters not in current locale,
|
||||
use other shell languages that fully support Unicode (Powershell, vbs, js).
|
||||
|
||||
- TO DO: In RC source output (/vo), special characters in strings are not quoted;
|
||||
so /vo may produce invalid RC input.
|
||||
|
||||
- The parser of binary version resources handles only the most common type of structure.
|
||||
If the parser breaks because of unhandled structure format, try /va switch to
|
||||
skip reading existing version resource and re-create it from scratch.
|
||||
Consider using WINE or other open source implementations?
|
||||
|
||||
- option to add extra 0 after version strings : "string\0"
|
||||
(tentative, requested by a reader for some old VB code)
|
||||
|
||||
- For files with extra data appended, checksum is not re-calculated.
|
||||
Such files usually implement their own integrity check.
|
||||
|
||||
- Switch /va does not prevent import of existing version resource. Revise.
|
||||
|
||||
- When existing version string contains "tail" but the command line parameter does not,
|
||||
the tail is removed. In previous versions the tail was preserved.
|
||||
|
||||
- Running verpatch on certain executables (esp. built with GNU) produce corrupt file
|
||||
when run on WinXP SP3, but same binaries give good result when run on Win7 or 2008R2.
|
||||
(Improvement of UpdateResource API?)
|
||||
|
||||
|
||||
Source code
|
||||
============
|
||||
The source is provided as a Visual C++ 2013 project, it can be compiled with VC 2008, 2010, 2012 Express and newer.
|
||||
(The VC 2008 compatible project is in verpatch(vs2008).sln, verpatch.vcproj files. verpatch.sln, .vcxproj are for VC++ 2013).
|
||||
It demonstrates use of the UpdateResource and imagehlp.dll API.
|
||||
It does not demonstrate good use of C++, coding style or anything else.
|
||||
Dependencies on VC features available only in paid versions (before Community editions) have been removed.
|
||||
|
||||
UAC note: Verpatch does not require any administrator rights and may not work correctly if run elevated.
|
||||
|
||||
~~
|
BIN
etc/zip.exe
BIN
etc/zip.exe
Binary file not shown.
@ -26,7 +26,7 @@
|
||||
#define VER_X264_MAJOR 2
|
||||
#define VER_X264_MINOR 7
|
||||
#define VER_X264_PATCH 7
|
||||
#define VER_X264_BUILD 1070
|
||||
#define VER_X264_BUILD 1072
|
||||
|
||||
#define VER_X264_PORTABLE_EDITION (0)
|
||||
|
||||
|
@ -105,7 +105,7 @@ copy /Y "$(SolutionDir)etc\vld\lib\$(Platform)\$(Configuration)\*.manifest" "$(T
|
||||
<Message>Copy Toolset</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Message>Update Build Number</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -143,7 +143,7 @@ copy /Y "$(SolutionDir)etc\vld\lib\$(Platform)\$(Configuration)\*.manifest" "$(T
|
||||
<EntryPointSymbol>x264_entry_point</EntryPointSymbol>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Update Build Number</Message>
|
||||
|
@ -97,7 +97,7 @@ copy /Y "$(SolutionDir)etc\vld\bin\Win32\*.manifest" "$(TargetDir)"</Command>
|
||||
<Message>Copy Toolset</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 5</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 5</Command>
|
||||
<Message>Update Build Number</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -135,7 +135,7 @@ copy /Y "$(SolutionDir)etc\vld\bin\Win32\*.manifest" "$(TargetDir)"</Command>
|
||||
<EntryPointSymbol>x264_entry_point</EntryPointSymbol>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 5</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 5</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Update Build Number</Message>
|
||||
|
@ -104,7 +104,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\$(Platform)\*.ma
|
||||
<Message>Copy Toolset</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Message>Update Build Number</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -142,7 +142,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\$(Platform)\*.ma
|
||||
<EntryPointSymbol>x264_entry_point</EntryPointSymbol>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Update Build Number</Message>
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x264_launcher", "x264_launcher_MSVC2015.vcxproj", "{563D953B-CBC3-4C75-AFC2-5BD87531C332}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
|
@ -104,7 +104,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\$(Platform)\*.ma
|
||||
<Message>Copy Toolset</Message>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Message>Update Build Number</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
@ -142,7 +142,7 @@ copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\$(Platform)\*.ma
|
||||
<EntryPointSymbol>x264_entry_point</EntryPointSymbol>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(SolutionDir)etc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
<Command>"$(SolutionDir)..\Prerequisites\AutoInc\auto_inc.exe" VER_X264_BUILD "$(SolutionDir)src\version.h" 30</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Update Build Number</Message>
|
||||
|
41
z_build.bat
41
z_build.bat
@ -3,9 +3,6 @@ REM ///////////////////////////////////////////////////////////////////////////
|
||||
REM // Set Paths
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
set "MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
|
||||
set "WSDK_PATH=C:\Program Files (x86)\Windows Kits\10"
|
||||
set "NSIS_PATH=C:\Program Files\NSIS\Unicode"
|
||||
set "PDOC_PATH=C:\Program Files\Pandoc"
|
||||
set "TOOLS_VER=140"
|
||||
|
||||
REM ###############################################
|
||||
@ -24,16 +21,16 @@ if "%VCINSTALLDIR%"=="" (
|
||||
echo %%VCINSTALLDIR%% not specified. Please check your MSVC_PATH var!
|
||||
goto BuildError
|
||||
)
|
||||
if "%QTDIR%"=="" (
|
||||
echo %%QTDIR%% not specified. Please check your MSVC_PATH var!
|
||||
goto BuildError
|
||||
)
|
||||
if not exist "%VCINSTALLDIR%\bin\cl.exe" (
|
||||
echo C++ compiler not found. Please check your MSVC_PATH var!
|
||||
goto BuildError
|
||||
)
|
||||
if not exist "%PDOC_PATH%\pandoc.exe" (
|
||||
echo Pandoc binary could not be found. Please check your PDOC_PATH var!
|
||||
if "%QTDIR%"=="" (
|
||||
echo %%QTDIR%% not specified. Please check your QTDIR var!
|
||||
goto BuildError
|
||||
)
|
||||
if not exist "%QTDIR%\include\QtCore\qglobal.h" (
|
||||
echo %%QTDIR%% header files not found. Please check your QTDIR var!
|
||||
goto BuildError
|
||||
)
|
||||
|
||||
@ -42,11 +39,11 @@ REM // Get current date and time (in ISO format)
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
set "ISO_DATE="
|
||||
set "ISO_TIME="
|
||||
if not exist "%~dp0\etc\date.exe" BuildError
|
||||
for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\etc\date.exe" +ISODATE:%%Y-%%m-%%d') do (
|
||||
if not exist "%~dp0\..\Prerequisites\GnuWin32\date.exe" BuildError
|
||||
for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\..\Prerequisites\GnuWin32\date.exe" +ISODATE:%%Y-%%m-%%d') do (
|
||||
if "%%a"=="ISODATE" set "ISO_DATE=%%b"
|
||||
)
|
||||
for /F "tokens=1,2,3,4 delims=:" %%a in ('"%~dp0\etc\date.exe" +ISOTIME:%%T') do (
|
||||
for /F "tokens=1,2,3,4 delims=:" %%a in ('"%~dp0\..\Prerequisites\GnuWin32\date.exe" +ISOTIME:%%T') do (
|
||||
if "%%a"=="ISOTIME" set "ISO_TIME=%%b:%%c:%%d"
|
||||
)
|
||||
if "%ISO_DATE%"=="" goto BuildError
|
||||
@ -119,20 +116,20 @@ copy "%~dp0\..\Prerequisites\Qt4\v%TOOLS_VER%_xp\Shared\bin\QtXml4.dll"
|
||||
copy "%~dp0\..\Prerequisites\Qt4\v%TOOLS_VER%_xp\Shared\plugins\imageformats\*.dll" "%PACK_PATH%\imageformats"
|
||||
del "%PACK_PATH%\imageformats\*d4.dll" 2> NUL
|
||||
if %TOOLS_VER% GEQ 140 (
|
||||
copy "%WSDK_PATH%\Redist\ucrt\DLLs\x86\*.dll" "%PACK_PATH%"
|
||||
copy "%~dp0\..\Prerequisites\MSVC\redist\ucrt\DLLs\x86\*.dll" "%PACK_PATH%"
|
||||
)
|
||||
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
REM // Generate Docs
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
"%PDOC_PATH%\pandoc.exe" --from markdown_github+pandoc_title_block+header_attributes+implicit_figures --to html5 --toc -N --standalone -H "%~dp0\etc\css\style.inc" --output "%PACK_PATH%\README.html" "%~dp0\README.md"
|
||||
"%~dp0\..\Prerequisites\Pandoc\pandoc.exe" --from markdown_github+pandoc_title_block+header_attributes+implicit_figures --to html5 --toc -N --standalone -H "%~dp0\etc\css\style.inc" --output "%PACK_PATH%\README.html" "%~dp0\README.md"
|
||||
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
REM // Compress
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
"%~dp0\etc\upx.exe" --brute "%PACK_PATH%\*.exe"
|
||||
"%~dp0\etc\upx.exe" --brute "%PACK_PATH%\MUtils32-?.dll
|
||||
"%~dp0\etc\upx.exe" --best "%PACK_PATH%\Qt*.dll"
|
||||
"%~dp0\..\Prerequisites\UPX\upx.exe" --brute "%PACK_PATH%\*.exe"
|
||||
"%~dp0\..\Prerequisites\UPX\upx.exe" --brute "%PACK_PATH%\MUtils32-?.dll
|
||||
"%~dp0\..\Prerequisites\UPX\upx.exe" --best "%PACK_PATH%\Qt*.dll"
|
||||
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
REM // Attributes
|
||||
@ -170,20 +167,20 @@ echo. >> "%PACK_PATH%\BUILD_TAG.txt"
|
||||
echo Build #%BUILD_NO%, created on %ISO_DATE% at %ISO_TIME% >> "%PACK_PATH%\BUILD_TAG.txt"
|
||||
echo. >> "%PACK_PATH%\BUILD_TAG.txt"
|
||||
echo. >> "%PACK_PATH%\BUILD_TAG.txt"
|
||||
"%~dp0\etc\cat.exe" "%~dp0\etc\setup\build.nfo" >> "%PACK_PATH%\BUILD_TAG.txt"
|
||||
"%~dp0\..\Prerequisites\GnuWin32\cat.exe" "%~dp0\etc\setup\build.nfo" >> "%PACK_PATH%\BUILD_TAG.txt"
|
||||
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
REM // Build the installer
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
"%NSIS_PATH%\makensis.exe" "/DX264_UPX_PATH=%~dp0\etc\upx.exe" "/DX264_DATE=%ISO_DATE%" "/DX264_BUILD=%BUILD_NO%" "/DX264_OUTPUT_FILE=%OUT_PATH%.sfx" "/DX264_SOURCE_PATH=%PACK_PATH%" "%~dp0\etc\setup\setup.nsi"
|
||||
"%~dp0\..\Prerequisites\NSIS\makensis.exe" "/DX264_UPX_PATH=%~dp0\..\Prerequisites\UPX\upx.exe" "/DX264_DATE=%ISO_DATE%" "/DX264_BUILD=%BUILD_NO%" "/DX264_OUTPUT_FILE=%OUT_PATH%.sfx" "/DX264_SOURCE_PATH=%PACK_PATH%" "%~dp0\etc\setup\setup.nsi"
|
||||
if not "%ERRORLEVEL%"=="0" goto BuildError
|
||||
|
||||
call "%~dp0\etc\7zSD.cmd" "%OUT_PATH%.sfx" "%OUT_PATH%.exe" "Simple x264/x265 Launcher" "x264_launcher-setup-r%BUILD_NO%"
|
||||
call "%~dp0\..\Prerequisites\SevenZip\7zSD.cmd" "%OUT_PATH%.sfx" "%OUT_PATH%.exe" "Simple x264/x265 Launcher" "x264_launcher-setup-r%BUILD_NO%"
|
||||
if not "%ERRORLEVEL%"=="0" goto BuildError
|
||||
|
||||
set "VERPATCH_PRODUCT=Simple x264/x265 Launcher (Setup)"
|
||||
set "VERPATCH_FILEVER=%ISO_DATE:-=.%.%BUILD_NO%"
|
||||
"%~dp0\etc\verpatch.exe" "%OUT_PATH%.exe" "%VERPATCH_FILEVER%" /pv "%VERPATCH_FILEVER%" /fn /s desc "%VERPATCH_PRODUCT%" /s product "%VERPATCH_PRODUCT%" /s title "x264 Launcher Installer SFX" /s copyright "Copyright (C) 2004-2016 LoRd_MuldeR" /s company "Free Software Foundation"
|
||||
"%~dp0\..\Prerequisites\VerPatch\verpatch.exe" "%OUT_PATH%.exe" "%VERPATCH_FILEVER%" /pv "%VERPATCH_FILEVER%" /fn /s desc "%VERPATCH_PRODUCT%" /s product "%VERPATCH_PRODUCT%" /s title "x264 Launcher Installer SFX" /s copyright "Copyright (C) 2004-2016 LoRd_MuldeR" /s company "Free Software Foundation"
|
||||
if not "%ERRORLEVEL%"=="0" goto BuildError
|
||||
|
||||
attrib +R "%OUT_PATH%.exe"
|
||||
@ -193,7 +190,7 @@ REM ///////////////////////////////////////////////////////////////////////////
|
||||
REM // Build ZIP package
|
||||
REM ///////////////////////////////////////////////////////////////////////////
|
||||
pushd "%PACK_PATH%"
|
||||
"%~dp0\etc\zip.exe" -r -9 -z "%OUT_PATH%.zip" "*.*" < "%PACK_PATH%\BUILD_TAG.txt"
|
||||
"%~dp0\..\Prerequisites\GnuWin32\zip.exe" -r -9 -z "%OUT_PATH%.zip" "*.*" < "%PACK_PATH%\BUILD_TAG.txt"
|
||||
popd
|
||||
|
||||
if not "%ERRORLEVEL%"=="0" goto BuildError
|
||||
|
Loading…
Reference in New Issue
Block a user