fcshd 0.6 → 0.6.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.
data/MIT-LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (C) 2011 Daniel Brockman
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
data/README CHANGED
@@ -2,3 +2,37 @@ By using a client-server architecture, we are able to make the Adobe Flex
2
2
  compiler run fast while still being usable in command-line environments.
3
3
  In practice, you start the `fcshd' server, and are then able to use the
4
4
  client program `fcshc' as a faster and more usable replacement for `mxmlc'.
5
+
6
+ $ fcshc --help
7
+ Usage: fcshc MAIN.[as|mxml] [-l LIB] [SRCDIR|SWCDIR|SWC]... [-o OUT.swf]
8
+ fcshc -o OUT.swc SRCDIR... [-l LIB]... [SWCDIR|SWC]...
9
+
10
+ To compile an SWF, name the main application source file, then any
11
+ additional source directories, SWC directories, or SWC files.
12
+
13
+ To compile an SWC using `compc', you must provide the `-o' option, and
14
+ then at least one source directory, SWC directory, or SWC file.
15
+
16
+ Dependencies can also be specified by name using the `-l LIB' option,
17
+ which will search for LIB or LIB.swc in `~/.fcshd-lib'. Both source
18
+ directories, SWC directories, and SWC files can be named in this way.
19
+
20
+ To pass extra arguments, use e.g. `-X -include-file -X NAME -X FILE'.
21
+
22
+ -o, --output OUTPUT.[swf|swc] Name of the resulting binary
23
+ -l, --library LIBRARY Search LIBRARY when compiling
24
+ -X, --extra-argument ARGUMENT Pass ARGUMENT to the compiler
25
+ -p, --production Leave out debugging metadata
26
+ --static-rsls Use static linking for RSLs
27
+ --no-rsls Remove all runtime shared libraries
28
+
29
+ -3, --flex-3 Use -compatibility-version=3
30
+ --halo Use the Halo theme
31
+
32
+ -R, --restart Restart the compiler first
33
+ -n, --dry-run Only print the compiler command
34
+ --verbose Also print the compiler command
35
+ -v, --version Show `fcshc 0.6a'
36
+ -h, --help Show this message
37
+
38
+ TL;DR: $ fcshc src/my_app.mxml
data/bin/fcshc-repl ADDED
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "readline"
4
+ require "tempfile"
5
+ require "fileutils"
6
+
7
+ include FileUtils
8
+
9
+ def mkdir_cd dir
10
+ mkdir_p dir
11
+ Dir.chdir dir
12
+ end
13
+
14
+ mkdir_cd "/tmp/fcshc-repl"
15
+
16
+ catch :ok do
17
+ for i in 0..10
18
+ if not File.exist? i.to_s
19
+ mkdir_cd i.to_s
20
+ tmpdir = Dir.pwd
21
+ at_exit do
22
+ Dir.chdir tmpdir do
23
+ rm_f "dummy.as"
24
+ rm_f "dummy.swf"
25
+ end
26
+ rmdir tmpdir
27
+ end
28
+ throw :ok
29
+ end
30
+ end
31
+ fail "too many entries in #{Dir.pwd}"
32
+ end
33
+
34
+ program_template = DATA.read
35
+ get_program = -> code do
36
+ program_template.sub("__CODE__", code)
37
+ end
38
+
39
+ class MyInterrupt < StandardError; end
40
+
41
+ while line = Readline.readline("as3> ", true)
42
+ File.open("dummy.as", "w") { |file| file << get_program[line] }
43
+ output = `fcshc -lstdio -lknock --no-rsls dummy.as`
44
+ puts output.gsub(/^dummy.as:\d+: /, "") unless output == ""
45
+ if $? == 0
46
+ system "run-swf dummy.swf"
47
+ end
48
+ end
49
+
50
+ __END__
51
+ package {
52
+ import stdio.flash.Sprite
53
+ import stdio.process
54
+ import knock.inspect
55
+ import flash.utils.*
56
+
57
+ public class dummy extends Sprite {
58
+ override public function main(): void {
59
+ process.immortal = false
60
+ process.whiny = true
61
+
62
+ try {
63
+ process.warn(inspect(__CODE__))
64
+ } finally {
65
+ process.exit()
66
+ }
67
+ }
68
+ }
69
+ }
data/fcshd.gemspec CHANGED
@@ -15,5 +15,5 @@ client program `fcshc' as a faster and more usable replacement for `mxmlc'.
15
15
  gem.date = Time.now.utc.strftime("%Y-%m-%d")
16
16
  gem.homepage = "http://github.com/dbrock/fcshd"
17
17
  gem.files = `git ls-files`.lines.map(&:chomp)
18
- gem.executables = %w"fcshd fcshc"
18
+ gem.executables = %w"fcshd fcshc fcshc-repl"
19
19
  end
data/lib/fcshd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  unless defined? FCSHD::VERSION
2
2
  module FCSHD
3
- VERSION = "0.6"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,43 +1,42 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fcshd
3
- version: !ruby/object:Gem::Version
4
- hash: 7
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- version: "0.6"
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Daniel Brockman
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-12-19 00:00:00 Z
12
+ date: 2012-01-14 00:00:00.000000000 Z
18
13
  dependencies: []
14
+ description: ! 'By using a client-server architecture, we are able to make the Adobe
15
+ Flex
19
16
 
20
- description: |
21
- By using a client-server architecture, we are able to make the Adobe Flex
22
17
  compiler run fast while still being usable in command-line environments.
23
- In practice, you start the `fcshd' server, and are then able to use the
24
- client program `fcshc' as a faster and more usable replacement for `mxmlc'.
25
18
 
19
+ In practice, you start the `fcshd'' server, and are then able to use the
20
+
21
+ client program `fcshc'' as a faster and more usable replacement for `mxmlc''.
22
+
23
+ '
26
24
  email: daniel@gointeractive.se
27
- executables:
25
+ executables:
28
26
  - fcshd
29
27
  - fcshc
28
+ - fcshc-repl
30
29
  extensions: []
31
-
32
30
  extra_rdoc_files: []
33
-
34
- files:
31
+ files:
35
32
  - .gitignore
36
33
  - Gemfile
37
34
  - Gemfile.lock
35
+ - MIT-LICENSE
38
36
  - README
39
37
  - Rakefile
40
38
  - bin/fcshc
39
+ - bin/fcshc-repl
41
40
  - bin/fcshd
42
41
  - fcshd.gemspec
43
42
  - lib/fcshd.rb
@@ -53,36 +52,26 @@ files:
53
52
  - lib/fcshd/version.rb
54
53
  homepage: http://github.com/dbrock/fcshd
55
54
  licenses: []
56
-
57
55
  post_install_message:
58
56
  rdoc_options: []
59
-
60
- require_paths:
57
+ require_paths:
61
58
  - lib
62
- required_ruby_version: !ruby/object:Gem::Requirement
59
+ required_ruby_version: !ruby/object:Gem::Requirement
63
60
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- hash: 3
68
- segments:
69
- - 0
70
- version: "0"
71
- required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
66
  none: false
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- hash: 3
77
- segments:
78
- - 0
79
- version: "0"
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
80
71
  requirements: []
81
-
82
72
  rubyforge_project:
83
73
  rubygems_version: 1.8.11
84
74
  signing_key:
85
75
  specification_version: 3
86
76
  summary: Usable CLI for the Adobe Flex compiler shell (fcsh)
87
77
  test_files: []
88
-