Recommendations for building on PC from Mac source code?
-
As I mentioned in a couple other threads, I've been working on an app in Creator on my Mac for some time. I now need to build on a PC. I've installed Qt on the PC, and have the two computers networked.
It would be ideal if I could somehow build on the PC by using the network to access the source files from the Mac, rather than keeping a separate copy of the source on the PC. My preliminary efforts to do this have been blunted, though. If I try to create a build directory on the PC, I get the warning that source/target directories must be at the same level. If I try to create the target directories on the Mac, I risk overwriting my .pro.user file.
I imagine someone's found a way to do this already...any suggestions?
Thanks.
-
Use a version control system! Once you get used to having one you will not do any project without one.
Plus it is great to keep sources in sync between different computers.
Note that the .user file ends up in the source dir, so accessing the same sources from both the PC and the Mac will cause it to be overwritten.
-
You can generally ignore the warning about directories (I do that all the time). However, I do not have any good suggestion as to how you can maintain the same .user file settings between the environments. I do not have a PC, so work off a parallels vm for Windows7. I mount my MAC home directory on windows and work off it. Since have my .user file also in subversion, I just revert any changes made from windows (if at all). Generally, I run qmake and nmake from command prompt to build and test on windows. Only when I need to debug do I fire up Qt Creator.
Rakesh
-
Thanks, Tobias...someone's been trying to get me on subversion for awhile; I guess now is the time to take the plunge. Do I need a special integration package to start using it?
EDIT: OK, I just installed subversion (through Macports; my first effort with that). In Creator Preferences -> Version Control, I've selected Subversion, and given it the path to the binary.
So...now what do I do? In other words, how do I get started with version control?
-
I personally would recommend "git":http://git-scm.com, "bazaar":http://bazaar.canonical.com or "mercurial":http://mercurial.selenic.com/ instead of subversion. All of the three have the big advantage that they work without a central repository and you can check-in even if you're not connected to the internets. While using subversion is ok for existing repositories, I never would start a new project on it again. The distributed SCMs just have too much advantages in day to day live.
All of the three DVCS provide the same basic features, they differ in the advanced features though. I personally prefer mercurial. In my opinion it the easiest to begin with. Once you're used to the concepts it's not too hard to switch between tools.
-
Hey, Volker...good to hear with you. Subversion wasn't my choice; it's the system that was recently chosen for my company for CM on various IP assets. I could fight it, but I'd rather save my energy for getting ready to put a nice fancy Qt UI on the front of my next project.
I'm a little disturbed, though, that I don't find anything in Creator in the way of "hooks" into it. I'm also a bit disappointed by the lack of a forum for asking questions. But, with the help of some people here, I'm sure I'll manage.
Thanks for the input.
-
The Mac distribution does include subversion support by default. You should see that under Preferences->Version Control. I have been using the subversion integration without any major issues for a while.
-
I do see it in the preferences. But...I don't see how I'm supposed to use it. Can you check things in/out of the repository through Creator? As I mentioned above, I don't see any "hooks" into svn.
-
It is a little lacking in that regard (unlike other IDE's). If your project is already in subversion (it sees the appropriate .svn directories), then the integration is enabled. You can check in, update etc., but the initial checkout needs to be from terminal or other tool.
-
I created the repository and checked everything in via the command line. So, now I need to check it out to get Creator to see it? Should I target a new directory to check it out?
-
SVN support is enabled when opening a project containing a SVN checkout. So just opening the project from the directory you checked everything in from should be fine.
On the other box use File->New File or Project->Import existing->from SVN (This is from the top of my head, I think I got the last two slightly wrong;-) to get the checkout there.
By the way: Qt Creator comes with a manual.
-
Hi, Tobias –
It took me awhile to get back to this, as I got sidetracked. Anyway, I'm now using the company's SVN server for both my Mac and my PC. I'm using Cornerstone on the Mac, and Tortoise on the PC. (I doubt I'll be doing anything other than checkouts from the PC, though, since I don't plan on developing on it.)
I'm still figuring out the SVN integration in Creator; I tried to use the diff command last night, and crashed Creator. When I can make that repeatable, I suppose I should enter a bug report.
In the meantime, something is screwy with my PC install of Qt. The debugger's not launching; I posted about it last night:
"link":http://developer.qt.nokia.com/forums/viewthread/14632
Any ideas on this?
I notice in my tool chain that Creator has "found" the Visual Studio install on my system as well. Is there a way to get rid of items in the tool chain that were found automatically? I'm wondering whether the proliferation of different tool sets on the PC might be part of the problem with the debugger.
-
The tool chains are not used when not selected in the Build Configuration. The debugger is picked based on the tool chain actually used, so that should not be a problem.
I would personally use the MSVC tool chain.
-
OK, thanks...may I ask why you'd use MSVC over what comes bundled with Qt?
EDIT:
I spent most of yesterday trying to clean up this PC that I've been forced to work on. This AM I re-installed the MSVC and created a new build configuration for it. When I tried to build, I got the following error:
@06:39:48: Running build steps for project HittiteModem...
06:39:48: Configuration unchanged, skipping qmake step.
06:39:48: Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 2 -f Makefile.Debug
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -I"..\simulator" -I"..\simulator\headers" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\DOCUME~1\Putin\LOCALS~1\Temp\clock.obj.1364.109.jom
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -I"..\simulator" -I"..\simulator\headers" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.0\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\DOCUME~1\Putin\LOCALS~1\Temp\demod.obj.1364.156.jom
jom 1.0.6 - empower your cores
'cl' is not recognized as an internal or external command,
operable program or batch file.
command failed with exit code 1
'cl' is not recognized as an internal or external command,
operable program or batch file.
command failed with exit code 1
command failed with exit code 2
06:39:49: The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
Error while building project HittiteModem (target: Desktop)
When executing build step 'Make'@Can someone tell me what:
- jom.exe is
- this "cl" command is
Thanks.
EDIT II:
Traced this to a environment variable problem, and fixed.
I now am getting a jom.exe error 2 in my build...can someone shine some light on this? I can provide additional information if desired. Thanks.