7

介绍

因此,我们在CloudObserver与包括我在内的 2 个人组成的所有团队一起度过了几天(这意味着我们的努力不如您的专业),试图通过ASL实现这一目标。

我们已经了解了如何在 Windows 和 Mac OS 上编译 ASL。

我们已经创建了一些关于 ASL 的可视/图形 GUI简单 教程,它们与 Mac OS X 和 Windows 完美配合,因此我们已经看到 Adob​​e Source Libraries 至少可以创建简单的 UI 和对话框。

比我们开始尝试让它在 linux 上工作。

我们首先修复过时的asl_1.0.43_net_setup.sh ,开始在 linux 上编译 ASL 。我们的代码很简单:

#!/bin/bash

ASL_DISTRO_NAME=asl_1.0.43.tgz
ASL_NAME=source_release
APL_DISTRO_NAME=apl_1.0.43.tgz
APL_VERSION=1.0.43
APL_NAME=platform_release
ASL_DISTRO_SITE=surfnet.dl.sourceforge.net
BOOST_NAME=boost_1_44_0
BOOST_VERSION=1.44.0
BOOST_DISTRO_NAME="$BOOST_NAME".tar.gz
#-L protects against redirects
CURL_CMD=curl\ -L 
INTEL_TBB_NAME=tbb30_018oss
INTEL_TBB_DISTRO_NAME="$INTEL_TBB_NAME"_src.tgz

# Run a command, and echo before doing so. Also checks the exit
# status and quits if there was an error.
#
# WARNING : Does *not* work when the command uses the redirection operator (>)
#
echo_run ()
{
    echo "$@"
    "$@"
    r=$?
    if test $r -ne 0 ; then
        exit $r
    fi
}

test_path()
{
    hash $1 1>/dev/null 2>/dev/null
}

WD=`pwd`
MACHINE=`uname`
HERE=`dirname $0`

cd $HERE

if [ "$1" != "" ]; then
    ASL_DISTRO_SITE="$1"
fi
#http://surfnet.dl.sourceforge.net/project/adobe-source/adobe-source/1.0.43/asl_1.0.43.tgz
if [ ! -e $ASL_DISTRO_NAME ]; then
   echo_run ${CURL_CMD} http://$ASL_DISTRO_SITE/project/adobe-source/adobe-source/$APL_VERSION/$ASL_DISTRO_NAME -o $ASL_DISTRO_NAME
fi

if [ ! -e $APL_DISTRO_NAME ]; then
   echo_run ${CURL_CMD} http://$ASL_DISTRO_SITE/project/adobe-source/adobe-source/$APL_VERSION/$APL_DISTRO_NAME -o $APL_DISTRO_NAME
fi

if [ ! -e $BOOST_DISTRO_NAME ]; then
    echo_run ${CURL_CMD} http://$ASL_DISTRO_SITE/project/boost/boost/$BOOST_VERSION/$BOOST_DISTRO_NAME -o $BOOST_DISTRO_NAME
fi

if [ ! -e $INTEL_TBB_DISTRO_NAME ]; then
    echo_run ${CURL_CMD} http://www.threadingbuildingblocks.org/uploads/78/154/3.0/$INTEL_TBB_DISTRO_NAME -o $INTEL_TBB_DISTRO_NAME
fi

if [ ! -d adobe_root ]; then
    echo_run mkdir adobe_root
fi

if [ ! -d adobe_root/adobe_source_libraries ]; then
   echo_run tar -xzf $ASL_DISTRO_NAME
   echo_run mv $ASL_NAME adobe_root/adobe_source_libraries
fi

if [ ! -d adobe_root/adobe_platform_libraries ]; then
   echo_run tar -xzf $APL_DISTRO_NAME
   echo_run mv $APL_NAME adobe_root/adobe_platform_libraries
fi

if [ ! -e adobe_root/boost_libraries/INSTALL ]; then
    # move the boost distro into place
    echo_run tar -xzf $BOOST_DISTRO_NAME
    echo_run rm -rf adobe_root/boost_libraries
    echo_run mv $BOOST_NAME adobe_root/boost_libraries
fi

if [ ! -e adobe_root/intel_tbb_libraries/README ]; then
    # move the intel_tbb distro into place
    echo_run tar -xzf $INTEL_TBB_DISTRO_NAME
    echo_run rm -rf adobe_root/intel_tbb_libraries
    echo_run mv $INTEL_TBB_NAME adobe_root/intel_tbb_libraries
fi

cd $HERE
echo_run adobe_root/adobe_source_libraries/tools/patch_boost.sh

if [[ $MACHINE == "Darwin" ]]
then
    cd adobe_root/adobe_platform_libraries
else
    cd adobe_root/adobe_source_libraries
fi

echo_run ../adobe_source_libraries/tools/build.sh

