csd 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/csd.gemspec +2 -2
- data/lib/csd/application/minisip/component/core.rb +5 -4
- data/lib/csd/application/minisip/component/network.rb +2 -2
- data/lib/csd/commands.rb +4 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
data/csd.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{csd}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Technology Transfer Alliance Team"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-30}
|
13
13
|
s.description = %q{CSD stands for Communication Systems Design and is a project of the Telecommunication Systems Laboratory (TSLab) of the Royal Institute of Technology in Stockholm, Sweden. Within CSD many software tools are used to build up various networks and services. This gem is supposed to automate processes to handle the compilation and installation of these software tools. Technology Transfer Alliance (TTA) is the project team, which maintains this code.}
|
14
14
|
s.email = %q{mtoday11@gmail.com}
|
15
15
|
s.executables = ["ai", "ttai"]
|
@@ -96,15 +96,16 @@ module CSD
|
|
96
96
|
# with the most recent FFmpeg version. In fact, MiniSIP won't compile if FFmpeg is present
|
97
97
|
# and this has not been modified.
|
98
98
|
# See http://www.howgeek.com/2010/03/01/ffmpeg-php-error-‘pix_fmt_rgba32’-undeclared-first-use-in-this-function
|
99
|
-
# and http://ffmpeg.org/doxygen/0.5/pixfmt_8h.html#33d341c4f443d24492a95fb7641d0986 for more information
|
99
|
+
# and http://ffmpeg.org/doxygen/0.5/pixfmt_8h.html#33d341c4f443d24492a95fb7641d0986 for more information
|
100
|
+
# about the FFmpeg pixel format constants.
|
100
101
|
#
|
101
102
|
def modify_source_code
|
102
103
|
UI.info "Fixing MiniSIP OpenGL GUI source code".green.bold
|
103
|
-
Cmd.replace
|
104
|
+
Cmd.replace Path.repository_open_gl_display, /(\s+)(string path = ")(.+)(".+)/, "\1\2#{Path.build}\4"
|
104
105
|
if Options.ffmpeg_first
|
105
106
|
UI.info "Fixing MiniSIP Audio/Video en/decoder source code".green.bold
|
106
|
-
Cmd.replace
|
107
|
-
Cmd.replace
|
107
|
+
Cmd.replace Path.repository_avcoder_cxx, 'PIX_FMT_RGBA32', 'PIX_FMT_RGB32'
|
108
|
+
Cmd.replace Path.repository_avdecoder_cxx, 'PIX_FMT_RGBA32', 'PIX_FMT_RGB32'
|
108
109
|
end
|
109
110
|
end
|
110
111
|
|
@@ -46,8 +46,8 @@ module CSD
|
|
46
46
|
Cmd.copy Path.sysctl_conf, Path.new_sysctl_conf
|
47
47
|
UI.info "Adding modifications to #{Path.new_sysctl_conf}".cyan
|
48
48
|
modifications = ['# Changes made by the AI'] + OPTIMUM_BUFFERS.map { |key, value| %{#{key} = #{value}} }
|
49
|
-
modifications = content + "\n" + modifications
|
50
|
-
Cmd.touch_and_replace_content Path.new_sysctl_conf, modifications
|
49
|
+
modifications = content + "\n" + modifications.join("\n")
|
50
|
+
Cmd.touch_and_replace_content Path.new_sysctl_conf, modifications, :internal => true
|
51
51
|
# We cannot use Cmd.copy here, because Cmd.copy has no superuser privileges.
|
52
52
|
# And since we are for sure on Ubuntu, these commands will work.
|
53
53
|
Cmd.run "sudo cp #{Path.sysctl_conf} #{Path.sysctl_conf_backup}", :announce_pwd => false
|
data/lib/csd/commands.rb
CHANGED
@@ -144,7 +144,9 @@ module CSD
|
|
144
144
|
# Otherwise it calls the replace function in the Replacer class.
|
145
145
|
#
|
146
146
|
def replace(filepath, pattern='', substitution='', params={}, &block)
|
147
|
+
# In case of a block, the second argument might be the params
|
147
148
|
params = pattern if pattern.is_a?(Hash)
|
149
|
+
# Setting default parameters
|
148
150
|
default_params = { :die_on_failure => true }
|
149
151
|
params = default_params.merge(params)
|
150
152
|
UI.info "Modifying contents of `#{filepath}´ as follows:".cyan
|
@@ -178,10 +180,10 @@ module CSD
|
|
178
180
|
begin
|
179
181
|
new_file_content = if params[:only_first_occurence]
|
180
182
|
UI.info " Replacing the first occurence of".yellow
|
181
|
-
File.read(self.filepath).sub(pattern
|
183
|
+
File.read(self.filepath).sub(pattern, substitution) unless Options.reveal
|
182
184
|
else
|
183
185
|
UI.info " Replacing".yellow
|
184
|
-
File.read(self.filepath).gsub(pattern
|
186
|
+
File.read(self.filepath).gsub(pattern, substitution) unless Options.reveal
|
185
187
|
end
|
186
188
|
UI.info " `#{pattern}´".blue
|
187
189
|
UI.info " with".yellow
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Technology Transfer Alliance Team
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-30 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|