如何在linux上编译ASL(基于boost的Adobe C gui库)?
|
介绍 所以我们花了几天的时间与我们所有的团队组成,其中包括我在内的2个人(意思是我们的努力不像你的那么专业),在CloudObserver的比赛中用ASL来实现. 我们发现了how to compile ASL on windows and Mac OS. 我们在ASL上创建了一些与Mac OS X和Windows完美配合的视觉/图形GUI simple tutorials,因此我们已经看到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
所以我们要编译libasl_dev.a.可悲的是只有它.这对我们来说毫无用处,因为我们想要have a GUI,而不仅仅是Adam读者. 因此我们需要在Windows上对libasl_widgets.dll进行一些模拟 – libasl_widgets_dev.a.我引用ASL / platform_release / jamroot.jam
所以adobe认为它确实支持Linux.那只是伤心!方式2伤心!所以我们找到了missioncode project. 它的日期是2006年,并且提升了1.33.1,所以很难过.在here也很伤心
这意味着它没有任何单独的库构建文件 – 库被合并到项目中.但是所有项目都是通过bjam编译的,在项目内部,Boost,ASL和其他库都是subdivided into projects.这意味着每个子项目按顺序编译并编译成可执行文件或编译到库中. 但是,ASL真正需要的只是简单的GUI,不需要以GUI为中心的小型跨平台开源项目.我们所需要的只是一个按钮,一个比例(又名滑块,又名轨迹栏)和一个文本输入场.以及一些未来发展的规模选择.所以我们认为 – 让我们尽可能地从任务代码项目中获取ASL. 我们首先尝试了一些现代的Ubuntu 11和11以及我们每天使用的OpenSuse(从here发布的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();
我们有Missioncode用Widgets编译ASL.小部件完全是由任务代码augthor创建的,所以没有任何保证,如果它工作..但我们有完整的任务代码主干编译(也称为missionPhoto的应用程序)和应用程序工作得很好. 我们尝试使用完整的ASL编译我们的代码,但似乎我们在窗口上的ASL api不能在我们在Windows上运行的ASL上工作……或多或少都没有.=( 不是结束 但是仍然有希望你们中任何一位拥有丰富经验的SO用户都会看到在MissionCode和当前ASL中拥有的ASL,并且会为我们所有人提供适用于Linux的ASL 1.0.43. 解决方法似乎当前版本的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行,但我不认为这项工作会太容易了 好吧,好运!(编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 我甚至需要与Linux交换分区吗?
- linux – 在Ubuntu 12.04上重新安装Apache Tomcat7
- linux – 尽管处理结果和grep,如何在find中打印文件名
- linux – ntpdate -d服务器掉线Strata太高了
- linux – 什么是“内存页面输出率”
- linux – 如何在bash中使用杀死SIGUSR2?
- redhat – Linux:如何将参数传递给`service foo start`(在
- 使用Linux和Windows时,最好的git配置是什么?
- linux – ERROR:ld.so:对象LD_PRELOAD不能预加载:被忽略
- 如何将gedit配置为git core.editor?
