Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 #2701 is a reply to message #2696] Sat, 22 April 2006 01:31 Go to previous messageGo to previous message
gprentice is currently offline  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 Cool :

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 Smile ?



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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Link error when building ide\Debuggers module? [SOLVED] -not main package
Next Topic: Bug
Goto Forum:
  


Current Time: Tue Apr 23 16:16:22 CEST 2024

Total time taken to generate the page: 0.48233 seconds