lfd 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +22 -0
- data/README.md +43 -0
- data/README.zhCN.md +43 -0
- data/Rakefile +23 -0
- data/lfd.gemspec +27 -0
- data/lib/lfd/app.rb +53 -0
- data/lib/lfd/build.rb +188 -0
- data/lib/lfd/env.rb +92 -0
- data/lib/lfd/init.rb +18 -0
- data/lib/lfd/run.rb +46 -0
- data/lib/lfd/setup.rb +20 -0
- data/lib/lfd_version.rb +1 -1
- data/test/fixture/projects/flash10_flex_proj/.actionScriptProperties +23 -0
- data/test/fixture/projects/flash10_proj/asproj.info +17 -0
- data/test/fixture/projects/flash10_proj/bin/test_as_proj.swf +0 -0
- data/test/fixture/projects/flash10_proj/flash10_proj.as3proj +84 -0
- data/test/fixture/projects/flash10_proj/src/Main.as +13 -0
- data/test/fixture/projects/flash10_proj/tmp_proj/asproj.info +17 -0
- data/test/fixture/projects/flash10_proj/tmp_proj/tmp_proj/asproj.info +6 -0
- data/test/fixture/projects/flash10_swc_proj/asproj.info +16 -0
- data/test/fixture/projects/flash10_swc_proj/bin/test_as_proj.swc/catalog.xml +32 -0
- data/test/fixture/projects/flash10_swc_proj/bin/test_as_proj.swc/library.swf +0 -0
- data/test/fixture/projects/flash10_swc_proj/bin/test_as_proj.swf +0 -0
- data/test/fixture/projects/flash10_swc_proj/flash10_proj.as3proj +84 -0
- data/test/fixture/projects/flash10_swc_proj/src/Main.as +13 -0
- data/test/fixture/projects/flash10_swc_proj/tmp_proj/asproj.info +17 -0
- data/test/fixture/projects/flash10_swc_proj/tmp_proj/tmp_proj/asproj.info +6 -0
- data/test/fixture/projects/flash9_flex_proj/.actionScriptProperties +23 -0
- data/test/fixture/projects/flash9_proj/flash9_proj.as3proj +84 -0
- data/test/fixture/projects/should_fail_proj/should_fail_proj.as3proj +85 -0
- data/test/helper.rb +41 -0
- data/test/tc_building_proj_test.rb +28 -0
- data/test/tc_check_mm_cfg_test.rb +37 -0
- data/test/tc_env_test.rb +23 -0
- data/test/tc_initing_proj_test.rb +27 -0
- data/test/tc_running_proj_test.rb +23 -0
- metadata +38 -1
data/lib/lfd/init.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
module LFD
|
2
|
+
|
3
|
+
module Init
|
4
|
+
|
5
|
+
include FileUtils
|
6
|
+
|
7
|
+
def init(opt={})
|
8
|
+
cp example_config_file, CONFIG_FILE
|
9
|
+
mkdir_p %w(bin lib src tmp)
|
10
|
+
end
|
11
|
+
|
12
|
+
def example_config_file
|
13
|
+
File.expand_path("../../asproj.info.sample", __FILE__)
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/lib/lfd/run.rb
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
module LFD
|
2
|
+
|
3
|
+
module Run
|
4
|
+
|
5
|
+
def run(opt={})
|
6
|
+
check_tracelog_config
|
7
|
+
empty_tracelog
|
8
|
+
info = YAML.load_file(CONFIG_FILE)
|
9
|
+
swf = File.expand_path(info["output"]["file"], FileUtils.pwd)
|
10
|
+
player = fork { exec "#{flash_player_path} #{swf} 2> /dev/null"}
|
11
|
+
tracer = fork { exec "tail", "-f", trace_log_file }
|
12
|
+
Process.detach tracer
|
13
|
+
Process.wait
|
14
|
+
Process.kill "HUP", tracer
|
15
|
+
end
|
16
|
+
|
17
|
+
def check_tracelog_config
|
18
|
+
if File.exist?(mm_cfg)
|
19
|
+
File.open(mm_cfg, 'r+') do |file|
|
20
|
+
cfg = {}
|
21
|
+
file.each do |line|
|
22
|
+
opt = line.split('=')
|
23
|
+
cfg[opt[0]] = opt[1].chomp
|
24
|
+
end
|
25
|
+
cfg["ErrorReportingEnable"]="1"
|
26
|
+
cfg["TraceOutputFileEnable"]="1"
|
27
|
+
str = cfg.inject("") { |s,o| "#{s}#{o[0]}=#{o[1]}\n" }
|
28
|
+
file.rewind
|
29
|
+
file.write str
|
30
|
+
end
|
31
|
+
else
|
32
|
+
File.open(mm_cfg, 'w') do |file|
|
33
|
+
file.puts("ErrorReportingEnable=1\nTraceOutputFileEnable=1")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def empty_tracelog
|
41
|
+
system "echo '' > #{trace_log_file}"
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
data/lib/lfd/setup.rb
ADDED
data/lib/lfd_version.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<actionScriptProperties analytics="false" mainApplicationPath="ChartTest.mxml" projectUUID="c84599c4-9937-49d8-85d3-9a7862cb33fc" version="6">
|
3
|
+
<compiler additionalCompilerArguments="-locale zh_CN" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="10.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
|
4
|
+
<compilerSourcePath>
|
5
|
+
<compilerSourcePathEntry kind="1" linkType="1" path="D:/SvnProject/as_proj_nightly_builder/libraries/ccbu-trunk"/>
|
6
|
+
<compilerSourcePathEntry kind="1" linkType="1" path="D:/SvnProject/as_proj_nightly_builder/libraries/vendor"/>
|
7
|
+
</compilerSourcePath>
|
8
|
+
<libraryPath defaultLinkType="0">
|
9
|
+
<libraryPathEntry kind="4" path="">
|
10
|
+
<excludedEntries>
|
11
|
+
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
|
12
|
+
</excludedEntries>
|
13
|
+
</libraryPathEntry>
|
14
|
+
<libraryPathEntry kind="1" linkType="1" path="libs"/>
|
15
|
+
</libraryPath>
|
16
|
+
<sourceAttachmentPath/>
|
17
|
+
</compiler>
|
18
|
+
<applications>
|
19
|
+
<application path="/ChartEditor/[source path] ccbu-trunk/cn/alibaba/ChartEditor.mxml"/>
|
20
|
+
</applications>
|
21
|
+
<modules/>
|
22
|
+
<buildCSSFiles/>
|
23
|
+
</actionScriptProperties>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: test_as_proj
|
2
|
+
|
3
|
+
target: 10.0
|
4
|
+
|
5
|
+
source:
|
6
|
+
- src
|
7
|
+
- /home/qhwa/working-disk/working/Projects/nightly_builder/libraries/ccbu-trunk/
|
8
|
+
|
9
|
+
library:
|
10
|
+
- lib
|
11
|
+
|
12
|
+
main: src/Main.as
|
13
|
+
|
14
|
+
output:
|
15
|
+
file: bin/test_as_proj.swf
|
16
|
+
width: 800
|
17
|
+
height: 600
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<project>
|
3
|
+
<!-- Output SWF options -->
|
4
|
+
<output>
|
5
|
+
<movie disabled="False" />
|
6
|
+
<movie input="" />
|
7
|
+
<movie path="bin\picgen.swf" />
|
8
|
+
<movie fps="30" />
|
9
|
+
<movie width="800" />
|
10
|
+
<movie height="600" />
|
11
|
+
<movie version="10" />
|
12
|
+
<movie background="#FFFFFF" />
|
13
|
+
</output>
|
14
|
+
<!-- Other classes to be compiled into your SWF -->
|
15
|
+
<classpaths>
|
16
|
+
<class path="src" />
|
17
|
+
<class path="..\..\..\..\libary\Alibaba_CCBU_as_lib\cnued\trunk" />
|
18
|
+
</classpaths>
|
19
|
+
<!-- Build options -->
|
20
|
+
<build>
|
21
|
+
<option accessible="False" />
|
22
|
+
<option allowSourcePathOverlap="False" />
|
23
|
+
<option benchmark="False" />
|
24
|
+
<option es="False" />
|
25
|
+
<option locale="" />
|
26
|
+
<option loadConfig="" />
|
27
|
+
<option optimize="True" />
|
28
|
+
<option showActionScriptWarnings="True" />
|
29
|
+
<option showBindingWarnings="True" />
|
30
|
+
<option showDeprecationWarnings="True" />
|
31
|
+
<option showUnusedTypeSelectorWarnings="True" />
|
32
|
+
<option strict="True" />
|
33
|
+
<option useNetwork="True" />
|
34
|
+
<option useResourceBundleMetadata="True" />
|
35
|
+
<option warnings="True" />
|
36
|
+
<option verboseStackTraces="False" />
|
37
|
+
<option linkReport="" />
|
38
|
+
<option loadExterns="" />
|
39
|
+
<option staticLinkRSL="True" />
|
40
|
+
<option additional="" />
|
41
|
+
<option compilerConstants="" />
|
42
|
+
<option customSDK="" />
|
43
|
+
</build>
|
44
|
+
<!-- SWC Include Libraries -->
|
45
|
+
<includeLibraries>
|
46
|
+
<!-- example: <element path="..." /> -->
|
47
|
+
</includeLibraries>
|
48
|
+
<!-- SWC Libraries -->
|
49
|
+
<libraryPaths>
|
50
|
+
</libraryPaths>
|
51
|
+
<!-- External Libraries -->
|
52
|
+
<externalLibraryPaths>
|
53
|
+
<!-- example: <element path="..." /> -->
|
54
|
+
</externalLibraryPaths>
|
55
|
+
<!-- Runtime Shared Libraries -->
|
56
|
+
<rslPaths>
|
57
|
+
<!-- example: <element path="..." /> -->
|
58
|
+
</rslPaths>
|
59
|
+
<!-- Intrinsic Libraries -->
|
60
|
+
<intrinsics>
|
61
|
+
<!-- example: <element path="..." /> -->
|
62
|
+
</intrinsics>
|
63
|
+
<!-- Assets to embed into the output SWF -->
|
64
|
+
<library>
|
65
|
+
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
|
66
|
+
</library>
|
67
|
+
<!-- Class files to compile (other referenced classes will automatically be included) -->
|
68
|
+
<compileTargets>
|
69
|
+
<compile path="..\..\..\..\libary\Alibaba_CCBU_as_lib\cnued\trunk\cn\alibaba\Main.as" />
|
70
|
+
</compileTargets>
|
71
|
+
<!-- Paths to exclude from the Project Explorer tree -->
|
72
|
+
<hiddenPaths>
|
73
|
+
<!-- example: <hidden path="..." /> -->
|
74
|
+
</hiddenPaths>
|
75
|
+
<!-- Executed before build -->
|
76
|
+
<preBuildCommand />
|
77
|
+
<!-- Executed after build -->
|
78
|
+
<postBuildCommand alwaysRun="False" />
|
79
|
+
<!-- Other project options -->
|
80
|
+
<options>
|
81
|
+
<option showHiddenPaths="False" />
|
82
|
+
<option testMovie="ExternalPlayer" />
|
83
|
+
</options>
|
84
|
+
</project>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: test_as_proj
|
2
|
+
|
3
|
+
target: 10.0
|
4
|
+
|
5
|
+
source:
|
6
|
+
- src
|
7
|
+
- /home/qhwa/working-disk/working/Projects/nightly_builder/libraries/ccbu-trunk/
|
8
|
+
|
9
|
+
library:
|
10
|
+
- lib
|
11
|
+
|
12
|
+
main: src/Main.as
|
13
|
+
|
14
|
+
output:
|
15
|
+
file: bin/test_as_proj.swf
|
16
|
+
width: 800
|
17
|
+
height: 600
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<?xml version="1.0" encoding ="utf-8"?>
|
2
|
+
<swc xmlns="http://www.adobe.com/flash/swccatalog/9">
|
3
|
+
<versions>
|
4
|
+
<swc version="1.2" />
|
5
|
+
<flex version="4.6.0" build="23201" minimumSupportedVersion="3.0.0" />
|
6
|
+
</versions>
|
7
|
+
<features>
|
8
|
+
<feature-script-deps />
|
9
|
+
<feature-files />
|
10
|
+
</features>
|
11
|
+
<libraries>
|
12
|
+
<library path="library.swf">
|
13
|
+
<script name="_62d4d2d36c7854e9cd9915147b23688365683356ef3d01ab76a372a4232d182b_flash_display_Sprite" mod="1401088929467" signatureChecksum="3413407751" >
|
14
|
+
<def id="_62d4d2d36c7854e9cd9915147b23688365683356ef3d01ab76a372a4232d182b_flash_display_Sprite" />
|
15
|
+
<dep id="flash.system:Security" type="e" />
|
16
|
+
<dep id="AS3" type="n" />
|
17
|
+
<dep id="flash.display:Sprite" type="i" />
|
18
|
+
</script>
|
19
|
+
<script name="Main" mod="1337674972000" signatureChecksum="580721651" >
|
20
|
+
<def id="Main" />
|
21
|
+
<dep id="trace" type="e" />
|
22
|
+
<dep id="AS3" type="n" />
|
23
|
+
<dep id="flash.display:Sprite" type="i" />
|
24
|
+
</script>
|
25
|
+
<digests>
|
26
|
+
<digest type="SHA-256" signed="false" value="74be342b75e08f8546696882cd533f760cee9d8389f6e1743c108775d2ddfa31" />
|
27
|
+
</digests>
|
28
|
+
</library>
|
29
|
+
</libraries>
|
30
|
+
<files>
|
31
|
+
</files>
|
32
|
+
</swc>
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<project>
|
3
|
+
<!-- Output SWF options -->
|
4
|
+
<output>
|
5
|
+
<movie disabled="False" />
|
6
|
+
<movie input="" />
|
7
|
+
<movie path="bin\picgen.swf" />
|
8
|
+
<movie fps="30" />
|
9
|
+
<movie width="800" />
|
10
|
+
<movie height="600" />
|
11
|
+
<movie version="10" />
|
12
|
+
<movie background="#FFFFFF" />
|
13
|
+
</output>
|
14
|
+
<!-- Other classes to be compiled into your SWF -->
|
15
|
+
<classpaths>
|
16
|
+
<class path="src" />
|
17
|
+
<class path="..\..\..\..\libary\Alibaba_CCBU_as_lib\cnued\trunk" />
|
18
|
+
</classpaths>
|
19
|
+
<!-- Build options -->
|
20
|
+
<build>
|
21
|
+
<option accessible="False" />
|
22
|
+
<option allowSourcePathOverlap="False" />
|
23
|
+
<option benchmark="False" />
|
24
|
+
<option es="False" />
|
25
|
+
<option locale="" />
|
26
|
+
<option loadConfig="" />
|
27
|
+
<option optimize="True" />
|
28
|
+
<option showActionScriptWarnings="True" />
|
29
|
+
<option showBindingWarnings="True" />
|
30
|
+
<option showDeprecationWarnings="True" />
|
31
|
+
<option showUnusedTypeSelectorWarnings="True" />
|
32
|
+
<option strict="True" />
|
33
|
+
<option useNetwork="True" />
|
34
|
+
<option useResourceBundleMetadata="True" />
|
35
|
+
<option warnings="True" />
|
36
|
+
<option verboseStackTraces="False" />
|
37
|
+
<option linkReport="" />
|
38
|
+
<option loadExterns="" />
|
39
|
+
<option staticLinkRSL="True" />
|
40
|
+
<option additional="" />
|
41
|
+
<option compilerConstants="" />
|
42
|
+
<option customSDK="" />
|
43
|
+
</build>
|
44
|
+
<!-- SWC Include Libraries -->
|
45
|
+
<includeLibraries>
|
46
|
+
<!-- example: <element path="..." /> -->
|
47
|
+
</includeLibraries>
|
48
|
+
<!-- SWC Libraries -->
|
49
|
+
<libraryPaths>
|
50
|
+
</libraryPaths>
|
51
|
+
<!-- External Libraries -->
|
52
|
+
<externalLibraryPaths>
|
53
|
+
<!-- example: <element path="..." /> -->
|
54
|
+
</externalLibraryPaths>
|
55
|
+
<!-- Runtime Shared Libraries -->
|
56
|
+
<rslPaths>
|
57
|
+
<!-- example: <element path="..." /> -->
|
58
|
+
</rslPaths>
|
59
|
+
<!-- Intrinsic Libraries -->
|
60
|
+
<intrinsics>
|
61
|
+
<!-- example: <element path="..." /> -->
|
62
|
+
</intrinsics>
|
63
|
+
<!-- Assets to embed into the output SWF -->
|
64
|
+
<library>
|
65
|
+
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
|
66
|
+
</library>
|
67
|
+
<!-- Class files to compile (other referenced classes will automatically be included) -->
|
68
|
+
<compileTargets>
|
69
|
+
<compile path="..\..\..\..\libary\Alibaba_CCBU_as_lib\cnued\trunk\cn\alibaba\Main.as" />
|
70
|
+
</compileTargets>
|
71
|
+
<!-- Paths to exclude from the Project Explorer tree -->
|
72
|
+
<hiddenPaths>
|
73
|
+
<!-- example: <hidden path="..." /> -->
|
74
|
+
</hiddenPaths>
|
75
|
+
<!-- Executed before build -->
|
76
|
+
<preBuildCommand />
|
77
|
+
<!-- Executed after build -->
|
78
|
+
<postBuildCommand alwaysRun="False" />
|
79
|
+
<!-- Other project options -->
|
80
|
+
<options>
|
81
|
+
<option showHiddenPaths="False" />
|
82
|
+
<option testMovie="ExternalPlayer" />
|
83
|
+
</options>
|
84
|
+
</project>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: test_as_proj
|
2
|
+
|
3
|
+
target: 10.0
|
4
|
+
|
5
|
+
source:
|
6
|
+
- src
|
7
|
+
- /home/qhwa/working-disk/working/Projects/nightly_builder/libraries/ccbu-trunk/
|
8
|
+
|
9
|
+
library:
|
10
|
+
- lib
|
11
|
+
|
12
|
+
main: src/Main.as
|
13
|
+
|
14
|
+
output:
|
15
|
+
file: bin/test_as_proj.swf
|
16
|
+
width: 800
|
17
|
+
height: 600
|