Author Topic: new console project  (Read 7953 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
new console project
« 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 ;-)

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: new console project
« Reply #1 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

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: new console project
« Reply #2 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 ???

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: new console project
« Reply #3 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.
Be a part of the solution, not a part of the problem.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: new console project
« Reply #4 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.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: new console project
« Reply #5 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. :)
« Last Edit: August 01, 2007, 05:42:11 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: new console project
« Reply #6 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 :-(

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: new console project
« Reply #7 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!!
« Last Edit: August 01, 2007, 05:54:01 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: new console project
« Reply #8 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. :)
Be a part of the solution, not a part of the problem.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: new console project
« Reply #9 on: September 08, 2007, 04:48:51 pm »
confirmed fixed :-)