简体   繁体   English

将 .NET C++ 独立移植到 Mac

[英]Porting .NET C++ standalone to Mac

I need to give an estimate for porting a standalone program to a Mac from a .NET platform.我需要估计将独立程序从 .NET 平台移植到 Mac。 I have all the source code which is in C++ and is both code I wrote and a modified version of GLUT/GLUI because the program uses OpenGL and GLUT/GLUI as a UI.我拥有 C++ 中的所有源代码,既是我编写的代码,也是 GLUT/GLUI 的修改版本,因为该程序使用 OpenGL 和 GLUT/GLUI 作为 UI。

I don't think the C++ code will be a problem or the OpenGL environment, please tell me if you think it will be.我认为 C++ 代码或 OpenGL 环境不会有问题,如果您认为会,请告诉我。 In .NET, I use OpenGL32.DLL and deploy it with my app.在 .NET 中,我使用 OpenGL32.DLL 并将其与我的应用程序一起部署。 I need to find out how this is done for a Mac?我需要了解 Mac 是如何做到的?

I really need to know what the current deployment method is for Mac's these days and how hard it will be for me to write for it.我真的需要知道现在 Mac 的当前部署方法是什么,以及我为它编写代码有多难。 For .NET, I use Visual Studio for the application development and deployment, I make a new VS project to build the deployable MS installer.对于 .NET,我使用 Visual Studio 进行应用程序开发和部署,我创建了一个新的 VS 项目来构建可部署的 MS 安装程序。

The deployment process also allows things like placing a desktop shortcut, associate a unique icon with the program ... What deployment options can one select on a Mac?部署过程还允许诸如放置桌面快捷方式、将唯一图标与程序相关联……在 Mac 上可以选择哪些部署选项? What do you think the biggest obstacles will be?你认为最大的障碍是什么?

There's no .NET framework calls within the code.代码中没有 .NET 框架调用。 The deployment phase produces a .NET assembly with all the security features.部署阶段生成具有所有安全功能的 .NET 程序集。 I think that is the main relationship with .NET since it is straight C++ not C#.我认为这是与 .NET 的主要关系,因为它是直接的 C++ 而不是 C#。

Development should be rather straight-forward.开发应该是相当直接的。 You'll be able to do OpenGL/GLUT/etc... through the Cocoa framework.您将能够通过 Cocoa 框架执行 OpenGL/GLUT/等操作。 Look at this example from Apple to see how it is done in code.看看这个来自 Apple 的例子,看看它是如何在代码中完成的。

As for development tools, you will be able to use Xcode (which is free with the Mac).至于开发工具,您将能够使用 Xcode(Mac 可免费使用)。 You can develop in C++ and compile with GCC.您可以使用 C++ 进行开发并使用 GCC 进行编译。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM