Old 2nd November 2007, 14:18   #1
mlrye
Junior Member
 
Join Date: Nov 2007
Posts: 2
nsisPatchGen problem with paths

Providing an absolute path as the value for the PATCH_FILES_ROOT in the patch script results in a successful build but failed patcher.

Using the default example if I were to add paths as follows:

code:

!define PATCH_SOURCE_ROOT "C:\versions\version2"
!define PATCH_FILES_ROOT "C:\patches\patch2"



when the patch runs, during the file modification step where it creates a directory and extracts the patch file, the path to extract becomes mangled

code:

Extract: C:\DOCUME~1\User\LOCALS~1\Temp\nsy74.tmp\C:\patches\patch2\test.txt.pat
Unable to open patch file



including the "C:\" in the middle causing this step to fail.

In addition, if I were to change the PATCH_FILES_ROOT to include "../../../" in it, I run the risk of extracting patch files outside of the temp folder.

Otherwise very nice utility.
mlrye is offline   Reply With Quote
Old 2nd November 2007, 17:22   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I don't know if the author hangs here a lot, so I'd try reporting the issue in the bug tracker as well:

http://sourceforge.net/tracker/?atid...32&func=browse

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 2nd November 2007, 21:51   #3
mlrye
Junior Member
 
Join Date: Nov 2007
Posts: 2
Agreed. Just thought I would warn the NSIS community in general who might use it because it is a helpful utility.
mlrye is offline   Reply With Quote
Old 6th November 2007, 22:19   #4
viperpiper
Junior Member
 
Join Date: May 2006
Posts: 7
Quote:
Originally posted by kichik
[B]I don't know if the author hangs here a lot...
I just pop in now and again ;-)

Had a quick look at the problem. It seems the VPatchFile macro does not like absoulte paths. I think the best way to deal with this would be to improve the VPatchFile macro rather than implement our own. I could apply fixes to the VPatchFile macro regarding handling of spaces in the name suggested in the wiki page (http://nsis.sourceforge.net/VPatch_plug-in)at the same time.
I'll see what I can do....
viperpiper is offline   Reply With Quote
Old 10th November 2007, 14:00   #5
viperpiper
Junior Member
 
Join Date: May 2006
Posts: 7
Updated nsisPatchGen to v1.0.2 which fixes the problems with absolute paths and paths with spaces in them.

We no longer use the VPatchFile macro, instead we use our own modified version of it.
viperpiper is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump