From 319a68414184246223696eeee9bd2405b0b4cbbb Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 17 Sep 2005 17:38:50 +0000 Subject: [PATCH] VPatch 3.1 git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4275 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/VPatch/Readme.html | 17 +++++++++++++---- Contrib/VPatch/Source/GenPat/main.cpp | 22 ++++++++++++++-------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Contrib/VPatch/Readme.html b/Contrib/VPatch/Readme.html index aa5f03e5..640d7ca7 100644 --- a/Contrib/VPatch/Readme.html +++ b/Contrib/VPatch/Readme.html @@ -98,7 +98,7 @@ a:hover -

VPatch 3.0

+

VPatch 3.1

Introduction

@@ -222,14 +222,23 @@ vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"

Test framework (Python)

Run the VPatch_tests.py script (if you have Python - installed) to perform basic functionality tests on VPatch.

+ installed) to perform basic functionality tests on VPatch. The testExtended + test is known to fail if a set of big test files is not installed, + you can safely ignore this.

Version history

    -
  • 3.0 -
      +
    • 3.1 +
        +
      • GenPat now compiles on POSIX platforms (MinGW/GCC), Visual + C++ 6 and Borland C++.
      • +
      • More test cases to verify functionality of GenPat.
      • +
      +
    • +
    • 3.0 +
      • Final: Updates to the GUI, installer
      • RC8: GenPat will now flag replacement of a patch (e.g. the source file has the same contents as a previous patch inside diff --git a/Contrib/VPatch/Source/GenPat/main.cpp b/Contrib/VPatch/Source/GenPat/main.cpp index 7f0fa2c8..68d83a13 100644 --- a/Contrib/VPatch/Source/GenPat/main.cpp +++ b/Contrib/VPatch/Source/GenPat/main.cpp @@ -31,6 +31,12 @@ #include #endif +#ifdef __WIN32__ + #define OPT_CHAR '/' +#else + #define OPT_CHAR '-' +#endif + #include "GlobalTypes.h" #include "POSIXUtil.h" #include "Checksums.h" @@ -61,7 +67,7 @@ int main( int argc, char * argv[] ) { for(int i = 1; i < argc; i++) { string s(argv[i]); if(s.size() > 0) { - if(s[0] == '/') { + if(s[0] == OPT_CHAR) { if(s.size() > 1) { if((s[1] == 'v') || (s[1] == 'V')) { beVerbose = true; @@ -117,13 +123,13 @@ int main( int argc, char * argv[] ) { cout << " GENPAT (sourcefile) (targetfile) (patchfile)\n\n"; cout << "Command line option (optional):\n"; - cout << "/R Replace a patch with same contents as source silently if it\n already exists.\n"; - cout << "/B=64 Set blocksize (default=64), multiple of 2 is required.\n"; - cout << "/V More verbose information during patch creation.\n"; - cout << "/O Deactivate match limit of the /A switch (sometimes smaller patches).\n"; - cout << "/A=500 Maximum number of block matches per block (improves performance).\n"; - cout << " Default is 500, larger is slower. Use /V to see the cut-off aborts.\n\n"; - cout << "Note: filenames should never start with / character!\n\n"; + cout << OPT_CHAR << "R Replace a patch with same contents as source silently if it\n already exists.\n"; + cout << OPT_CHAR << "B=64 Set blocksize (default=64), multiple of 2 is required.\n"; + cout << OPT_CHAR << "V More verbose information during patch creation.\n"; + cout << OPT_CHAR << "O Deactivate match limit of the " << OPT_CHAR << "A switch (sometimes smaller patches).\n"; + cout << OPT_CHAR << "A=500 Maximum number of block matches per block (improves performance).\n"; + cout << " Default is 500, larger is slower. Use " << OPT_CHAR << "V to see the cut-off aborts.\n\n"; + cout << "Note: filenames should never start with " << OPT_CHAR << " character!\n\n"; cout << "Possible exit codes:\n"; cout << " 0 Success\n"; cout << " 1 Arguments missing\n";