echo Done!

exit 0

于是我们把 libasl_dev.a 编译好了。可惜只有它。这对我们来说毫无用处,因为我们想要一个 GUI,而不仅仅是 Adam 阅读器。

所以我们需要一些类似于 Windows 上的 libasl_widgets.dll - libasl_widgets_dev.a。我引用ASL/platform_release/jamroot.jam

APL 不支持 gcc cygwin,但 ASL 支持。仅支持 APL 的工具集是 msvc 和 darwin

所以 adobe 向我们证明它确实支持 Linux。那只是悲伤!方式 2 伤心!所以我们找到了missioncode项目

它的日期为 2006 年并提升了 1.33.1,所以很伤心。这里也很伤心

任务使用的外部库保存在这里。

这将它们保留在我们的构建中,并且意味着我们不必有任何神奇的构建脚本/规则来安装 prereqs。

这意味着他们没有任何单独的库构建文件 - 库被合并到项目中。但是所有的项目都是通过 bjam 编译的,并且在项目内部 Boost、ASL 和其他库被细分为项目。这意味着每个子项目都按顺序编译并编译成可执行文件或 lib。

但是我们真正需要 ASL 的只是简单的 GUI,以满足不以 GUI 为中心的小型跨平台开源项目的简单需求。我们只需要一个按钮、一个刻度(又名滑块、又名轨迹栏)和一个文本输入字段。以及未来发展的一些规模选择。所以我们想 - 让我们以任何方式从 Missioncode 项目中强制 ASL。

我们首先尝试了一些我们每天使用的现代 Ubuntu 11 和 11 以及 OpenSuse(从这里发布的用于 VMware 的 Mono)。但它经常因大量错误而失败。所以我们想 - 让我们更早地编译它,更适合项目时代的操作系统。我们从 Ubuntu 4 开始,逐个版本升级。它在 6.10 上编译,并进行了一些小修复,例如

diff -crB original/external/adobe/adobe/basic_sheet.hpp modified/external/adobe/adobe/basic_sheet.hpp
*** original/external/adobe/adobe/basic_sheet.hpp   2011-06-25 08:21:48.000000000 +0400
--- modified/external/adobe/adobe/basic_sheet.hpp   2011-06-25 08:24:33.000000000 +0400
***************
*** 13,18 ****
--- 13,19 ----

  #include <deque>
  #include <map>
+ #include <vector>

  #include <adobe/name.hpp>
  #include <adobe/any_regular.hpp>
diff -crB original/external/adobe/source/xstring.cpp modified/external/adobe/source/xstring.cpp
*** original/external/adobe/source/xstring.cpp  2011-06-25 08:21:46.000000000 +0400
--- modified/external/adobe/source/xstring.cpp  2011-06-25 08:24:10.000000000 +0400
***************
*** 331,337 ****
  {
      typedef std::iterator_traits<store_iterator>::difference_type   difference_type;

!     difference_type range_size(boost::size(range));

      if (!range_size) return glossary_m.end();

--- 331,337 ----
  {
      typedef std::iterator_traits<store_iterator>::difference_type   difference_type;

!     difference_type range_size(boost::distance(range));

      if (!range_size) return glossary_m.end();

我们有 Missioncode 用小部件编译 ASL。小部件完全由任务代码 augthor 创建,因此没有任何保证如果他们工作.. 但我们编译了完整的任务代码主干(也是一个名为missionPhoto 的应用程序)并且应用程序运行良好。

我们试图用完整的 ASL 编译我们的代码,但似乎我们在窗口上拥有的 ASL api 在我们在 Windows 上拥有的 ASL 上不起作用......或多或少。=(

不是结束

但是仍然希望你们中的任何一位有丰富经验的亲爱的 SO 用户都可以查看 MissionCode 和当前 ASL 中的 ASL,并为我们所有人提供适用于 linux 的 ASL 1.0.43。

4

1 回答 1

4


当前版本的 apl 似乎不支持为 linux 构建。它在文档中说明: http: //stlab.adobe.com/asl_readme.html#Building_for_Mac.2C_.2ANIX。您也可以在 apl 目录结构中看到它。有 $APL_ROOT/windows 和 $APL_ROOT/macintosh 目录,但没有任何与 linux 相关的目录(例如 gtk、qt 等)
关于“任务代码”项目:他们使用一些旧版本的 adobe 库(它没有分离 asl和 apl 等)。以前版本的 adobe libs 可能支持为 linux 构建(或者任务代码程序员自己为 gtk 添加了支持)。
理论上可以通过实现与 win 和 macos 实现的类似功能来添加对新平台的支持(在当前版本中,每个代码大约 6...8k 行),但我认为这项工作不会太容易了。
无论如何,祝你好运!:)

于 2011-06-29T22:11:14.733 回答