Log in

View Full Version : Copying a MS VC++ project


Si
19th March 2005, 11:29
Is there a free (or low cost) project copying program to copy MS VC++ 6 projects?

I'm getting too old to do search and replace manually- my digits arn't what they used to be :p

regards
Simon
PS OK - I'm just getting lazy :p )

esby
21st March 2005, 23:48
What do you mean exactly by copying?

esby

Si
22nd March 2005, 23:13
Well currently if I want a copy of an Avisynth plugin I have to duplicate the folder the project is in, change the name of the folder from copy of origprojectname to newprojectname.

I then rename the .dsw and .dsp files.

I then do a search and replace in the .dsw and .dsp files to replace origprojectname with newprojectname.

I also normally call the main .cpp file origprojectname.cpp so I rename that to newprojectname.cpp

I also call the Avisynth filter origprojectname so I search and replace that within the .cpp file as well.

When you first said "what do I mean by copying" I thought - copy - make a duplicate - how simple is that?

But I now see it was a very very good question :D

regards

Simon

ARDA
23rd March 2005, 01:34
Open Microsoft Visual C++ 6
File--- New
Workspaces ---- Write the name of your workspace
generally tha same of your project

without closing such window

Projects --- Win32 Dynamic-Link Library
In Project name write the name of you new project

Set Win32 Dynamic-Link Library
OK to finish

What kind of DLL would you like to create?
Set An empty DLL project

Finish

An empty DLL project will be created for you
No files will be created or added to the project

OK

Now copy your main.cpp or whatever cpp you have created
and avisynth.h to the directory that was created

Go to FileView

Right over Source Files and Add Files to Folder --- Where you add your cpp file
Right over Header Files and Add Files to Folde --- Where you add your avisynth.h

Go to Build --- Set Active Configuration - Win32 Release (Debug is created with the project)

Go to Project --- Settings --- C/C++

Verify General Level3 Maximize Speed
C++Language Best-Case-Always* -Enable exception handling
Code Generation Porcessor Blend* or Pentium Pro
Calling convention _cdecl*
Use rin-time library --- Multithreaded DLL *** pay attention here
Struct member alignment ---8 Bytes*
Customize Suppress startup banner and information messages
Optimizations Inline function expansion ---- Only_inline
Precompiled Headers Automatic use of precompiled headers

Go to Project --- Settings --- Link
Verify General The path to where you want your DLL is created
Customize Use program database Suppress startup banner
etc etc etc

That should be enough to create a new project for an avisynth plugin.
I hope this can be usefull
ARDA

Wilbert
23rd March 2005, 17:31
A related though probably dumb question :) How do you remove files from your workspace/project?

ARDA
23rd March 2005, 17:44
My apologizes but I don't understand your question

When you create a new project/workspace and you ask for
an empty project just the dsp,dsw and debug folder are created.

Then you have to add(or create)your files not remove any file.
But it seems to me that we are talking of different things.
Please forgive me if I can get to answer your question.
Please; can extend your question ?

Greetings
ARDA

esby
23rd March 2005, 22:51
I think that he wants to create a 'dummy' project for an avisynth filter.
including the possible methods to define, and the avisynth.h link...
Something like a 'skeleton' project for creating a generic avisynth filter.

esby

PS: If i m understanding well, his idea would be to create a new filter project according to one already existing... Something like 'code forking'...

Wilbert
23rd March 2005, 22:52
Then you have to add(or create)your files not remove any file.
But it seems to me that we are talking of different things.
Please forgive me if I can get to answer your question.
Please; can extend your question ?
I will rephrase it a bit. Suppose you already added source and header files to your project, but want to remove some of them. How do you do that?

ARDA
23rd March 2005, 23:04
Put your mouse at left over such file click right, settings General exclude file from build ok.

You will see that the arrow is deleted.Then grey such file by selecting and delete.

After that you can delete the file from your directory
Is that what you want to do?

ARDA

Wilbert
23rd March 2005, 23:11
I forgot to open the FileView tab (was looking at the tabs at the top) :D Thanks.

Si
24th March 2005, 10:39
If i m understanding well, his idea would be to create a new filter project according to one already existing... Something like 'code forking'...

Exactly.

I want something to copy the project files, rename any origprojectname.xxx files with new projectname.xxx.

Inside all files - replace *origprojectname* with *newprojectname*

Just to save me doing it manually :o

regards
Simon

esby
24th March 2005, 11:15
install cygwin
and use cp, mv & sed :)

And you could also uses perl instead of sed

perl -i -ape "s{origprojectname}{newprojectname}i" filename


esby