[solved] copying/renaming a project
-
OK, thanks, guys.
-
Actually, two follow-up questions:
- am I correct in assuming I should rename the .pro.user file, too?
- what's the best way to get Creator to make me a build directory? Or will this happen for me automatically, like when I create a new project?
Thanks.
-
-
I recommend deleting the .pro.user file - it contains absolute paths that may clutter with the original paths of your copy.
-
If you import a project, select "shadow build" in the wizard that pops up. Creator and/or qmake will create any missing build directories.
-
-
Regarding #2...I just copied the entire project file structure. Should I not have done that? I can't import that way.
-
Oh, no problem with that. I do that regularly :-) Just make sure to not re-use the .pro.user file. If you open the .pro files in Creator the project wizards start over. This ensures that your paths are not messed up with the old project (original copy).
-
OK, so maybe a recommended procedure (if it's not documented elsewhere, this might help someone later) is:
- copy the directory structure.
- delete the .pro.user file
- change the build directory in Projects->Build
- modify the name of the .pro file if desired (or edit the TARGET tag in the .pro file)
- run qmake
Did I leave anything out?
-
Sounds good to me.
-
Excellent...thanks again.
-
[quote author="mzimmers" date="1320972557"]OK, so maybe a recommended procedure (if it's not documented elsewhere, this might help someone later) is:
- copy the directory structure.
- delete the .pro.user file
- change the build directory in Projects->Build
- modify the name of the .pro file if desired (or edit the TARGET tag in the .pro file)
- run qmake
[/quote]
You could make a doc note / wiki page for that and it will be documented...
-
Run this script in the folder where your project is located. It will fix rename the files and change their contents accordingly.
@#!/bin/bash
echo "old: $1", "new: $2"rename "s/$1/$2/" *
cd $2
rename "s/$1/$2/" *
find $NEW -type f -exec sed -i "s/$1/$2/g" {} ;echo "Done"@