Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: killerbot on July 31, 2007, 10:49:21 pm

Title: new console project
Post by: killerbot on July 31, 2007, 10:49:21 pm
Was run CB from within CB (so the devel dir version of it was running), and I created a new console project. Suddenli I noticed I had an others section in my source tree, inspecting the cbp file I noticed these :
Quote
      <Unit filename=".svn/entries" />
      <Unit filename=".svn/format" />
      <Unit filename=".svn/text-base/Makefile.am.svn-base" />
      <Unit filename=".svn/text-base/main.cpp.svn-base" />
      <Unit filename="Makefile.am" />
      <Unit filename="main.cpp" />

Seems a little bug ?

Over to the wizard gurus ;-)
Title: Re: new console project
Post by: raph on July 31, 2007, 11:15:44 pm
I noticed this some time ago and fixed it, but hadn't time to submit a patch.
The problem is, that the .svn dir is copied into the template/wizard/wizardtype subdirs.

The fix is simple: just add \.svn\ to excludes.txt in update.bat
Code
Index: update.bat
===================================================================
--- update.bat (revision 4338)
+++ update.bat (working copy)
@@ -77,6 +77,7 @@
 copy /y plugins\codecompletion\resources\images\*.png %RESDIR%\images\codecompletion > nul
 copy /y plugins\codecompletion\resources\images\*.png output\share\codeblocks\images\codecompletion > nul
 echo Makefile.am > excludes.txt
+echo \.svn\ >> excludes.txt
 xcopy /y /s plugins\scriptedwizard\resources\* %RESDIR%\templates\wizard /EXCLUDE:excludes.txt >nul
 xcopy /y /s plugins\scriptedwizard\resources\* output\share\codeblocks\templates\wizard /EXCLUDE:excludes.txt >nul
 xcopy /y templates\common\* output\share\codeblocks\templates /EXCLUDE:excludes.txt > nul

Best Regards
raph
Title: Re: new console project
Post by: killerbot on July 31, 2007, 11:28:36 pm
ok thanks, I will adjust update.bat tomorrow in svn.
However on linux we use the cp command in update.sh, and that doesn't seem to provide an exclude mechanism like xcopy.
Does anyone know of such an xcopy replacement in linux, which is standard and present in (all) linux-es ???
Title: Re: new console project
Post by: Biplab on August 01, 2007, 05:38:36 am
I didn't face this problem. It works fine in my system. :)

Is this problem occurring on Windows?? I believe there is no need to change the batch file.
Title: Re: new console project
Post by: killerbot on August 01, 2007, 03:51:04 pm
It occurs for sure if you build CB with CB on linux.
On windows, it does not occur for me, because the update.bat already put the makefile.am in excludes, however the .svn could happen I guess. For most people it does not occur, since that .svn is a hidden dir, but maybe it can, to be correct we ned to adjust the update.bat as suggested above, and find a solution for linux.
Title: Re: new console project
Post by: Biplab on August 01, 2007, 05:40:30 pm
On Linux you may use the following command to stop .svn entries being copied.
Code
cp {Src_dir}/[!.]* {Dest_dir}
I haven't tested it. But it should work. :)
Title: Re: new console project
Post by: killerbot on August 01, 2007, 05:44:39 pm
can you combine, since also the makefile.am should not be copied. man cp or info cp on my box shuts up completely about the option you mentioned :-(
Title: Re: new console project
Post by: Biplab on August 01, 2007, 05:47:09 pm
I'm a novice with Regex. :( But I'll Google it to find out combined solution.

But you try that command in shell and it should work. :)

Edit 1: That command didn't work. Let me try. :(

Edit 2: It works and it excludes .svn directories!!
Title: Re: new console project
Post by: Biplab on September 08, 2007, 03:33:31 pm
can you combine, since also the makefile.am should not be copied. man cp or info cp on my box shuts up completely about the option you mentioned :-(

Finally I've fixed it. It's in rev 4444. :)
Title: Re: new console project
Post by: killerbot on September 08, 2007, 04:48:51 pm
confirmed fixed :-)