如何生成swc库文件

生成swc库文件的若干方法:

一、建立Flex library project项目

1.建立Flex Library Project项目

2.编写程序文件

3.确认编译无误

4.在项目上点击右键-->flex library build path

--->classes--->选择所要打包的类--->点击OK

即可自动生成需要的swc库文件。

二、ant方式打swc

首先,请修正工程下的build.properties文件,文件如下:

# Window and document title for the documentation

title = ASDocs Test Library

 

# Class-folders you want to search for classes to be included in the docs, seperated by spaces (for example   ../com/ ../net/  )

# to include every .as and .mxml file within your project, just state   ../

domainextensions = ./flex-src

 

# The Location of deployment library on your Computer (PC/Mac) for compiled SWC file

liboutputfolder = bin

liboutputfile = PureMVC_MultiCore.swc

libpath = libs

 

# The Location of the output folder for your generated documents

docsoutputfolder = bin/docs

 

# Home directory for flex sdk 3, change this to build for Mac or PC using # as comment

# FLEX_HOME = C:/Program Files/Adobe/Flex Builder 3/sdks/3.0.0

FLEX_HOME = D:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.0.0

    

# The location of your asdoc.exe, change this to build for Mac or PC using # as comment

#asdoc.exe = C:/Program Files/Adobe/Flex Builder 3/sdks/3.0.0/bin/asdoc.exe

asdoc.exe = D:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.0.0/bin/asdoc.exe

 

需要修正的地方:

 

domainextensions = ./flex-src:这个是你要打包的src路径

liboutputfolder = bin:这个是swc输出的路径

liboutputfile = PureMVC_MultiCore.swc:这个是输出swc的名字

libpath = libs:这个需要打包src用到的类库

docsoutputfolder = bin/docs:这个是asdoc输出的路径

FLEX_HOME = X:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.0.0:你的flex SDK的路径

asdoc.exe = X:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.0.0/bin/asdoc.exe:这个是asdoc的路径

在eclipse中window->preferences选择ant中的Runtime,将D:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.0.0\ant\lib\flexTasks.jar引入 

然后执行build.xml生成SWC

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值