Alchemy環境的搭建

2022-02-05 15:12:53 字數 2127 閱讀 5282

使用alchemy,可以用c/c++開發flash庫,這樣做的好處:

(1)高效能。比as3效能高,但比c/c++要低。adobe承諾下個版本的alchemy可以達到c/c++效能的80%。拭目以待吧。

(2)同乙份**基礎可以用於多個專案,非flash專案也能夠用;

(3)不用操心加密和混淆,破解難度比用as3寫的要大。

1. cygwin

a) archive---------select 『zip』

b) devel-----------select 『gcc-g++』

c) perl--------------choose 『install』

2. jdk

3. flex sdk 3.2

4. alchemy toolkit

5. copy 『flex builder 3\sdks\3.2.0\bin』 to 『c:\flex\bin』

6. edit 『c:\cygwin\etc\profile』

source /cygdrive/c/alchemy/alchemy-setup

path=/usr/local/bin:/usr/bin:/bin:/usr/x11r6/bin:/cygdrive/c/alchemy/achacks:/cygdrive/c/flex/bin:$path

7. open 『cygwin』, input 』cd c:/alchemy』

8. input 『./config』

9. input 『source /cygwin/c/alchemy/alchemy-setup』

10. input 『alc-on』

11. close 『cygwin』

12. (optional) edit 『c:\alchemy\alchemy-setup』

change

『#export adl=/path/to/fyou/bin/adl (or adl.exe)』

to『export adl=/cygdrive/c/flex/bin/adl.exe』

13. (optional) edit 『c:\cygwin\etc\bash.bashrc』

add『source /cygdrive/c/alchemy/alchemy-setup

path=$alchemy_home/achacks:/cygdrive/c/flex/bin:$path

export path』

14. edit 『c:\alchemy\achacks\hacks.pl』

change

『if (『uname』=~/cygwin/)』

to『if (『/bin/uname』=~/cygwin/)』

15. edit 『c:\cygwin\cygwin.bat』

『@echo off

c:set cygwin=tty notitle glob

setpath=%path%;c:\cygwin\bin;c:\cygwin\sbin;c:\cygwin\usr\bin;c:\cygwin\usr\sbin;c:\cygwin\usr\local\bin

set ld_library_path=c:\cygwin\lib;c:\cygwin\usr\lib;c:\cygwin\usr\local\lib

chdir c:\cygwin\bin

bash –login -i』

16. open 『cygwin』, input 『cd /cygdrive/c/alchemy/samples/stringecho/』

17. input 『alc-on』

18. input 『gcc stringecho.c –o3 –wall –swc –o stringecho.swc』

19. flex use:

var loader:clibinit = new clibinit;

var lib:object = loader.init();

trace(lib.echo(「foo」));

如果提示找不到 llvm-stub.exe,進入alchemy的bin目錄,ln一下:

ln -s llvm-stub llvm-stub.exe

LAMP環境搭建 php環境搭建

yum groupinstall development tools y yum groupinstall desktop platform development y yum install cmake pcre devel ncurses devel openssl devel libcurl ...

環境搭建 二 Python環境搭建

工欲善其事,必先利其器 要想玩轉python,我們首先需要搭建一套可使用且方便的環境。對於初學者,笨飯糰建議使用 anaconda anaconda 簡介anaconda是python的乙個科學計算發行版,內建了數百個python經常會使用的庫,包括做機器學習或資料探勘的庫。anaconda提供了乙...

環境 lamp環境搭建

以下命令全部使用root執行,如果不用root記得sudo apt update 更新一下可用軟體包列表 apt upgrade 更新已安裝的軟體包 apt install apache2 安裝apache2 systemctl start apache2 啟動apache apt install ...