views:

156

answers:

2

I would like to port an embedded application to x86 to create an emulator. We decided to give VS2008 a try but I'm not sure how to make vs to understand our existing directory structure:

  • arch/
    • arch/hcs08 -- HAL implementation
    • arch/include -- public interface of HAL
    • arch/x86 -- here should goes the emulation layer
  • os/
    • os/src -- source for os layer
    • os/include -- public interface of OS
  • apps/ -- embedded applications
    • apps/app1/src -- app1
    • apps/app2/src -- app2

I would like to have 3 projects:

  • arch & os - library project, that contains everything in os/, arch/include/ and arch/x86/*
  • app1 - console app project, that contains everything in apps/app1/*
  • app2 - console app project, that contains everything in apps/app1/*

I've created the above structure by importing files manually one by one, but obviously vs doesn't pick new files automatically and my project is flat (no folders)

OS & application layers are under constant development so adding new files is really irritating.

Is there any way to make VS to pick all new files automatically and keep the directory structure?

I know that I can easily to the above in Eclipse CDT but as I said we would like to try VS2008.

+1  A: 

VS2008, off-course can have directory structure for the project. But you need to manually create it. To do this, right-click on you project, and their you will find "add folder" menu. You can create the same folder set as followed by your project.

Automatic file addition: I have not heard of this. Probably its not possible. Unless you are adding too many files to your project, adding files manually is not that difficult in VS ..

Alphaneo
+2  A: 

Piotr, You have to choose "Show all files" option from solution explorer. It will show you all files in your project directories structure. The files not included in project (modified outside VS, copied etc) should appear as pale white objects. Everything to do is to include them into project by clicking the menu option on context menu for selected item. This option adds also whole directory structure recursively. Of course, you can also exclude the files unnecessary in project.

The Visual Studio uses XML files to handle every solution and project content, thus its behavior differs a little from Eclipse which AFAIK included whole filesystem directory. If you wish to incorporate the file into project, you have to do it on your demand or copy it directly to solution explorer. Of course, if you wish to use SVN it's a good idea to choose VS plugin which will do the work without bothering you. (i.e AnkhSVN - open source and free).

You can also develop your own "watchdog" plugin to refresh the content ;)

Best regards, J.

juckobee
Thank you Juckobee. It is the answer I was looking for :)
Piotr Czapla