【问题标题】:How to build wxFormBuilder 3.x on Mac如何在 Mac 上构建 wxFormBuilder 3.x
【发布时间】:2013-12-01 02:07:09
【问题描述】:

我已将wxFormBuilder 3.4 beta mac 下载到相应目录。

并打开一个终端,我运行到sh create_build_files4.sh,但控制台向我显示以下错误。

MinSeok-ui-iMac-3:wxFormBuilder MinSeok$ sh create_build_files4.sh
create_build_files4.sh: line 7: wx-config: command not found
create_build_files4.sh: line 66: wx-config: command not found
make: *** ./premake/macosx: No such file or directory.  Stop.
create_build_files4.sh: line 91: ./premake/macosx/bin/release/premake4: No such file or directory
create_build_files4.sh: line 92: ./premake/macosx/bin/release/premake4: No such file or directory
create_build_files4.sh: line 93: ./premake/macosx/bin/release/premake4: No such file or directory
create_build_files4.sh: line 95: ./premake/macosx/bin/release/premake4: No such file or directory

我的环境是 OS X Mountain Lion(也是 Mavericks)。我已经安装了wxPython 版本是2.9.5。

我的问题是什么?...谷歌,永远不要向我显示提示。

提前致谢。

编辑

我安装了 wxWidgets 3.0 并放置了 premake4。我认为这似乎几乎接近解决。 wxFormBuilder 使用 lua 脚本。但我不知道 solution.lua 脚本构建代码。任何提示? 请参阅下面的 shell create_build_files4.sh 脚本。一件事是一定要知道solution.lua的脚本代码。

#!/bin/sh

# Parse command line options
shared=""
arch=""
wxroot=""
wxpath=`wx-config --prefix`

# These works only on wxWidgets 2.8.10+
#wxcharset=`wx-config --query-chartype`
#wxversion=`wx-config --query-version`
for args in "$@"
do
    haveroot=`expr "${args}" : '--wx-root=.*'`
    havearch=`expr "${args}" : '--architecture=.*'`
    haverpath=`expr "${args}" : '--rpath=.*'`
    if ( [ ${args} = "--help" ] || [ ${args} = "-h" ] ); then
            echo "Available options:"
            echo
            echo "--disable-mediactrl       Disable wxMediaCtrl / wxMedia library."
            echo
            echo "--disable-shared          Use static wxWidgets build instead of shared libraries."
            echo
            echo "--disable-unicode         Whether to use an Unicode or an ANSI build."
            echo "                          Ignored in wxWidgets 2.9 and later."
            echo "                          Example: --disable-unicode produces an ANSI build."
            echo "                          Default: Unicode build on all versions."
            #       echo "                          Current: $wxcharset"
            echo
            echo "--wx-root                 Specify the wxWidgets build path,"
            echo "                          useful for wxWidgets builds not installed"
            echo "                          in your system (alternate/custom builds)"
            echo "                          Example: --wx-root=/home/devel/wx/3.0/buildgtk"
            echo "                          Current: $wxpath"
            echo
            echo "--architecture            Specify build architecture (e.g. --architecture=i386)."
            echo "--rpath                   Specify a rpath  (e.g. --rpath=/usr/lib/wxformbuilder)."
            echo
            exit
    elif [ ${args} = "--disable-mediactrl" ]; then
        mediactrl="--disable-mediactrl"
        continue
    elif [ ${args} = "--disable-unicode" ]; then
        wxunicode="--disable-unicode"
        continue
    elif [ ${args} = "--disable-shared" ]; then
        shared="--disable-shared"
        continue
    elif [ ${args} = "--disable-unicode" ]; then
        wxunicode="--disable-unicode"
        continue
    elif ( [ "$haveroot" -gt "0" ] ); then
        wxroot=${args}
        continue
    elif ( [ "$havearch" -gt "0" ] ); then
        arch=${args}
        continue
    elif ( [ "$haverpath" -gt "0" ] ); then
        rpath=${args}
        continue
    fi
done

# Autodetect wxWidgets version
if [ "$wxroot" = "" ]; then
    wxver=`wx-config --release`
else
    wxpath=${wxroot#-*=}
    wxver=`$wxpath/wx-config --release`
fi

wxversion="--wx-version="$wxver

# Autodetect OS
isbsd=`expr "$unamestr" : '.*BSD'`
platform="unknown"
unamestr=$(uname)

if ( [ "$isbsd" -gt "0" ] ); then
    platform="bsd"
elif [ "$unamestr" = "Linux" ]; then
    platform="linux"
elif [ "$unamestr" = "Darwin" ]; then
    platform="macosx"
fi

# Build premake
cd build
make CONFIG=Release -C./premake/$platform

./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch codeblocks
./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch $rpath codelite
./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch $rpath gmake
if [ "$platform" = "macosx" ]; then
   ./premake/$platform/bin/release/premake4 --file=./premake/solution.lua $wxunicode $wxroot $wxversion $mediactrl $shared $arch xcode3
fi

【问题讨论】:

    标签: python wxpython osx-mountain-lion wxformbuilder


    【解决方案1】:

    您需要在您的机器上安装 wx-config。这包含在 wxWidgets 中(FAQ Mac:http://www.wxwidgets.org/docs/faqmac.htm#macplat)。您需要记住,您需要安装 Xcode 才能继续。构建包需要一些时间。

    • 获取 wxWidgets(即 v. 3.0.0 http://www.wxwidgets.org/downloads
    • 解压缩 tar.bz2 并构建它:

      tar -xfvj wxWidgets-3.0.0.tar.bz2

      cd wxWidgets-3.0.0

      ./配置

      制作

      sudo 安装

    • 再次尝试运行 shell 脚本

    【讨论】:

    • 谢谢!但是,我的问题已修改。请检查:)
    • 对我不起作用。能够很好地安装 wxWidgets,之后尝试安装 wxFormBuilder 时仍然出现与 OP 相同的错误。再好不过了。
    【解决方案2】:

    另一种方法是使用稳定版本:wxFormBuilder-3.1 这在 Sourceforge 上以 dmg 的形式提供。我认为这个包不需要前面的步骤。

    【讨论】:

      【解决方案3】:

      正如@melto 所指出的,用于 os x 的稳定发布版本 3.1.70 也可以正常工作。 sourceforge的链接http://sourceforge.net/projects/wxformbuilder/files/wxformbuilder/3.1.70/wxFormBuilder-3.1.dmg/download

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-07-31
        • 1970-01-01
        • 2012-12-17
        • 2012-11-15
        • 1970-01-01
        • 2015-05-22
        相关资源
        最近更新 更多