简体   繁体   English

使用Macports安装SDL 2; X11是依赖项吗?

[英]Installing SDL 2 with Macports; Is X11 a dependency?

I am in the process of installing SDL 2 on Mac OSX 10.9 via macports, and for reference I have been following the official documentation as well as any sdl-specific information I can find. 我正在通过Macports在Mac OSX 10.9上安装SDL 2的过程,作为参考,我一直在关注官方文档以及我所能找到的任何sdl特定信息。

https://guide.macports.org/ is straight-forward, as is: https://guide.macports.org/非常简单,如下所示:

https://guide.macports.org/#using.variants.invoking https://guide.macports.org/#using.variants.invoking

I see that sdl2lib is available... 我看到sdl2lib可用...

libsdl2 has the variants:
universal: Build for multiple architectures
x11: Enable X11 support

but despite having looked through pages at the above links and having searched for documentation for "SDL with X11", I can't seem to find information about whether I need X11 (and/or universal AKA powerpc) support. 但是尽管浏览了以上链接的页面并搜索了“带有X11的SDL”的文档,但似乎无法找到有关是否需要 X11(和/或通用AKA powerpc)支持的信息。 I wouldn't want to install SDL only to find that something is broken or missing. 我不想只安装SDL来发现某些东西损坏或丢失。 Then again, there were some issues with X11 being enabled by default back when Mac OSX 10.1 was new: https://forums.libsdl.org/viewtopic.php?t=2871&sid=52ca72a72c285196dd25fd8619715ae9 再说一次,Mac OSX 10.1新增时,默认情况下会启用X11的问题: https : //forums.libsdl.org/viewtopic.php? t = 2871&sid =52ca72a72c285196dd25fd8619715ae9

(That is another problem: much of the information I discover applies to outdated operating systems.) (这是另一个问题:我发现的许多信息都适用于过时的操作系统。)

Apparently SDL wasn't thread-safe at one point unless you used X11, but this was mentioned when SDL verson 1 was the main version: http://forum.freegamedev.net/viewtopic.php?f=3&t=1078 显然,除非您使用X11,否则SDL在某一点上不是线程安全的,但是在SDL版本1是主要版本时提到了这一点: http : //forum.freegamedev.net/viewtopic.php? f=3&t=1078

How am I meant to proceed (Which flags, if any, are usually chosen?) 我打算如何进行(通常选择哪个标志,如果有的话?)

port install libsdl2 <???>

I would appreciate any help and follow-up warnings for the next stepsinstallation steps. 对于后续安装步骤的任何帮助和后续警告,我们将不胜感激。 Thank you in advance. 先感谢您。

Most people have moved to Homebrew as their package system, but Macports should work just fine. 大多数人已经将Homebrew作为其打包系统,但是Macports应该可以正常工作。

Universal does not mean PowerPC necessarily. 通用不一定意味着PowerPC。 In fact almost no one needs it anymore. 实际上,几乎没有人需要它了。 Universal means a fat binary, which architectures this defines is set in your Macports configuration. 通用表示胖二进制文件,此定义的体系结构是在Macports配置中设置的。

SDL2 should work just fine under Quartz, no need to have X11 - as also makes deployment annoying and difficult as you need to have XQuartz installed. SDL2在Quartz下应该可以正常工作,无需安装X11,因为安装XQuartz会使部署变得烦人且困难。

Also don't be afraid to reinstall SDL2 with other options if you miss something, it shouldn't take to long. 另外,如果您错过了一些东西,也不要害怕用其他选项重新安装SDL2,这不会花很长时间。

TL;DR Just install it without any additional flags unless you discover you need something special. TL; DR只需安装它而无需任何其他标志,除非您发现自己需要特殊的东西。

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

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