Rel*_*lla 7 c++ linux adobe boost asl
所以我们花了几天时间在我们的团队中,包括我在内的2个人(意思是我们的努力不像你的那么专业),CloudObserver试图用ASL实现这一目标.
我们已经了解了如何在Windows和Mac OS上编译ASL.
我们已经在ASL上创建了一些与Mac OS X和Windows完美配合的视觉/图形GUI 简单 教程,因此我们已经看到Adobe Source Libraries可以创建至少简单的UI和对话框.
比我们开始尝试使它在Linux上工作.
我们已经开始在linux上编译ASL,首先修复过时的asl_1.0.43_net_setup.sh.这里的代码非常简洁:
#!/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
Run Code Online (Sandbox Code Playgroud)
所以我们要编译libasl_dev.a.可悲的是只有它.这对我们来说毫无用处,因为我们想拥有一个GUI,而不仅仅是Adam读者.
因此我们需要在Windows上对libasl_widgets.dll进行一些模拟 - libasl_widgets_dev.a.我引用ASL/platform_release/jamroot.jam
尽管ASL确实如此,但APL并不支持gcc cygwin.只有支持的APL工具集是msvc和darwin
所以adobe认为它确实支持Linux.那只是悲伤!方式2伤心!所以我们找到了任务代码项目.
它的日期是2006年,提升了1.33.1,所以很难过.在这里也很难过
特派团使用的外部图书馆保存在这里.
这使它们保持在我们的构建中,这意味着我们不必拥有任何神奇的构建脚本/规则来安装prereq.
这意味着它没有任何单独的库构建文件 - 库被合并到项目中.但是所有项目都是通过bjam编译的,在项目内部,Boost,ASL和其他库被细分为项目.这意味着每个子项目按顺序编译并编译成可执行文件或编译到库中.
但是我们从ASL真正需要的只是简单的GUI,以满足不以GUI为中心的小型跨平台开源项目的简单需求.我们所需要的只是一个按钮,一个刻度(又名滑块,也就是轨迹栏)和一个文本输入场.以及一些未来发展的规模选择.所以我们想 - 让我们尽可能地从任务代码项目中获取ASL.
我们首先尝试了一些现代的Ubuntu 11和11以及我们每天使用的OpenSuse(从这里发布的Mono for VMware ).但它经常因大量错误而失败.所以我们认为 - 让我们更早地编译它,更适合项目时代的操作系统.我们从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();
Run Code Online (Sandbox Code Playgroud)
我们有Missioncode用Widgets编译ASL.小部件完全是由任务代码augthor创建的,所以没有任何保证,如果它工作..但我们有完整的任务代码主干编译(也称为missionPhoto的应用程序)和应用程序工作得很好.
我们尝试使用完整的ASL编译我们的代码,但似乎我们在窗口上的ASL api不适用于我们在Windows上的ASL ......或多或少都没有.=(
但是仍然有希望你们中任何一位拥有丰富经验的SO用户都会关注在MissionCode和当前ASL中拥有的ASL,并为我们所有人提供工作ASL 1.0.43 for linux.
看来当前版本的 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 行),但我认为这项工作不会太容易了。
无论如何,祝你好运!:)