From 8288fecc0ad74624f489bbdf3fb71cb1a1fbf286 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 28 Jul 2017 23:30:10 +0200 Subject: Windows: Add portable installer that only extra binaries without the need of administrative privileges for extraction. --- src/Setup/SelfExtract.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Setup/SelfExtract.c') diff --git a/src/Setup/SelfExtract.c b/src/Setup/SelfExtract.c index 18bc1255..8c155c64 100644 --- a/src/Setup/SelfExtract.c +++ b/src/Setup/SelfExtract.c @@ -29,8 +29,11 @@ #define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__)) #endif +#ifdef PORTABLE +#define OutputPackageFile L"VeraCrypt Portable " _T(VERSION_STRING) L".exe" +#else #define OutputPackageFile L"VeraCrypt Setup " _T(VERSION_STRING) L".exe" - +#endif #define MAG_START_MARKER "TCINSTRT" #define MAG_END_MARKER_OBFUSCATED "T/C/I/N/S/C/R/C" #define PIPE_BUFFER_LEN (4 * BYTES_PER_KB) @@ -146,7 +149,11 @@ BOOL MakeSelfExtractingPackage (HWND hwndDlg, wchar_t *szDestDir) if (!TCCopyFile (inputFile, outputFile)) { handleWin32Error (hwndDlg, SRC_POS); +#ifdef PORTABLE + PkgError (L"Cannot copy 'VeraCrypt Portable.exe' to the package"); +#else PkgError (L"Cannot copy 'VeraCrypt Setup.exe' to the package"); +#endif goto err; } -- cgit v1.2.3