05-21-2010 12:07 PM
I was wondering how experienced users copy their programs from one rev to another. For ex., I've got a version I call xyz_rev1 which tests rev1 of my hardware. Now rev2 HW comes along with some tweaks. I want to copy xyz_rev1 and make a new copy called xyz_rev2. From that point I can start modifying xyz_rev2 to make it make for rev2 hardware. I don't see any copy function within Labwindows. I know that just copying the folder and renaming doesn't work. I've also found that if I copy the rev1 folder and move it to another drive, it no longer compiles. Not sure I understand why that is.
It seems like LW could and should provide a copy function.
Mike
05-21-2010 01:02 PM
Hi Mike,
to create an updated version of an application I do the following:
Case A: minor changes to an existing version
In this case the updated project will use part of the preceding files (uir, source, include...) and have some file modified.
With the actual project open in the IDE I start by saving the project with another name, next I save the files that need to be modified with another name and proceed to modify them. Next I go to Build >> Target settins and set the new application name before creating it.
To prevent unwanted modification to other files, they can be marked read-only and the IDE will honour that attribute.
Case B: major release with heavy changes
In this case I usually to move the entire project to a new folder. This can be done two ways: either by doing the steps described above for all the files included in the project, or by operating out of the IDE, modifying file names and editing .PRJ file accordingly. This can be done in case of small projects with a limited number of files, otherwise the possibility of errors is very high.
In any case, simply copying the whole project to another location should made a window appear the first one you load the project stating that some files have been moved and path have been fixed. After that, it should compile and run without problems. I cannot be sure it happens all the times, though...
05-24-2010 12:23 PM
With a simple copy, it seems to me (and other developers here) that the move succeeds, but we often see spurious "file can't be found" errors.
I.e., when we start up a project that's been moved, we see a popup appear for a few seconds stating that a file can't be found, then the popup disappears and the project runs normally, all files having been found. The behavior seems second-order-ish so to speak - something's goofy in the project or workspace state that's not quite right but manages to work anyway, and comes and goes for no apparent reason.
Menchar
05-25-2010 09:40 AM
05-26-2010 06:33 PM
Thanks for the replies.
Roberto,
I finally got a chance to try case A and I'm still getting errors. I did the following:
1. Copied the project folder to another drive and renamed the folder.
2. I opened the project and saved it under a new name.
3. Build-->Target Settings and changed the application file to the name matching the project file(.exe)
When I try to compile, I get a WINNT.H sytax error which is occurring at _inline ULONGLONG in the WINNT.H file.
Any ideas?
Mike
05-27-2010 02:31 AM
Well, I have no experience on moving a project to another drive: I normally move projects between my desktop and the laptop or vice versa but I maintain the same directory structure on both machines so this cannot be taken as an example for your situation.
I could suggest to copy again the original project and all files to the new drive and try compiling it as is: if compile comes with no errors than you can proceed to the modifications, othewise something will need to be fixed in the project. Nevertheless, a syntax error on winnt.h is a strange beast: are you running the same machine and simply compiling a project in a different drive or are you compiling on a different machine? In this case you may be running a conflict between different releases of SDK.
05-27-2010 07:53 AM
05-29-2010 02:05 PM
Yup, you can add any arbitrary file type to a CVI project and accrue the benefit of whatever CVI does to manage the grouped files.
Speaking of which:
I just moved an entire folder with a complete CVI workspace and the constituent files. Whenever I start CVI by double left clicking on the .cws file, I get a Windows (not CVI) popup saying
"Windows cannot find (cws full path file name). Make sure you typed the name correctly ...." and so on. This is truly weird because the file is obviously there, it's the file I just double clicked on to start CVI.
At the same time that this is displayed, CVI starts up and loads the workspace that's the file I double clicked on.
I click to clear the "Windows can't find file" popup and it's like it never happened, CVCI runs normally. It dopes this each time I start CVI by double clicking the moved CWS file.
Weird, huh.
Menchar
05-31-2010 12:30 AM
Hi Menchar,
I have made the same observation, but not only for CVI, but for other large programs too. I think that this Windows message is due to the fact that starting the application takes too long (for some Windows timeout); Windows then concludes that the application failed to start...
01-21-2011 02:04 PM
I use Clearcase to keep track of different versions. My project is calls PTS, and when I release a new version, it just has a different version number that corresponds to hardware revs (i.e. PTS v 11.0).
Clearcase is on a network server, and the files for my project are also on that server.
When I work out of the office, I will just copy the whole project file to my local harddrive.
On the server it is mapped to drive X:
on my laptop it is on C:
I open the pts.prj file and everything works properly. I know there are changes done to some of the project files, but I don't know the extent.
It does take care of everything and the project will build and run just fine.
When I copy changes back to Clearcase, I just copy back the changed files (mostly source, but sometimes the UIR and associated .h file.