|
|
Home » U++ TheIDE » U++ TheIDE: Packages » howto duplicate main package and rename classes "in bulk"?
|
|
|
|
Re: howto duplicate main package and rename classes "in bulk"? [message #271 is a reply to message #270] |
Mon, 05 December 2005 18:10   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Mon, 05 December 2005 11:38 |
Well, just keep in mind that you can have more main packages - projects in single nest. So perhaps "MyProjects" would work too... (as does MyApps...).
|
BTW, I tried to achieve the same "one level deeper" - in MyApps, but, for the "unknown reasons" , it didn't work... Maybe, I did something wrong. Could anyone post the detailed instructions?
But, in fact I'd prefer that kind of feature to have from TheIDE...
|
|
|
Re: howto duplicate main package and rename classes "in bulk"? [message #272 is a reply to message #271] |
Mon, 05 December 2005 18:37   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
fudadmin wrote on Mon, 05 December 2005 12:10 |
luzr wrote on Mon, 05 December 2005 11:38 |
Well, just keep in mind that you can have more main packages - projects in single nest. So perhaps "MyProjects" would work too... (as does MyApps...).
|
BTW, I tried to achieve the same "one level deeper" - in MyApps, but, for the "unknown reasons" , it didn't work... Maybe, I did something wrong. Could anyone post the detailed instructions?
But, in fact I'd prefer that kind of feature to have from TheIDE...
|
Well, thinking about it, if the purpose is "versioning", that your solution is weird, but working 
However, I recommend using versioning system. Either uvs2 or anything else. What you describe can be good when you are about to refactor large portions of code, thought...
|
|
|
|
|
Re: howto duplicate main package and rename classes "in bulk"? [message #2701 is a reply to message #2696] |
Sat, 22 April 2006 01:31   |
gprentice
Messages: 260 Registered: November 2005 Location: New Zealand
|
Experienced Member |
|
|
forlano wrote on Sat, 22 April 2006 07:45 |
luzr wrote on Mon, 05 December 2005 17:38 |
fudadmin wrote on Mon, 05 December 2005 10:32 |
luzr wrote on Mon, 05 December 2005 04:04 |
fudadmin wrote on Mon, 05 December 2005 03:23 | howto duplicate main package and rename classes "in bulk"?
|
No direct support. You can "clone" package by copying its folder and renaming ".upp" file (.upp file contans the package information and must much the name of directory).
To rename classes, use Find in files.
|
Thank you! That's great!
Now I have Aris versioning system :
1. Preparation - performed once:
1.1. Create your working dir e.g "uppMyWork" (paralell with upp).
1.2. Make a copy of "MyApps.var" (file in "upp" dir) and Rename to e.g "MyProject1.var"
1.3. Edit inside e.g "MyProject1.var" (e.g with Notepad) to have the correct dirs.
(That should enough to show "MyProject1" in Assembly column of package dialogue)
2. Every time you want - a new Project(assembly?):
2.1. Make a copy of any existing "*.var" to e.g "MyProject2.var" 2.2. Edit inside e.g "MyProject2.var" (e.g with Notepad) to have the correct dirs.
3. Every time you want - a new Versions of a project:
3.1. Copy and Rename a subdir with inside files e.g. "MyProject1" (in e.g "uppMyWork") to "MyProject2" and
3.2. Rename "MyProject1.upp" file inside the subdir to "MyProject2.upp"
Does it breach any Myrek's good rules ?
|
Well, just keep in mind that you can have more main packages - projects in single nest. So perhaps "MyProjects" would work too... (as does MyApps...).
|
I'm quoting an old post. Perhaps the solution changed since it.
I've a similar problem. My project is growing quickly and some time I want to work on a new version freezing the old.
Unfotunately copy and past of the folder package and renaming the upp file is not enough. In fact I use *lay and *iml file that depend by the package directory. So each time I must rename all the include.
Does exist a lazy way to do a copy of a package?
Luigi
PS: in my package I don't see any *.var file.
|
U++ is designed to make copying and distribution of a package very easy. If you have an existing package PKG1 in a folder called NEST1, to copy/replicate the package in another folder, say NEST2, just copy the PKG1 folder (and all its content) to the NEST2 folder. Create a new assembly, say Assembly2, and add the NEST2 path to the assembly nests path list - so the nest paths might then look something like
L:\Projects\Upp\NEST2;L:\Apps\upp604Dev3\uppsrc
After you copy the PKG1 folder into NEST2 and create the assembly you should see the PKG1 package in the list of packages for the NEST2 assembly.
Inside the package, all path information normally starts with a package name e.g. PKG1 and the nest path setting in the assembly determines where PKG1 is looked for. *.iml and .lay files don't have path information in them (I believe) so should be no problem.
If you have used explicit path information in your source files
e.g. #include L:\xyz\something.cpp
then you have more work to do if you want something.cpp to be not shared between PKG1 and PKG2. Most of the time, your #includes either have no path information in them at all, or the path starts with a package name.
e.g. with #include <CtrlLib/CtrlLib.h>
CtrlLib is a package name and U++ will try to locate a folder of that name in one of the nest paths of the assembly.
Try reading "packages, assemblies and nests" in the help - click on "help index" in theIDE. I could add a section called "copying a package" to it but I have a feeling nobody is reading it ...
Graeme
|
|
|
Re: howto duplicate main package and rename classes "in bulk"? [message #2702 is a reply to message #2699] |
Sat, 22 April 2006 02:03   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
fudadmin wrote on Fri, 21 April 2006 23:37 | *.var files live in your main upp dir where theide.exe lives.
But now (I think...) you can create a new var with right click in the left pane after ide start:
"Create a new assembly". Then, fill in some dirs.
|
Also, you can open *.var files as text, study the syntax (easy) and create, and edit them "by hand".
For myself, I've made ("nearly finished"... ) my vars and packages and templates manager... If I find some more inspiration to finish it, I'll post it.
[Updated on: Sat, 22 April 2006 05:42] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri May 09 16:03:49 CEST 2025
Total time taken to generate the page: 0.00479 seconds
|
|
|