csd 0.1.5 → 0.1.6
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/COPYING +1 -2
- data/README.rdoc +7 -1
- data/Rakefile +7 -2
- data/VERSION +1 -1
- data/csd.gemspec +18 -216
- data/lib/csd.rb +6 -16
- data/lib/csd/application.rb +2 -2
- data/lib/csd/application/default.rb +15 -14
- data/lib/csd/application/default/base.rb +1 -1
- data/lib/csd/application/minisip.rb +43 -11
- data/lib/csd/application/minisip/about.yml +5 -5
- data/lib/csd/application/minisip/base.rb +82 -70
- data/lib/csd/application/minisip/error.rb +1 -1
- data/lib/csd/application/minisip/options/common.rb +1 -1
- data/lib/csd/application/minisip/options/compile.rb +1 -1
- data/lib/csd/application/minisip/options/package.rb +1 -1
- data/lib/csd/application/minisip/unix.rb +40 -27
- data/lib/csd/application/minisip/unix/darwin.rb +12 -0
- data/lib/csd/application/minisip/unix/linux.rb +1 -11
- data/lib/csd/application/minisip/unix/linux/debian.rb +14 -25
- data/lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb +12 -13
- data/lib/csd/applications.rb +5 -5
- data/lib/csd/commands.rb +164 -89
- data/lib/csd/container.rb +61 -0
- data/lib/csd/error.rb +10 -1
- data/lib/csd/extensions.rb +3 -2
- data/lib/csd/extensions/core/array.rb +29 -1
- data/lib/csd/extensions/core/dir.rb +15 -24
- data/lib/csd/extensions/core/object.rb +10 -2
- data/lib/csd/extensions/core/option_parser.rb +22 -3
- data/lib/csd/extensions/core/pathname.rb +30 -2
- data/lib/csd/extensions/core/string.rb +51 -4
- data/lib/csd/extensions/gem/platform.rb +18 -3
- data/lib/csd/{options.rb → options_parser.rb} +16 -20
- data/lib/csd/path_container.rb +24 -0
- data/lib/csd/user_interface.rb +2 -0
- data/lib/csd/user_interface/base.rb +26 -0
- data/lib/csd/user_interface/cli.rb +37 -0
- data/lib/csd/vendor/active_support/MIT-LICENSE +20 -0
- data/lib/csd/vendor/active_support/inflector.rb +155 -0
- data/lib/csd/vendor/term/GPL2-LICENSE +339 -0
- data/lib/csd/vendor/term/ansicolor.rb +113 -0
- data/lib/csd/version.rb +13 -4
- data/test/application/test_minisip.rb +45 -0
- data/test/functional/test_applications.rb +10 -16
- data/test/functional/test_commands.rb +260 -23
- data/test/unit/test_string.rb +1 -1
- metadata +18 -216
- data/lib/active_support.rb +0 -75
- data/lib/active_support/all.rb +0 -3
- data/lib/active_support/backtrace_cleaner.rb +0 -94
- data/lib/active_support/base64.rb +0 -42
- data/lib/active_support/basic_object.rb +0 -21
- data/lib/active_support/benchmarkable.rb +0 -60
- data/lib/active_support/buffered_logger.rb +0 -132
- data/lib/active_support/builder.rb +0 -6
- data/lib/active_support/cache.rb +0 -626
- data/lib/active_support/cache/compressed_mem_cache_store.rb +0 -13
- data/lib/active_support/cache/file_store.rb +0 -188
- data/lib/active_support/cache/mem_cache_store.rb +0 -191
- data/lib/active_support/cache/memory_store.rb +0 -159
- data/lib/active_support/cache/strategy/local_cache.rb +0 -164
- data/lib/active_support/cache/synchronized_memory_store.rb +0 -11
- data/lib/active_support/callbacks.rb +0 -600
- data/lib/active_support/concern.rb +0 -29
- data/lib/active_support/configurable.rb +0 -36
- data/lib/active_support/core_ext.rb +0 -3
- data/lib/active_support/core_ext/array.rb +0 -7
- data/lib/active_support/core_ext/array/access.rb +0 -46
- data/lib/active_support/core_ext/array/conversions.rb +0 -164
- data/lib/active_support/core_ext/array/extract_options.rb +0 -29
- data/lib/active_support/core_ext/array/grouping.rb +0 -100
- data/lib/active_support/core_ext/array/random_access.rb +0 -20
- data/lib/active_support/core_ext/array/uniq_by.rb +0 -17
- data/lib/active_support/core_ext/array/wrap.rb +0 -22
- data/lib/active_support/core_ext/benchmark.rb +0 -7
- data/lib/active_support/core_ext/big_decimal.rb +0 -1
- data/lib/active_support/core_ext/big_decimal/conversions.rb +0 -27
- data/lib/active_support/core_ext/cgi.rb +0 -1
- data/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +0 -19
- data/lib/active_support/core_ext/class.rb +0 -4
- data/lib/active_support/core_ext/class/attribute.rb +0 -67
- data/lib/active_support/core_ext/class/attribute_accessors.rb +0 -63
- data/lib/active_support/core_ext/class/delegating_attributes.rb +0 -44
- data/lib/active_support/core_ext/class/inheritable_attributes.rb +0 -232
- data/lib/active_support/core_ext/class/subclasses.rb +0 -55
- data/lib/active_support/core_ext/date/acts_like.rb +0 -8
- data/lib/active_support/core_ext/date/calculations.rb +0 -240
- data/lib/active_support/core_ext/date/conversions.rb +0 -99
- data/lib/active_support/core_ext/date/freeze.rb +0 -31
- data/lib/active_support/core_ext/date_time/acts_like.rb +0 -13
- data/lib/active_support/core_ext/date_time/calculations.rb +0 -113
- data/lib/active_support/core_ext/date_time/conversions.rb +0 -102
- data/lib/active_support/core_ext/date_time/zones.rb +0 -17
- data/lib/active_support/core_ext/enumerable.rb +0 -119
- data/lib/active_support/core_ext/exception.rb +0 -3
- data/lib/active_support/core_ext/file.rb +0 -2
- data/lib/active_support/core_ext/file/atomic.rb +0 -41
- data/lib/active_support/core_ext/file/path.rb +0 -5
- data/lib/active_support/core_ext/float.rb +0 -1
- data/lib/active_support/core_ext/float/rounding.rb +0 -19
- data/lib/active_support/core_ext/hash.rb +0 -8
- data/lib/active_support/core_ext/hash/conversions.rb +0 -150
- data/lib/active_support/core_ext/hash/deep_merge.rb +0 -16
- data/lib/active_support/core_ext/hash/diff.rb +0 -13
- data/lib/active_support/core_ext/hash/except.rb +0 -24
- data/lib/active_support/core_ext/hash/indifferent_access.rb +0 -14
- data/lib/active_support/core_ext/hash/keys.rb +0 -45
- data/lib/active_support/core_ext/hash/reverse_merge.rb +0 -28
- data/lib/active_support/core_ext/hash/slice.rb +0 -38
- data/lib/active_support/core_ext/integer.rb +0 -3
- data/lib/active_support/core_ext/integer/inflections.rb +0 -14
- data/lib/active_support/core_ext/integer/multiple.rb +0 -6
- data/lib/active_support/core_ext/integer/time.rb +0 -39
- data/lib/active_support/core_ext/kernel.rb +0 -5
- data/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
- data/lib/active_support/core_ext/kernel/debugger.rb +0 -16
- data/lib/active_support/core_ext/kernel/reporting.rb +0 -62
- data/lib/active_support/core_ext/kernel/requires.rb +0 -26
- data/lib/active_support/core_ext/kernel/singleton_class.rb +0 -13
- data/lib/active_support/core_ext/load_error.rb +0 -23
- data/lib/active_support/core_ext/logger.rb +0 -146
- data/lib/active_support/core_ext/module.rb +0 -12
- data/lib/active_support/core_ext/module/aliasing.rb +0 -70
- data/lib/active_support/core_ext/module/anonymous.rb +0 -24
- data/lib/active_support/core_ext/module/attr_accessor_with_default.rb +0 -31
- data/lib/active_support/core_ext/module/attr_internal.rb +0 -32
- data/lib/active_support/core_ext/module/attribute_accessors.rb +0 -66
- data/lib/active_support/core_ext/module/delegation.rb +0 -146
- data/lib/active_support/core_ext/module/deprecation.rb +0 -9
- data/lib/active_support/core_ext/module/introspection.rb +0 -88
- data/lib/active_support/core_ext/module/method_names.rb +0 -14
- data/lib/active_support/core_ext/module/reachable.rb +0 -10
- data/lib/active_support/core_ext/module/remove_method.rb +0 -6
- data/lib/active_support/core_ext/module/synchronization.rb +0 -42
- data/lib/active_support/core_ext/name_error.rb +0 -18
- data/lib/active_support/core_ext/numeric.rb +0 -2
- data/lib/active_support/core_ext/numeric/bytes.rb +0 -44
- data/lib/active_support/core_ext/numeric/time.rb +0 -77
- data/lib/active_support/core_ext/object.rb +0 -14
- data/lib/active_support/core_ext/object/acts_like.rb +0 -10
- data/lib/active_support/core_ext/object/blank.rb +0 -76
- data/lib/active_support/core_ext/object/conversions.rb +0 -4
- data/lib/active_support/core_ext/object/duplicable.rb +0 -65
- data/lib/active_support/core_ext/object/extending.rb +0 -11
- data/lib/active_support/core_ext/object/instance_variables.rb +0 -67
- data/lib/active_support/core_ext/object/misc.rb +0 -2
- data/lib/active_support/core_ext/object/returning.rb +0 -42
- data/lib/active_support/core_ext/object/to_param.rb +0 -49
- data/lib/active_support/core_ext/object/to_query.rb +0 -27
- data/lib/active_support/core_ext/object/try.rb +0 -36
- data/lib/active_support/core_ext/object/with_options.rb +0 -26
- data/lib/active_support/core_ext/proc.rb +0 -14
- data/lib/active_support/core_ext/process.rb +0 -1
- data/lib/active_support/core_ext/process/daemon.rb +0 -23
- data/lib/active_support/core_ext/range.rb +0 -4
- data/lib/active_support/core_ext/range/blockless_step.rb +0 -29
- data/lib/active_support/core_ext/range/conversions.rb +0 -21
- data/lib/active_support/core_ext/range/include_range.rb +0 -21
- data/lib/active_support/core_ext/range/overlaps.rb +0 -8
- data/lib/active_support/core_ext/regexp.rb +0 -5
- data/lib/active_support/core_ext/rexml.rb +0 -46
- data/lib/active_support/core_ext/string.rb +0 -12
- data/lib/active_support/core_ext/string/access.rb +0 -99
- data/lib/active_support/core_ext/string/behavior.rb +0 -7
- data/lib/active_support/core_ext/string/conversions.rb +0 -61
- data/lib/active_support/core_ext/string/encoding.rb +0 -11
- data/lib/active_support/core_ext/string/exclude.rb +0 -6
- data/lib/active_support/core_ext/string/filters.rb +0 -49
- data/lib/active_support/core_ext/string/inflections.rb +0 -149
- data/lib/active_support/core_ext/string/interpolation.rb +0 -2
- data/lib/active_support/core_ext/string/multibyte.rb +0 -72
- data/lib/active_support/core_ext/string/output_safety.rb +0 -109
- data/lib/active_support/core_ext/string/starts_ends_with.rb +0 -4
- data/lib/active_support/core_ext/string/xchar.rb +0 -18
- data/lib/active_support/core_ext/time/acts_like.rb +0 -8
- data/lib/active_support/core_ext/time/calculations.rb +0 -282
- data/lib/active_support/core_ext/time/conversions.rb +0 -85
- data/lib/active_support/core_ext/time/marshal.rb +0 -56
- data/lib/active_support/core_ext/time/publicize_conversion_methods.rb +0 -10
- data/lib/active_support/core_ext/time/zones.rb +0 -78
- data/lib/active_support/core_ext/uri.rb +0 -22
- data/lib/active_support/dependencies.rb +0 -628
- data/lib/active_support/dependencies/autoload.rb +0 -50
- data/lib/active_support/deprecation.rb +0 -18
- data/lib/active_support/deprecation/behaviors.rb +0 -38
- data/lib/active_support/deprecation/method_wrappers.rb +0 -29
- data/lib/active_support/deprecation/proxy_wrappers.rb +0 -74
- data/lib/active_support/deprecation/reporting.rb +0 -56
- data/lib/active_support/duration.rb +0 -105
- data/lib/active_support/gzip.rb +0 -25
- data/lib/active_support/hash_with_indifferent_access.rb +0 -145
- data/lib/active_support/i18n.rb +0 -8
- data/lib/active_support/inflections.rb +0 -56
- data/lib/active_support/inflector.rb +0 -7
- data/lib/active_support/inflector/inflections.rb +0 -211
- data/lib/active_support/inflector/methods.rb +0 -141
- data/lib/active_support/inflector/transliterate.rb +0 -97
- data/lib/active_support/json.rb +0 -2
- data/lib/active_support/json/backends/jsongem.rb +0 -43
- data/lib/active_support/json/backends/yajl.rb +0 -40
- data/lib/active_support/json/backends/yaml.rb +0 -90
- data/lib/active_support/json/decoding.rb +0 -51
- data/lib/active_support/json/encoding.rb +0 -254
- data/lib/active_support/json/variable.rb +0 -11
- data/lib/active_support/lazy_load_hooks.rb +0 -27
- data/lib/active_support/locale/en.yml +0 -36
- data/lib/active_support/memoizable.rb +0 -103
- data/lib/active_support/message_encryptor.rb +0 -71
- data/lib/active_support/message_verifier.rb +0 -62
- data/lib/active_support/multibyte.rb +0 -44
- data/lib/active_support/multibyte/chars.rb +0 -480
- data/lib/active_support/multibyte/exceptions.rb +0 -8
- data/lib/active_support/multibyte/unicode.rb +0 -393
- data/lib/active_support/multibyte/utils.rb +0 -60
- data/lib/active_support/notifications.rb +0 -81
- data/lib/active_support/notifications/fanout.rb +0 -93
- data/lib/active_support/notifications/instrumenter.rb +0 -56
- data/lib/active_support/option_merger.rb +0 -25
- data/lib/active_support/ordered_hash.rb +0 -158
- data/lib/active_support/ordered_options.rb +0 -27
- data/lib/active_support/railtie.rb +0 -100
- data/lib/active_support/rescuable.rb +0 -114
- data/lib/active_support/ruby/shim.rb +0 -22
- data/lib/active_support/secure_random.rb +0 -199
- data/lib/active_support/string_inquirer.rb +0 -21
- data/lib/active_support/test_case.rb +0 -42
- data/lib/active_support/testing/assertions.rb +0 -82
- data/lib/active_support/testing/declarative.rb +0 -40
- data/lib/active_support/testing/default.rb +0 -9
- data/lib/active_support/testing/deprecation.rb +0 -55
- data/lib/active_support/testing/isolation.rb +0 -154
- data/lib/active_support/testing/pending.rb +0 -48
- data/lib/active_support/testing/performance.rb +0 -455
- data/lib/active_support/testing/setup_and_teardown.rb +0 -111
- data/lib/active_support/time.rb +0 -34
- data/lib/active_support/time/autoload.rb +0 -5
- data/lib/active_support/time_with_zone.rb +0 -341
- data/lib/active_support/values/time_zone.rb +0 -377
- data/lib/active_support/values/unicode_tables.dat +0 -0
- data/lib/active_support/version.rb +0 -10
- data/lib/active_support/whiny_nil.rb +0 -60
- data/lib/active_support/xml_mini.rb +0 -158
- data/lib/active_support/xml_mini/jdom.rb +0 -168
- data/lib/active_support/xml_mini/libxml.rb +0 -80
- data/lib/active_support/xml_mini/libxmlsax.rb +0 -85
- data/lib/active_support/xml_mini/nokogiri.rb +0 -78
- data/lib/active_support/xml_mini/nokogirisax.rb +0 -83
- data/lib/active_support/xml_mini/rexml.rb +0 -129
- data/lib/csd/extensions/core/file.rb +0 -14
- data/lib/csd/global_open_struct.rb +0 -19
- data/lib/csd/path.rb +0 -32
- data/lib/csd/ui.rb +0 -2
- data/lib/csd/ui/cli.rb +0 -8
- data/lib/csd/ui/ui.rb +0 -45
- data/lib/term/ansicolor.rb +0 -102
- data/lib/term/ansicolor/.keep +0 -0
- data/lib/term/ansicolor/version.rb +0 -10
@@ -1,31 +1,63 @@
|
|
1
|
-
# encoding:
|
1
|
+
# -*- encoding: UTF-8 -*-
|
2
2
|
require 'ostruct'
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
3
|
+
require 'csd/application/default'
|
4
|
+
require 'csd/application/minisip/error'
|
5
|
+
require 'csd/application/minisip/base'
|
6
|
+
require 'csd/application/minisip/unix'
|
7
|
+
require 'csd/application/minisip/unix/darwin'
|
8
|
+
require 'csd/application/minisip/unix/linux'
|
9
|
+
require 'csd/application/minisip/unix/linux/debian'
|
10
|
+
require 'csd/application/minisip/unix/linux/debian/ubuntu10'
|
7
11
|
|
8
12
|
module CSD
|
9
13
|
module Application
|
14
|
+
# This is the Application Module for MiniSIP, an open-source high-definition video conferencing client.
|
15
|
+
#
|
10
16
|
module Minisip
|
11
17
|
class << self
|
12
|
-
|
18
|
+
|
13
19
|
include CSD::Application::Default
|
14
|
-
|
20
|
+
|
21
|
+
# This method will check which operating system we're on and initialize the correct sub-module
|
22
|
+
# (see http://github.com/rubygems/rubygems/blob/master/lib/rubygems/platform.rb#L65 for supported
|
23
|
+
# platform identifiers).
|
24
|
+
#
|
25
|
+
# Currently these platforms can generally exist:
|
26
|
+
# * +cygwin+ (a Linux-like environment for Windows)
|
27
|
+
# * +darwin+ (Mac OS X)
|
28
|
+
# * +freebsd+
|
29
|
+
# * +hpux+ (Hewlett Packard UniX)
|
30
|
+
# * +java+
|
31
|
+
# * +dotnet+
|
32
|
+
# * +linux+ (Debian, OpenSUSE, Ubuntu, Red Hat, Fedora...)
|
33
|
+
# * +mingw32+ (Minimalist GNU for Windows)
|
34
|
+
# * +mswin*+ (Microsoft Windows, e.g. +mswin32+, +mswin64+)
|
35
|
+
# * +netbsdelf+
|
36
|
+
# * +openbsd+
|
37
|
+
# * +solaris+
|
38
|
+
# * +unknown+
|
39
|
+
#
|
15
40
|
def instance
|
16
41
|
@instance ||= case Gem::Platform.local.os
|
42
|
+
|
43
|
+
when 'darwin'
|
44
|
+
Darwin.new
|
45
|
+
|
17
46
|
when 'linux'
|
18
|
-
UI.debug "Analyzing kernel
|
19
|
-
case Gem::Platform.local.
|
20
|
-
|
47
|
+
UI.debug "Analyzing Linux kernel release: #{Gem::Platform.local.kernel_release}"
|
48
|
+
case Gem::Platform.local.kernel_release
|
49
|
+
|
50
|
+
when '2.6.32-21-generic', '2.6.32-22-generic'
|
21
51
|
UI.debug "Ubuntu 10.04 identified"
|
22
52
|
Ubuntu10.new
|
53
|
+
|
23
54
|
else
|
24
55
|
UI.debug "Debian identified"
|
25
56
|
Debian.new
|
26
57
|
end
|
58
|
+
|
27
59
|
else
|
28
|
-
UI.debug "
|
60
|
+
UI.debug "This Operating System is not supported."
|
29
61
|
Base.new
|
30
62
|
end
|
31
63
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
human: MiniSIP
|
2
2
|
description: An open-source SIP client for high-definition video conferencing.
|
3
3
|
actions:
|
4
|
-
|
4
|
+
public:
|
5
5
|
#- show: Shows further information about MiniSIP
|
6
|
-
|
7
|
-
#- install: Installs an application
|
8
|
-
#- check: Checks whether the environment dependencies for the application are satisfied
|
9
|
-
:developer:
|
6
|
+
#- download: Downloads MiniSIP components (e.g. source code, configurations, docs,...)
|
10
7
|
- compile: Downloads and compiles MiniSIP from scratch
|
11
8
|
- package: Downloads, compiles and packages MiniSIP from scratch
|
9
|
+
#- install: Installs an application
|
10
|
+
#- check: Checks whether the environment dependencies for the application are satisfied
|
11
|
+
developer:
|
12
12
|
#- publish: Submits a compiled package to the CSD package repository
|
13
13
|
scopes:
|
14
14
|
--- {}
|
@@ -1,100 +1,112 @@
|
|
1
|
-
# encoding:
|
2
|
-
require
|
1
|
+
# -*- encoding: UTF-8 -*-
|
2
|
+
require 'csd/application/default/base'
|
3
3
|
|
4
4
|
module CSD
|
5
5
|
module Application
|
6
6
|
module Minisip
|
7
7
|
class Base < CSD::Application::Base
|
8
8
|
|
9
|
-
LIBRARIES = %w{ libmutil libmnetutil libmcrypto libmikey libmsip libmstun libminisip minisip }
|
10
|
-
|
11
|
-
|
9
|
+
LIBRARIES = %w{ libmutil libmnetutil libmcrypto libmikey libmsip libmstun libminisip minisip }
|
10
|
+
|
11
|
+
# MAIN APPLICATION OPERATIONS
|
12
|
+
|
13
|
+
def compile
|
12
14
|
UI.error 'Currently not supported for this platform. Sorry.'
|
13
15
|
end
|
14
16
|
|
15
|
-
def
|
17
|
+
def package
|
16
18
|
UI.error 'Currently not supported for this platform. Sorry.'
|
17
19
|
end
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
# GENERAL USER INFORMATION
|
22
|
+
|
23
|
+
def introduction
|
24
|
+
define_root_path
|
25
|
+
define_paths
|
26
|
+
UI.separator
|
27
|
+
UI.info " Working directory: ".green + Path.work.to_s.yellow
|
28
|
+
UI.info " Your Platform: ".green + Gem::Platform.local.humanize.to_s.yellow
|
29
|
+
UI.info(" Application module: ".green + self.class.name.to_s.yellow)
|
30
|
+
UI.separator
|
31
|
+
if Options.help
|
32
|
+
UI.info Options.helptext
|
33
|
+
abort
|
26
34
|
else
|
27
|
-
|
35
|
+
raise(Interrupt) unless (Options.yes or UI.ask_yes_no("Continue?".red.bold, true))
|
28
36
|
end
|
29
37
|
end
|
30
38
|
|
31
|
-
|
32
|
-
Path.work = Pathname.new(File.join(Path.root, 'minisip'))
|
33
|
-
Path.repository = Pathname.new(File.join(Path.work, 'repository'))
|
34
|
-
Path.plugins = Pathname.new(File.join(Path.work, 'plugins'))
|
35
|
-
Path.packaging = Pathname.new(File.join(Path.work, 'packaging'))
|
36
|
-
Path.open_gl_display = Pathname.new(File.join(Path.repository, 'libminisip', 'source', 'subsystem_media', 'video', 'display', 'OpenGLDisplay.cxx'))
|
37
|
-
Path.hdviper = Pathname.new(File.join(Path.work, 'hdviper'))
|
38
|
-
Path.hdviper_x264 = Pathname.new(File.join(Path.hdviper, 'x264'))
|
39
|
-
Path.hdviper_x264_test_x264api = Pathname.new(File.join(Path.hdviper_x264, 'test', 'x264API'))
|
40
|
-
Path.build = Pathname.new(File.join(Path.work, 'build'))
|
41
|
-
Path.build_bin = Pathname.new(File.join(Path.build, 'bin'))
|
42
|
-
Path.build_gtkgui = Pathname.new(File.join(Path.build_bin, 'minisip_gtkgui'))
|
43
|
-
Path.build_include = Pathname.new(File.join(Path.build, 'include'))
|
44
|
-
Path.build_lib = Pathname.new(File.join(Path.build, 'lib'))
|
45
|
-
Path.build_lib_pkg_config = Pathname.new(File.join(Path.build_lib, 'pkgconfig'))
|
46
|
-
Path.build_share = Pathname.new(File.join(Path.build, 'share'))
|
47
|
-
Path.build_share_aclocal = Pathname.new(File.join(Path.build_share, 'aclocal'))
|
48
|
-
Path.giomm_header = Pathname.new(File.join('/', 'usr', 'include', 'giomm-2.4', 'giomm.h'))
|
49
|
-
end
|
39
|
+
# CROSS-PLATFORM TASKS
|
50
40
|
|
51
|
-
def
|
52
|
-
if
|
53
|
-
UI.warn "Skipping repository download, because the directory already exists: #{Path.repository}"
|
54
|
-
else
|
55
|
-
if Path.repository.parent.writable? or Options.dry
|
56
|
-
UI.info "Downloading minisip repository to: #{Path.repository}".green.bold
|
57
|
-
Cmd.run("git clone http://github.com/csd/minisip.git #{Path.repository}")
|
58
|
-
# Fixing hard-coded stuff
|
59
|
-
Cmd.replace(Path.open_gl_display, '/home/erik', Path.build)
|
60
|
-
else
|
61
|
-
UI.error "Could not download minisip repository (no permission): #{Path.repository}"
|
62
|
-
end
|
63
|
-
end
|
41
|
+
def libraries
|
42
|
+
Options.only ? LIBRARIES.map { |lib| lib if Options.only.to_a.include?(lib) }.compact : LIBRARIES
|
64
43
|
end
|
65
44
|
|
66
|
-
def
|
67
|
-
|
68
|
-
UI.warn "Skipping plugins download, because the directory already exists: #{Path.plugins}"
|
69
|
-
else
|
70
|
-
if Path.plugins.parent.writable? or Options.dry
|
71
|
-
UI.info "Downloading minisip plugins to: #{Path.plugins}".green.bold
|
72
|
-
Cmd.run("git clone http://github.com/csd/minisip-plugins.git #{Path.plugins}")
|
73
|
-
else
|
74
|
-
UI.error "Could not download minisip plugins (no permission): #{Path.plugins}"
|
75
|
-
end
|
76
|
-
end
|
45
|
+
def checkout_minisip
|
46
|
+
Cmd.git_clone('MiniSIP repository', 'http://github.com/csd/minisip.git', Path.repository)
|
77
47
|
end
|
78
48
|
|
49
|
+
def modify_minisip
|
50
|
+
Cmd.replace(Path.repository_open_gl_display, '/home/erik', Path.build)
|
51
|
+
end
|
52
|
+
|
53
|
+
def checkout_plugins
|
54
|
+
Cmd.git_clone('additional MiniSIP plugins', 'http://github.com/csd/minisip-plugins.git', Path.plugins)
|
55
|
+
end
|
56
|
+
|
79
57
|
def checkout_hdviper
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
58
|
+
Cmd.git_clone('HDVIPER', 'http://github.com/csd/libraries.git', Path.hdviper)
|
59
|
+
end
|
60
|
+
|
61
|
+
# CROSS-PLATFORM INFORMATION
|
62
|
+
|
63
|
+
def cpp_flags
|
64
|
+
"CPPFLAGS=\"-I#{Path.hdviper_x264} -I#{Path.hdviper_x264_test_x264api} -I#{Path.repository_grabber} -I#{Path.repository_decklinksdk}\""
|
65
|
+
end
|
66
|
+
|
67
|
+
def ld_flags
|
68
|
+
"LDFLAGS=\"#{Path.hdviper_libx264api} #{Path.hdviper_libtidx264} -lpthread -lrt\""
|
69
|
+
end
|
70
|
+
|
71
|
+
# DEFINING PATHS ETC...
|
72
|
+
|
73
|
+
def define_root_path
|
74
|
+
if Options.path
|
75
|
+
if File.directory?(Options.path)
|
76
|
+
Path.root = File.expand_path(Options.path)
|
88
77
|
else
|
89
|
-
|
78
|
+
raise Error::Options::PathNotFound, "The path `#{Options.path}´ doesn't exist."
|
90
79
|
end
|
80
|
+
else
|
81
|
+
Path.root = Options.temp ? Dir.mktmpdir : Dir.pwd
|
91
82
|
end
|
92
83
|
end
|
93
84
|
|
94
|
-
def
|
95
|
-
|
96
|
-
|
97
|
-
|
85
|
+
def define_paths
|
86
|
+
Path.work = Pathname.new(File.join(Path.root, 'minisip'))
|
87
|
+
Path.giomm_header = Pathname.new(File.join('/', 'usr', 'include', 'giomm-2.4', 'giomm.h'))
|
88
|
+
Path.giomm_header_backup = Pathname.new(File.join('/', 'usr', 'include', 'giomm-2.4', 'giomm.h.ai-backup'))
|
89
|
+
Path.repository = Pathname.new(File.join(Path.work, 'repository'))
|
90
|
+
Path.repository_libminisip_rules = Pathname.new(File.join(Path.repository, 'libminisip', 'debian', 'rules'))
|
91
|
+
Path.repository_libminisip_rules_backup = Pathname.new(File.join(Path.repository, 'libminisip', 'debian', 'rules.ai-backup'))
|
92
|
+
Path.repository_grabber = Pathname.new(File.join(Path.repository, 'libminisip', 'source', 'subsystem_media', 'video', 'grabber'))
|
93
|
+
Path.repository_open_gl_display = Pathname.new(File.join(Path.repository, 'libminisip', 'source', 'subsystem_media', 'video', 'display', 'OpenGLDisplay.cxx'))
|
94
|
+
Path.repository_decklinksdk = Pathname.new(File.join(Path.repository_grabber, 'decklinksdk'))
|
95
|
+
Path.plugins = Pathname.new(File.join(Path.work, 'plugins'))
|
96
|
+
Path.packaging = Pathname.new(File.join(Path.work, 'packaging'))
|
97
|
+
Path.hdviper = Pathname.new(File.join(Path.work, 'hdviper'))
|
98
|
+
Path.hdviper_x264 = Pathname.new(File.join(Path.hdviper, 'x264'))
|
99
|
+
Path.hdviper_libtidx264 = Pathname.new(File.join(Path.hdviper_x264, 'libtidx264.a'))
|
100
|
+
Path.hdviper_x264_test_x264api = Pathname.new(File.join(Path.hdviper_x264, 'test', 'x264API'))
|
101
|
+
Path.hdviper_libx264api = Pathname.new(File.join(Path.hdviper_x264_test_x264api, 'libx264api.a'))
|
102
|
+
Path.build = Pathname.new(File.join(Path.work, 'build'))
|
103
|
+
Path.build_bin = Pathname.new(File.join(Path.build, 'bin'))
|
104
|
+
Path.build_gtkgui = Pathname.new(File.join(Path.build_bin, 'minisip_gtkgui'))
|
105
|
+
Path.build_include = Pathname.new(File.join(Path.build, 'include'))
|
106
|
+
Path.build_lib = Pathname.new(File.join(Path.build, 'lib'))
|
107
|
+
Path.build_lib_pkg_config = Pathname.new(File.join(Path.build_lib, 'pkgconfig'))
|
108
|
+
Path.build_share = Pathname.new(File.join(Path.build, 'share'))
|
109
|
+
Path.build_share_aclocal = Pathname.new(File.join(Path.build_share, 'aclocal'))
|
98
110
|
end
|
99
111
|
|
100
112
|
end
|
@@ -1 +1 @@
|
|
1
|
-
# encoding:
|
1
|
+
# -*- encoding: UTF-8 -*-
|
@@ -1,25 +1,25 @@
|
|
1
|
-
# encoding:
|
2
|
-
require
|
1
|
+
# -*- encoding: UTF-8 -*-
|
2
|
+
require 'csd/application/minisip/base'
|
3
3
|
|
4
4
|
module CSD
|
5
5
|
module Application
|
6
6
|
module Minisip
|
7
7
|
class Unix < Base
|
8
8
|
|
9
|
+
# OPERATION INTRODUCTION
|
10
|
+
|
9
11
|
def introduction
|
10
|
-
define_root_path
|
11
|
-
define_paths
|
12
12
|
UI.separator
|
13
|
-
UI.info "
|
14
|
-
|
15
|
-
|
13
|
+
UI.info " Libraries to process: ".green + libraries.join(', ').yellow
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
def compile
|
16
18
|
UI.separator
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
exit unless (Options.yes or UI.ask_yes_no("Continue?".red.bold, true))
|
22
|
-
end
|
19
|
+
UI.info "This operation will download and compile MiniSIP.".green.bold
|
20
|
+
introduction
|
21
|
+
compile!
|
22
|
+
run_minisip_gtk_gui
|
23
23
|
end
|
24
24
|
|
25
25
|
def package
|
@@ -29,11 +29,16 @@ module CSD
|
|
29
29
|
package!
|
30
30
|
end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
# OPERATIONS
|
33
|
+
|
34
|
+
def compile!
|
35
|
+
Cmd.mkdir Path.work
|
36
|
+
checkout_hdviper
|
37
|
+
make_hdviper
|
38
|
+
checkout_minisip
|
39
|
+
modify_minisip
|
40
|
+
checkout_plugins
|
41
|
+
make_minisip
|
37
42
|
end
|
38
43
|
|
39
44
|
def make_hdviper
|
@@ -44,12 +49,17 @@ module CSD
|
|
44
49
|
Cmd.run('make')
|
45
50
|
end
|
46
51
|
|
47
|
-
def
|
52
|
+
def create_build_dir
|
53
|
+
UI.info "Creating target build directories".green.bold
|
48
54
|
[Path.build, Path.build_include, Path.build_lib, Path.build_share, Path.build_share_aclocal].each { |target| Cmd.mkdir target }
|
49
|
-
|
55
|
+
end
|
56
|
+
|
57
|
+
def make_minisip
|
58
|
+
create_build_dir
|
59
|
+
libraries.each do |library|
|
50
60
|
directory = Pathname.new(File.join(Path.repository, library))
|
51
61
|
next if Options.only and !Options.only.include?(library)
|
52
|
-
if Cmd.cd(directory) or Options.
|
62
|
+
if Cmd.cd(directory) or Options.reveal
|
53
63
|
if Options.bootstrap
|
54
64
|
UI.info "Bootstrapping #{library}".green.bold
|
55
65
|
Cmd.run("./bootstrap -I #{Path.build_share_aclocal.enquote}")
|
@@ -58,14 +68,14 @@ module CSD
|
|
58
68
|
UI.info "Configuring #{library}".green.bold
|
59
69
|
individual_options = case library
|
60
70
|
when 'libminisip'
|
61
|
-
%Q{--enable-debug --enable-video --disable-mil --enable-decklink --enable-opengl --disable-sdl CPPFLAGS="-I#{Path.hdviper_x264_test_x264api} -I#{Path.hdviper_x264}"
|
71
|
+
%Q{--enable-debug --enable-video --disable-mil --enable-decklink --enable-opengl --disable-sdl CPPFLAGS="-I#{Path.hdviper_x264_test_x264api} -I#{Path.hdviper_x264}" #{ld_flags}}
|
62
72
|
#%Q{--enable-debug --enable-video --disable-mil --disable-decklink --enable-opengl --disable-sdl CPPFLAGS="-I#{Path.hdviper_x264}" LDFLAGS="#{File.join(Path.hdviper_x264, 'libx264.a')} -lpthread -lrt"}
|
63
73
|
when 'minisip'
|
64
74
|
%Q{--enable-debug --enable-video --enable-textui --enable-opengl}
|
65
75
|
else
|
66
76
|
''
|
67
77
|
end
|
68
|
-
Cmd.run(%Q{./configure #{individual_options} --prefix=#{Path.build.enquote} PKG_CONFIG_PATH=#{Path.build_lib_pkg_config.enquote} ACLOCAL_FLAGS=#{Path.build_share_aclocal} LD_LIBRARY_PATH=#{Path.build_lib.enquote}
|
78
|
+
Cmd.run(%Q{./configure #{individual_options} --prefix=#{Path.build.enquote} PKG_CONFIG_PATH=#{Path.build_lib_pkg_config.enquote} ACLOCAL_FLAGS=#{Path.build_share_aclocal} LD_LIBRARY_PATH=#{Path.build_lib.enquote}})
|
69
79
|
end
|
70
80
|
if Options.make
|
71
81
|
UI.info "Make #{library}".green.bold
|
@@ -84,17 +94,17 @@ module CSD
|
|
84
94
|
|
85
95
|
def package!
|
86
96
|
Cmd.mkdir(Path.packaging)
|
87
|
-
|
97
|
+
libraries.each do |library|
|
88
98
|
directory = Pathname.new(File.join(Path.repository, library))
|
89
99
|
next if Options.only and !Options.only.include?(library)
|
90
100
|
UI.info "Making #{library} with target dist".green.bold
|
91
|
-
if Cmd.cd(directory) or Options.
|
101
|
+
if Cmd.cd(directory) or Options.reveal
|
92
102
|
Cmd.run("make dist")
|
93
103
|
|
94
104
|
tar_filename = File.basename(Dir[File.join(directory, '*.tar.gz')].first)
|
95
105
|
Cmd.move(File.join(directory, tar_filename.to_s), Path.packaging) if tar_filename or Options.reveal
|
96
106
|
|
97
|
-
if Cmd.cd(Path.packaging) or Options.
|
107
|
+
if Cmd.cd(Path.packaging) or Options.reveal
|
98
108
|
Cmd.run("tar -xzf #{tar_filename}")
|
99
109
|
tar_dirname = File.basename(tar_filename.to_s, '.tar.gz')
|
100
110
|
if Cmd.cd(File.join(Path.packaging, tar_dirname))
|
@@ -125,7 +135,10 @@ module CSD
|
|
125
135
|
end
|
126
136
|
end
|
127
137
|
Cmd.cd Path.root
|
128
|
-
|
138
|
+
end
|
139
|
+
|
140
|
+
def run_minisip_gtk_gui
|
141
|
+
Cmd.run(Path.build_gtkgui, :die_on_failure => false)
|
129
142
|
end
|
130
143
|
|
131
144
|
end
|