[Geany-devel] Remove MSYS dependency of Geany on Win~1

Nick Treleaven nick.treleaven at xxxxx
Tue Jul 10 11:55:58 UTC 2012


On 09/07/2012 19:13, Dimitar Zhekov wrote:
> On Sun, 08 Jul 2012 13:04:54 +0100
> Nick Treleaven<nick.treleaven at btinternet.com>  wrote:
>
>> BTW I've run into 2 problems with the install target:
>>
>> 1. cp -r and xcopy treat the destination path differently. Currently
>> MSYS install is broken and will install data files as
>> $DESTDIR/data/data/* - I've replaced xcopy with separate copy targets
>> locally. Unfortunately that causes errors with subdirectories so I had
>> to ignore them, which I'd prefer not to do. See attached diff.
>
> "cp: omitting directory 'foo'" errors on any subdirectories with GNU
> cp. Wait... the _only_ 'cp' we have under Win~1 GNU cp, right? Instead
> of the patch, we can define CP_R as 'cp -r --remove-destination'. This
> non-POSIX option exists since at least fileutils-4.1 from 2001. Well,
> it'll remove $(DESTDIR)/data before copying, which I would prefer not
> to do, but there shoudn't be any user files anyway.

No, the subdir errors are with windows 'copy'.

It's not good to remove *all* destination files, it is valid to add 
files to the system config directory, understanding that they may get 
overwritten on upgrade /if/ a file with the same name is installed. This 
allows users to share some of the same config files.

But this problem can be resolved either with separate copy commands as I 
attached previously, or maybe by having different install-data targets 
depending on whether MSYS is defined.

>> 2. A weird problem. Installing from cmd.exe doesn't overwrite
>> geany.glade (and maybe some other files) even though it appears to
>> succeed. I only noticed this because I'm missing the View->Editor->Color
>> Schemes menu which was added about a month ago (I tend to test in place
>> rather than install each time).
>
> OMG... Then we must choose between copy and xcopy depending on which one
> works. Or we can define:

Neither one works here ;-) But maybe it's something weird about my 
system or because I previously installed using MSYS cp.

>
> for cmd: 'CP_R = xcopy /s /y /i'  and  'RM_R = del /s'

xcopy /i doesn't seem to help here if the destination already exists (I 
don't think we should remove $DESTDIR).

> for MSYS: 'CP_R = cp -r'  and  'RM_R = rm -r'
>
> and replace the '-$(MKDIR) "$(DESTDIR)/data"' with '-$(RM_R)
> "$(DESTDIR)/data"'.
>
> That will (a) nullify the differences between 'cp -r' and 'xcopy /s',
> (b) be a bit shorter than the individual MKDIR/CP commands from the
> patch, and (c) fix the overriding problem, since the target files will
> not exist - or maybe reveal something about the reason why it fails.
>
> Well, we haven't run out of options yet. I'll test the patch tomorrow.
>




More information about the Devel mailing list