`

[转载][心得] Alchemy环境配置详细说明

阅读更多
http://bbs.9ria.com/viewthread.php?tid=71368&extra=page%3D1%26amp;orderby%3Ddateline%26amp;filter%3D86400

本帖最后由 rison 于 2010-12-29 21:43 编辑


官方教程地址:
http://labs.adobe.com/wiki/index.php/Alchemy:Documentation:Getting_Started#Steps_2

因为不熟悉Cygwin,配的过程简直是折磨.现在把各步的说明都写详细点,希望有帮助.

Step 1 Download and install Cygwin. Make sure to install the following packages:Perl,zip,gcc / g++
下载安装Cygwin,安装 Perl,zip,gcc/g++ package.
在这里下安装文件:http://www.cygwin.com/setup.exe
之后一路默认到选package的地方,注意几个地方:
一是位置,zip包在Archive下,gcc / g++ 在Devel下,Perl全要下.
二是Perl那个在文件外面点成install就可以了,不用展开来一个个选中了.如图:

三是选中的项目前面有个x,不要选反了,src那栏不用选中,如图:


Step 2 Download and install Java.
Step 3 Make sure to restart the Cygwin terminal after installing Java.
这个没什么好说的,一般都有Java环境吧.

Step 4 Download and install the Flex SDK, and add the $FLEX_HOME/bin directory to your Cygwin environment's path (within ~/.bashrc) (See below for an example).

下载Flex SDK,添加Flex到Cygwin环境变量,进入Cygwin安装目录\etc下,打开profile,修改PATH:
PATH=/cygdrive/d/as3/flex_sdk_3.4/bin:/usr/local/bin:/usr/bin:/bin:$PATH
复制代码
本人flex_sdk_3.4放在D盘as3目录下.

Step 5 Download the Alchemy Package for your system from the pre-release site. For this example, we will assume that Windows is being used.
下载Alchemy包,Adobe官网最神奇的是总能让你找不到想下载的东西,上面的Java,Cygwin有链接,这里的Alchemy居然没有.
http://labs.adobe.com/downloads/alchemy.html
window下开发,下最下面这个:Download the Alchemy Toolkit for Cygwin on Windows (ZIP, 37.6 MB)

Step 6 Unzip the package and copy the alchemy folder to you system. We will refer to this path as $ALCHEMY_HOME
Step 7 Open a Cygwin terminal and change to the $ALCHEMY_HOME/ directory.
Step 8 Run the $ALCHEMY_HOME/config script

将Alchemy解压到比如c:\alchemy下,打开Cygwin,执行
cd /cygdriver/c/alchemy/
复制代码
切换到alchemy目录下,执行
./config
复制代码
Step 9 Open alchemy_setup for editing and add the path to the ADL executable (included in the Flex SDK):
Make sure to uncomment this line, and that it contains the path to ADL.exe on your system.

打开alchemy目录下的alchemy_setup,取消adl设置这行前的#注释,变成这样:
export ADL=cygdrive/d/as3/flex_sdk_3.4/bin/adl.exe
复制代码
Step 10 Open your bash setup script to edit. This can usually be found in the ~/.bashrc file.
Step 11 Edit the the .bashrc script so that alchemy-setup is run when the script is run:
Step 12 Add $ALCHEMY_HOME/achacks to your path.
Step 13 Save the file, and restart your cygwin terminal.

打开Cygwin\etc下bash.bashrc文件,在最下面添加这三行,然后关闭Cygwin重新打开,本人alchemy放在D盘根目录下:
source /cygdrive/d/alchemy/alchemy-setup
PATH=$ALCHEMY_HOME/achacks:/cygdrive/d/as3/flex_sdk_3.4/bin:$PATH
export PATH
复制代码
Step 14 Change to the $ALCHEMY_HOME/bin directory, and run the following command:ln -s llvm-stub llvm-stub.exe
执行
cd /cygdriver/c/alchemy/bin
复制代码
切换到该目录,执行
ln -s llvm-stub llvm-stub.exe
复制代码
这个操作以后编译不用再执行.

Step 15 Change to the $ALCHEMY_HOME/samples/stringecho directory
Step 16 Type the following command in the terminal

用自带例子来试下,执行
cd $ALCHEMY_HOME/samples/stringecho/
复制代码
切换到例子目录,
执行
alc-on; which gcc
复制代码
可以看到被使用的gcc的程序位置

Step 17 Enter the following command to compile the c program into a SWC:
最后一步,将例子里的c程序转换成flash项目用的swc组件,执行
gcc stringecho.c -O3 -Wall -swc -o stringecho.swc
复制代码
看到这两行是正常的:
$ gcc stringecho.c -O3 -Wall -swc -o stringecho.swc
WARNING: While resolving call to function 'main' arguments were dropped!
复制代码
结果还有这个:
[Compiler] Error #1063: Unable to open file: /cygdrive/c/alchemy/flashlibs/global.abc.
[Compiler] Error #1063: Unable to open file: /cygdrive/c/alchemy/flashlibs/playerglobal.abc.
复制代码
生成的swc也明显不对才几k,查了下还要改个地方:
http://forums.adobe.com/thread/201580
打开\alchemy\achacks下hacks.pl
if(`uname` =~ /CYGWIN/)
复制代码
改成
if (`/bin/uname` =~ /CYGWIN/)
复制代码
再执行刚才的gcc那行,终于可以了.
分享到:
评论

相关推荐

    alchemy一键安装版本

    玩炼金技术人有福气了,一键安装就可以直接使用的 alchemy 环境。

    Alchemy3D——Flash3D引擎

    Alchemy3D——Flash3D引擎

    全图alchemy安装说明

    Alchemy是Adobe的一个实验项目,其目的是可以让C,C++的源代码编译成能够运行在开源的Adobe Actionscript VM2虚拟机上的技术。这项技术的目的是为了让大家可以利用数量众多的C,C++现成代码.

    Alchemy Eye PRO v11.5.zip

    Alchemy Eye是一个专门设计用来监控从您电脑连线的网络上其它主机状况的软件,网管人员可以藉由这个简单实用的工具随时监控远端的主机是否仍然正常的运作,而不用亲自坐在主机面前操作,这项功能不仅可以有效的取代...

    Laravel开发-alchemy-api

    Laravel开发-alchemy-api 用于炼金术的Laravel包装。

    马尔可夫逻辑网络工具包alchemy

    马尔可夫逻辑网络工具包alchemy,感兴趣的可以相互交流一下

    shineMP3_alchemy

    编辑-》首选参数-》actionscript-》actionscript 3.0设置-》库路径-》浏览到swc文件,然后选择那个shineMP3_alchemy.swc 另外,在“发布设置”的flash选项里,也要勾选“发布swc” 不需要通过后台或者fms,直接在...

    手机游戏 alchemy380全攻略

    手机游戏 alchemy380全攻略 在原有的360基础上,将新增添的20中已经重点标注粗来了喔~ 相信会有帮助滴~

    alchemy-annotations-1.4.zip

    alchemy-annotations.zip,炼金术收藏的一部分。

    Alchemy

    DOS时代的经典图像格式转换软件,命令提示符方式运行,适合批处理。特别收藏!

    小炼金术-Little-Alchemy 1.1.1

    软件名称:小炼金术:Little Alchemy APK名称:com.sometimeswefly.littlealchemy 最新版本:1.1.1 支持ROM:4.0及更高版本 界面语言:英文软件 软件大小:3.99 M 开发者:Recloak 小炼金术 Little Alchemy是一款...

    RMI_Alchemy_Processors_AutoBoot_Boot_Loader_User's_Guide

    RMI Alchemy™ Processors AutoBoot Boot Loader User’s Guide

    Flash页游未来新技术:Adobe Alchemy

    Flash页游未来新技术:Adobe Alchemy

    马尔科夫逻辑网系统alchemy

    这是一个washington大学开发的MLN工具包,非常好用

    Alchemy Cygwin 最新版 1/2

    [1/2]共包含2个部分,此为第1部分 ...包含使用Alchemy所需的: Perl zip gcc / g++ 版本 setup-version: 2.697 如需下载其他内容,下载镜像请选择: http://ftp.jaist.ac.jp 会自动生成目录,已下载的内容会跳过: ...

    Alchemy Network Inventory v4.8

    可以监测网络软件和硬件设备,并为网络管理员作出识别报告,让网络管理员知道,什么应用程序是被在网络中的计算机所允许安装的,也将会显示系统、软件和磁盘错误的讯息出来,另外还有界面精灵和自述文件都包含在此...

    alchemy-1.1.5.zip

    gae-oauth-tokenstore.zip,persistent spring的oauth2 tokenstore for google app engine persistent spring的oauth2 tokenstore for google app engine

    flash alchemy api 翻译

    adobe alchemy官方api的中文翻译文档

    创新SoundBlaster系列声卡ALchemy炼金术辅助驱动 v1.43.28 官方最新版

    创新炼金术alchemy驱动是一款实用的声卡驱动程序,适合有创新SoundBlaster系列声卡ALchemy炼金术的用户来使用,可以...使用说明炼金术alchemy是为用户带来声卡驱动效果的程序,让你能够使用声卡进行畅快的,欢迎下载体验

    Alchemy Eye Pro v8.75 英文版

    用于连续监视网络服务器有效性和性能的系统管理工具,它能在网络发生故障而未严重到无法控制时通过手机或呼机向管理员发送警报,这有助于保护公司数据和减少可能的网络故障,避免为其付出高的代价,还拥有强大的Log...

Global site tag (gtag.js) - Google Analytics