首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

adobe creative suite extension builder扩张安装地址及调试方法

2012-11-18 
adobe creative suite extension builder扩展安装地址及调试方法1、通过zxp安装包安装的目录地址C:\Program

adobe creative suite extension builder扩展安装地址及调试方法
1、通过zxp安装包安装的目录地址
C:\Program Files\Common Files\Adobe\CS6ServiceManager\extensions
2、在flash builder中运行的临时地址
C:\Users\davidhuang\AppData\Roaming\Adobe\CS6ServiceManager\extensions

临时LOG存放目录(win7)
Application logs

The Adobe Creative Suite extensibility infrastructure creates a log file for each of the applications running extensions. These files provide useful debug information for extension developers. The log files are generated in the platform’s temp folder, and named csxs2-HostID.log; for example, csxs2-ILST.log for an extension running in Illustrator.
These logs are located at these platform-specific locations:
In Windows XP: C:\Documents and Settings\user\Local Settings\Temp
In Windows Vista: C:\Users\user\Locale\Temp
In Mac OS X: /Users/user/Library/Logs/CSXS
win7:
C:\Users\davidhuang\AppData\Local\Temp\csxs3-IDSN.log\(indesign的记录)


File.applicationDirectory.resolvePath("assets/jquery-1.7.2.min.js");:
对应路径:
C:\Program Files\Common Files\Adobe\CS6ServiceManager\StageManager\Debug\assets\jquery-1.7.2.min.js
File.applicationStorageDirectory.resolvePath("assets/jquery-1.7.2.min.js");
对应路径:C:\Users\davidhuang\AppData\Roaming\StageManager.BD092818F67280F4B42B04877600987F0111B594.1\Local Store\assets\jquery-1.7.2.min.js

由于api生成的路径跟实际的目录不一致,因此需要手动修改路径才能获取到真实的路径。

private function copyFile():void{var file:File = File.applicationDirectory;var path:String = file.nativePath;var extendPath:String = path.substring(0,path.indexOf("StageManager"));while(extendPath.indexOf("\") != -1){extendPath = extendPath.replace("\","\/");}var extendFile:File = new File();extendFile.url = "file:///" + extendPath + "/extensions/com.example.HelloWorldZxp/assets/jquery-1.7.2.min.js";Alert.show(extendFile.url);var targetFile:File = File.desktopDirectory.resolvePath("jquery-1.7.2.min.js");extendFile.copyTo(targetFile,true);Alert.show("copy");}


运行在indesign中的扩展如何输出Log记录?
首先安装LogBook_1.4.0.1_alpha.air、添加LocalConnectionTarget.swc、CIM_logging_1.3.swc
下载地址
https://code.google.com/p/cimlogbook/downloads/list
说明:在indesgin中只能选择运行方式而不能调试方式,调试方式会提示debugger timeout。
import cim.fx.logging.targets.*;import cim.fx.logging.targets.*;import cim.fx.logging.targets.LocalConnectionTarget;import com.adobe.csawlib.indesign.InDesign;import com.adobe.csxs.core.CSInterface;import flash.filesystem.File;import mx.controls.Alert;import mx.logging.ILogger;import mx.logging.LogEventLevel;import mx.logging.LogLogger;public function testLog():void{var loggingTarget:LocalConnectionTarget = new LocalConnectionTarget("_test");loggingTarget.filters=["*"];loggingTarget.level = LogEventLevel.ALL;//记录的LOG级别。若为error级别则不会记录csxs的debug和info的记录。loggingTarget.includeDate = true;loggingTarget.includeTime = true;loggingTarget.includeCategory = true;loggingTarget.includeLevel = true;var logger:ILogger = new LogLogger("LOGTEST");//参数是类别。自定义字符串。loggingTarget.addLogger(logger);//以下内容会根据loggingTarget.level而过滤。若是error则只显示error及fatal的loglogger.debug("debug");logger.error("error");logger.warn("warn");logger.info("info");logger.log(LogEventLevel.INFO,"loginfo");logger.fatal("fatal");}


参考:
http://cssdk.host.adobe.com/sdk/1.5/docs/WebHelp/suitesdk.htm
LogBook logs

You can use the LogBook application to track logging messages sent between the various platform components. To use this application for logging:
Include this code in your application main MXML file so LogBook can listen to and display the logging information traced by your extension:
var loggingTarget:LocalConnectionTarget = new LocalConnectionTarget("_test");
loggingTarget.filters=["*"];
loggingTarget.level = LogEventLevel.ALL;
loggingTarget.includeDate = true;
loggingTarget.includeTime = true;
loggingTarget.includeCategory = true;
loggingTarget.includeLevel = true;
logger = Log.getLogger(this.className);
logger.info("my message");
Go to http://code.google.com/p/cimlogbook/downloads/list and download LogBook-1.3.air
Install the AIR application and start it.
Enter the local connection name, as passed into the constructor of LocalConnectionTarget. In the example, this is '_test'.
Start the host application and open your extension. You should see log messages in LogBook.
To listen for internal messages, set the local connection name in logbook to '_csxs2'

热点排行