Author Topic: Some issues about opening/importing projects  (Read 3690 times)

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Some issues about opening/importing projects
« on: December 12, 2005, 07:39:13 pm »
I was working with revision 1480 while I noticed some problems:

- I imported a msvc7 workspace with one project. I did not make any changes to the project or one of its source-files. Then I closed the project with 'File->Close project'. Code::Blocks asked me if I want to save my changes to the project. I said no. Then I opened a standard-Code::Blocks project (in fact, it was Code::Blocks itself.) and looked at some source files. I did not change anything but when I closed Code::Blocks it asked me if I want to save the changes I made to the project which I imported at first - the project that I already had closed! I could not check if this only happens when importing a project from msvc7 because:

- When I open a Code::Blocks project (using the recent projects listet on the start here page) and then immediately close it with 'File->Close project' Code::Blocks shows the start-here-page again and freezes. It does not consume more CPU than usual it simply doens't respond to any action. This only happend after I closes a Code::Blocks-project, not the one which I imported from msvc7.

- The msvc7 project I imported has its source files distributed to multiple sub-directories. The file-names are stored in the msvc7 projectfile like this: ".\src\foo.cpp" ".\include\bar.h" etc. Notice the ".\" before the actual directory! (No idea why msvc7 stores this information - but it does.) Code::Blocks opens this project file correctly and you can also open the source files when you click at them in the project explorer. But as Code::Blocks displays the directories in the project explorer, too, it also displays the ".\" as additional directory. Thus the structure looked like this:
Code
Sources
-> .
   -> src
      -> foo.cpp
-> .
   -> include
      -> bar.h
This is absolutely correct but not necessary and rather confusing. I wrote (and attached to this post) a little patch to remove ".\" from the file names while importing source files from msvc7 projects. I think it should be applied to the repository.

[attachment deleted by admin]
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

takeshimiya

  • Guest
Re: Some issues about opening/importing projects
« Reply #1 on: December 12, 2005, 07:47:29 pm »
I want to note that MSVC 6 saves the path with .\ also:

example in a .dsw:
Project: "ProjTest"=.\ProjTest.dsp - Package Owner=<4>

example in a .dsp
SOURCE=.\StdAfx.cpp