我的设定
我有一台Windows 10 PC,在那上面我有一个ubuntu 18.04 virtualbox(+访客版),并且一切正常。
我使用ubuntu VM来开发我们的C ++代码,所有工具和gcc等都能很好地工作。但是,我们使用IBM的Rhapsody生成了一些状态机代码-可能是一个错误,但是我们现在想停止使用它及其良好的状态机工具的路太远了-但是糟糕的IDE!
Rhapsody在Windows上运行良好,但仅受Redhat 32位版本6支持。我正在努力使其在较新的版本和64位上运行-但这是当前的后台任务。
我需要的是一种生成状态代码并将其与项目其余部分集成的快速方法。这是我的想法:
- On windows draw the state machine with rhapsody and generate code->
.../project/autogen/
all the rhapsody code is put into one folder called autogen. - On the ubuntu VM build the project
.../project/> make
但是,这需要共享VM文件夹和Windows文件夹。因此,听起来我只需要设置一个VM共享即可。这里的问题是共享的文件夹是Windows端的,并且该文件夹格式不适用于linux(git,make,gcc等),因为权限/类型都是错误的(更不用说符号链接了) 。
我们目前的解决方案
因此,目前,我们在Windows和ubuntu中都具有完整的开发环境。在Windows上使用Visual Studio和狂想曲。在具有gcc和vscode的Ubuntu上。我们的工作流程如下:
- 在Windows上:编辑Rhapsody状态机并生成代码
- 在Windows上:测试和调试状态更改
- 在Windows上:将更改提交到git
- 在ubuntu上:从git提取更改
- 在ubuntu上:编辑代码的其他区域,进行测试和调试
- 在Ubuntu上:推送至git
- 在Windows上:从git中拉出
- 在Windows上:重新测试更改(必要时进行调试)
We have two jenkins servers (for windows and ubuntu). The overhead of keeping windows side working is getting quit high and time consuming as the code wants to become more linux specific (it is designed to run on embedded linux systems). So there are plenty of #ifdef WIN32
bits of code around - we have a OS abstraction layer etc...
我们希望消除在Windows上进行开发的需要。
我对解决方案的想法
所以我的想法是我以某种方式在VM上创建了一个共享文件夹,可以在Windows中打开该文件夹来编辑狂想曲文件并生成autogen代码,如下所示:
- In the VM:
- I do all the building (gcc, make, etc...)
- I do all the config control (git)
- I do all other code/project editing (using vscode, etc...)
- In the windows host:
- I just open the rhapsody project, can edit and save it and get it to generate files into the shared
project/autogen
folder directly on the VM.
- I just open the rhapsody project, can edit and save it and get it to generate files into the shared
所以我的问题是: 1.这可行吗 2.这可能吗? -如果可以,如何从Ubuntu VM共享文件夹,以便Windows框可以看到它?
正如我提到的,我也试图让Rhapsody在Linux上运行,到目前为止,我已经在Centos6上运行它了,但是那太旧了,不好了。我正朝32位centos8迈进,看看我能走多远,但这可能需要一段时间。
任何其他建议欢迎。