Dealing with the OF enforced directory and external git repository


#1

OF forces my application to reside in

of/apps/myApps

the git repo that I am using hosts various projects and can not reside in of/apps/myApps for a variety of reasons.

Has anyone come up with a solution to easily add the external directory to the git directory?

  • I know about the new of project creator that lets me pick a directory but again it hard codes the root directory which is useless
  • I can not use ln since it is a directory

thanks a ton!


#2

Are you trying to version your individual projects in myApps or both OF and myApps?


#3
  • why do you find the hard-coding useless? putting your projects wherever you want and using the PG to set the location of OF is not satisfactory? if so, why?
  • why can you not use ln to softlink/symlink the directory? or does softlinking not work as intended?

#4

if I have the of dir in /usr/of, and my project in ~/Documents/code/whatever
then I either have the OF_ROOT set to “…/…/…/…/usr/of” etc, or I have it set to “/usr/of”, both of which are fine for me between machines, but does not work well for sharing with others (which I need to do).

I can do an ln -s, which is just an alias, but the problem is that when opening the xcode project (residing in ~/Documents/code…) I have the same issue as before. I can’t do a hard link since it’s a directory.

I guess I have not tried keeping the xcode files in /usr/of/ and then making an ln -s INTO the git repository… I’ll give that a shot later

I’m trying to version projects that reside in various pre-defined git repos such as ~/Documents/code/jobname/project.xcodeproj, but not make them hard coded to my /usr/of path

thanks guys


#5

hm, at least the project generator pulls the OF location from ~/.ofprojectgenerator/config, which is machine/user-dependent, so you should be fine to share your projects with others (who just have a different path in _their_ ~/.ofprojectgenerator/config if they have a working OF).
so, you should be fine, except if you set your OF_ROOT in another way, or this gets hard-coded into the project files at project generation time. sorry I’m not too knowledgeable about this, my projects just sit in myApps.

A proposition/question: why not have your OF directory in ~/OF (also makes checking out/switching OF version possible without root perms), and your projects in ~/OF/apps/code/jobname/project.xcodeproj? you can still manage your projects’ code inside a git repo (as this folder is being ignored by OF’s git repo settings). Is the only reason for your desired structure that you absolutely want your projects’ code in ~/Documents/code instead of a different location? if so, what about soft-linking from ~/Documents/code to ~/OF/apps/code/?