使用单个工作副本进行跨平台开发
我们正在 OSX 上进行一些跨平台开发,并安装了不同 Windows 版本的 Parallels。有没有人找到一个好的解决方案来共享单个工作副本/代码库,而不必在每个操作系统上检查不同的副本?
We are doing some cross platform development on OSX with Paralells installed with different Windows versions. Has anyone found a good solution to share a single working copy/code base instead of having to check out different copies on each operating system?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的第一个想法是分布式版本控制,例如 Git 或 Mercurial。但这为您提供了一个共享存储库,而不是共享工作副本。
将目录公开为共享网络驱动器并从其他虚拟环境连接到该目录怎么样?
My first thought would be distributed version control, such as Git or Mercurial. But that gives you a shared repository, not a shared working copy.
What about exposing a directory as a shared network drive and connecting to it from the other virtual environments?
我正在为此使用保管箱。没有什么可以阻止您同时将文件置于版本控制和保管箱中。我发现这种方法比安装网络文件系统(例如使用 SMB、NFS 或 sshfs)产生更快的编译时间。
关键是为源外构建配置构建系统。
CMake 是一个构建系统,可以让这一切变得微不足道:
http://www.cmake.org/Wiki/CMake_FAQ #What_is_an_.22out-of-source.22_build.3F
如果无法修改构建系统,一种可能的替代方法是将所有源文件放在单独的 dropbox 同步目录,并将其符号链接到常规构建树中。
I'm using dropbox for this. Nothing stops you from having your files in version control and dropbox at the same time. I've discovered that this approach produces faster compile times than mounting a networked file system (e.g. with SMB, NFS or sshfs).
The key is to configure your build system for out-of-source builds.
CMake is one build system that makes this trivial:
http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F
If modifying your build system is not an option, one possible alternative is to put all your source files in a separate dropbox-synced directory and just sym-link it in your regular build tree.