原始文献 / 论坛帖 / Re: wxWidgets 2.9.0

Re: wxWidgets 2.9.0

Bitcointalk · 2010-02-27 21:22:53 UTC

AuthorSatoshi Nakamoto
TitleRe: wxWidgets 2.9.0
Date2010-02-27 21:22:53 UTC
ForumBitcointalk · 原文

引用 Cdecker(February 27, 2010, 05:09:59 PM)(https://bitcointalk.org/index.php?topic=65.msg569#msg569):

看了下 2.8.10 的源码,那个版本好像也支持 unicode。

在 Windows 世界里,"unicode" 指的是 UTF-16(wchar)。

2.8 有两种构建变体:ANSI 和 UTF-16(unicode)。UTF-16 版本就是 Debian 包里那个标着 "unicode" 的版本。我认为论坛里描述的构建问题,根源就是 2.8 和它那个只标 "unicode" 的 UTF-16 构建。我们之前用的是 2.8 ANSI,为的是将来能直接上 UTF-8,跳过 UTF-16 这个坑。我们没法用 UTF-16 编译。

2.9 只有一个版本:UTF-8。在 Windows 上我们把代码页设为 UTF-8,所以所有平台上我们的代码都是 UTF-8,wxWidgets 跟我们交互也用 UTF-8。在 Linux 上我估计代码页本来就是 UTF-8。统一用 2.9 就避开了 2.8 的多构建混乱,而且我们做 UTF-8 国际化也需要 2.9。

一定要读 build-unix.txt,按里面给的 configure 参数来配置 wxWidgets。

好奇问下,为什么提供 wxWidgets 2.9.0 会"无比困难"?如果是对用户而言,那正是我们静态链接它的原因。

很遗憾我们需要这么多庞大的依赖,但每个都是必需的。好在 Debian/Ubuntu 上除了 wxWidgets,其他都有现成的包。迟早他们会提供 2.9 的包。

英文原文

Quote from: Cdecker on February 27, 2010, 05:09:59 PM(https://bitcointalk.org/index.php?topic=65.msg569#msg569):
> Looking through the source of 2.8.10 it appears that unicode is possible with that version too.
>
In the Windows world, "unicode" means UTF-16 (wchar).

2.8 has two build variations, ANSI and UTF-16 (unicode).  The UTF-16 version is the "unicode" version provided in the Debian package.  I believe 2.8 and its UTF-16 build labelled simply "unicode" has been the source of build problems described in the forum.  We were previously using 2.8 ANSI in anticipation of getting to UTF-8 without going through UTF-16 hell.  We cannot compile with UTF-16.

2.9 has only one version, UTF-8.  On Windows, we set the codepage to UTF-8, so on all platforms our code is UTF-8 and wxWidgets interfaces with us in UTF-8.  On Linux I assume the codepage is already UTF-8.  By standardizing on 2.9 we avoid the multi-build confusion of 2.8, and we need 2.9 for UTF-8 internationalization.

Make sure you read build-unix.txt and configure wxWidgets using the configure parameters given.

Curious, why is it incredibly hard to provide wxWidgets 2.9.0?  If you mean for users, that's why we static link it.

It's unfortunate that we require so many big dependencies, but we need them all.  At least on Debian/Ubuntu, all but wxWidgets are available as packages.  Eventually they'll provide a 2.9 package.