csd 0.3.4 → 0.3.5
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/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
@@ -10,6 +10,9 @@ module CSD
|
|
10
10
|
#
|
11
11
|
DEBIAN_DEPENDENCIES = %w{ libnotify-bin libmng1 dkms }
|
12
12
|
|
13
|
+
# This method notifies users about following operation of AI, and initiates introduction method.
|
14
|
+
# The actual installation process is carried out by method install! for the purpose of keeping source code clean.
|
15
|
+
#
|
13
16
|
def install
|
14
17
|
UI.separator
|
15
18
|
UI.info "This operation will download and install the DeckLink device drivers.".green.bold
|
@@ -18,6 +21,12 @@ module CSD
|
|
18
21
|
install!
|
19
22
|
end
|
20
23
|
|
24
|
+
# This method installs DeckLink drivers by initiating corresponding method sequentially. It will download DeckLink
|
25
|
+
# drivers from official website, extract the dirver from tar file, select the suitable driver according to system
|
26
|
+
# architecture, and intall the DeckLink driver. After the installation process, it will add the driver into boot loader,
|
27
|
+
# so the driver can be loaded automatically at system booting up. It will also notify the user and clean up working
|
28
|
+
# directory when the whole operation is completed.
|
29
|
+
#
|
21
30
|
def install!
|
22
31
|
create_working_directory
|
23
32
|
define_relative_paths
|
@@ -29,6 +38,17 @@ module CSD
|
|
29
38
|
cleanup_working_directory
|
30
39
|
end
|
31
40
|
|
41
|
+
# This method is to provide general introductions to users, like current working directory.
|
42
|
+
#
|
43
|
+
# ====Options
|
44
|
+
# [debug] If debug option is set, users will be notified about system platform and current working module.
|
45
|
+
# [help] If help option is set, AI will provide all help information and cleanup in case the working directory was temporary and is empty.
|
46
|
+
# [reveal] If reveal option is set, AI will continue and process the next method.
|
47
|
+
# [yes] If yes option is set, AI will continue and process the next method.
|
48
|
+
#
|
49
|
+
# If users did not specify any option, AI will ask for their willingness to continue and process the next method
|
50
|
+
# after the users choose 'yes'. Or AI will terminate its operation.
|
51
|
+
#
|
32
52
|
def introduction
|
33
53
|
UI.info " Working directory: ".green.bold + Path.work.to_s.yellow
|
34
54
|
if Options.debug
|
@@ -46,6 +66,10 @@ module CSD
|
|
46
66
|
end
|
47
67
|
end
|
48
68
|
|
69
|
+
# This method downloads DeckLink driver from official BlackmagicDesign website. Before downloading the driver,
|
70
|
+
# AI will search the current working directory for the driver, if it is already there, AI will not download the
|
71
|
+
# driver again. Otherwise, AI will download the driver, and place it in the current working directory.
|
72
|
+
#
|
49
73
|
def download
|
50
74
|
if Path.tar.file?
|
51
75
|
UI.warn "The driver will not be downloaded, because it already exists: #{Path.tar.enquote}"
|
@@ -56,9 +80,10 @@ module CSD
|
|
56
80
|
end
|
57
81
|
end
|
58
82
|
|
83
|
+
# This method extracts the tar file of DeckLink driver.
|
59
84
|
def extract
|
60
85
|
if Path.packages.directory?
|
61
|
-
UI.warn "The tar file will not be extracted, because package
|
86
|
+
UI.warn "The tar file will not be extracted, because package repository already exist: #{Path.packages.enquote}"
|
62
87
|
else
|
63
88
|
UI.info "Extracting DeckLink drivers".green.bold
|
64
89
|
Cmd.mkdir Path.packages
|
@@ -92,7 +117,7 @@ module CSD
|
|
92
117
|
|
93
118
|
def define_relative_paths
|
94
119
|
blacklink_repository = 'http://www.blackmagic-design.com/downloads/software/'
|
95
|
-
decklink_basename = 'DeckLink_Linux_7.
|
120
|
+
decklink_basename = 'DeckLink_Linux_7.9'
|
96
121
|
decklink_extension = '.tar.gz'
|
97
122
|
Path.decklink_url = blacklink_repository + decklink_basename + decklink_extension
|
98
123
|
Path.tar = Pathname.new(File.join(Path.work, "#{decklink_basename + decklink_extension}"))
|
@@ -208,7 +208,7 @@ module CSD
|
|
208
208
|
def define_relative_paths
|
209
209
|
UI.debug "#{self.class}#define_relative_paths defines relative graphics paths now"
|
210
210
|
Path.radeon = Pathname.new(File.join(Path.work, 'radeon'))
|
211
|
-
Path.radeon_run = Pathname.new(File.join(Path.radeon, 'ati-driver-installer-10-
|
211
|
+
Path.radeon_run = Pathname.new(File.join(Path.radeon, 'ati-driver-installer-10-9-x86.x86_64.run'))
|
212
212
|
Path.geforce = Pathname.new(File.join(Path.work, 'geforce'))
|
213
213
|
Path.geforce_run = Pathname.new(File.join(Path.geforce, 'NVIDIA-Linux-x86-256.44.run.sh'))
|
214
214
|
end
|
@@ -200,7 +200,9 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
200
200
|
end
|
201
201
|
|
202
202
|
# The method creates a minimum configuration file for i2conf if it is not available.
|
203
|
-
# This configuration is based on
|
203
|
+
# This configuration is based on currently available carenet-se service. However, the user may modify the
|
204
|
+
# configuration file according to its own network scenario after installation process.
|
205
|
+
#
|
204
206
|
def configure_i2conf
|
205
207
|
if Path.i2conf_example_conf.file?
|
206
208
|
UI.warn "Creating no example configuration file, because it already exists: #{Path.i2conf_example_conf}. "
|
@@ -218,6 +220,11 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
218
220
|
Cmd.run %{notify-send --icon=i2conf_gnome "I2conf installation complete" "You are now ready to use your SIP MCU." }, :internal => true, :die_on_failure => false
|
219
221
|
end
|
220
222
|
|
223
|
+
# This method notifies users that i2conf installation process is completed successfully.
|
224
|
+
# It is AI's internal notification, which will be shown on the command line interface.
|
225
|
+
# Users can then start i2conf by clicking the icon in gnome menu or use command line interface.
|
226
|
+
# AI will also notify the users about possible modifications on the configuration file, according to users' network scenario.
|
227
|
+
#
|
221
228
|
def congratulations
|
222
229
|
cleanup_working_directory if Options.temp
|
223
230
|
UI.separator
|
@@ -233,6 +240,17 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
233
240
|
UI.separator
|
234
241
|
end
|
235
242
|
|
243
|
+
# This method provides general introductions to users, like current working directory.
|
244
|
+
#
|
245
|
+
# ====Options
|
246
|
+
# [debug] If debug option is set, users will be notified about system platform and current working module.
|
247
|
+
# [help] If help option is set, AI will provide all help information and cleanup in case the working directory was temporary and is empty.
|
248
|
+
# [reveal] If reveal option is set, AI will continue and process the next method.
|
249
|
+
# [yes] If yes option is set, AI will continue and process the next method.
|
250
|
+
#
|
251
|
+
# If users did not specify any option, AI will ask for their willingness to continue and process the next method
|
252
|
+
# after the users choose 'yes'. Or AI will terminate its operation.
|
253
|
+
#
|
236
254
|
def introduction
|
237
255
|
UI.info " Working directory: ".green.bold + Path.work.to_s.yellow
|
238
256
|
if Options.debug
|
@@ -250,6 +268,8 @@ Categories=Application;Internet;Network;Chat;AudioVideo}
|
|
250
268
|
end
|
251
269
|
end
|
252
270
|
|
271
|
+
# This method is to define relative path in i2conf module. This will make the program clean and easy to read.
|
272
|
+
#
|
253
273
|
def define_relative_paths
|
254
274
|
UI.debug "#{self.class}#define_relative_paths defines relative i2conf paths now"
|
255
275
|
Path.str_manager = Pathname.new(File.join(Path.work, 'libstrmanager'))
|
@@ -127,6 +127,7 @@ module CSD
|
|
127
127
|
Path.ffmpeg_libswscale = Pathname.new(File.join(Path.ffmpeg_repository, 'libswscale'))
|
128
128
|
Path.x264_repository = Pathname.new(File.join(Path.work, 'x264'))
|
129
129
|
Path.packaging = Pathname.new(File.join(Path.work, 'packaging'))
|
130
|
+
Path.packages = Pathname.new(File.join(Path.work, 'packages'))
|
130
131
|
Path.hdviper = Pathname.new(File.join(Path.work, 'hdviper'))
|
131
132
|
Path.hdviper_x264 = Pathname.new(File.join(Path.hdviper, 'x264'))
|
132
133
|
Path.hdviper_libtidx264 = Pathname.new(File.join(Path.hdviper_x264, 'libtidx264.a'))
|
@@ -19,7 +19,9 @@ module CSD
|
|
19
19
|
UI.info "This operation will make debian packages for all MiniSIP libraries.".green.bold
|
20
20
|
UI.separator
|
21
21
|
packing_introduction
|
22
|
+
remove_ffmpeg
|
22
23
|
Cmd.mkdir Path.packaging
|
24
|
+
Cmd.mkdir Path.packages
|
23
25
|
libraries.each do |library|
|
24
26
|
@library = library
|
25
27
|
@directory = Pathname.new(File.join(Path.repository, library))
|
@@ -72,13 +74,16 @@ module CSD
|
|
72
74
|
if Cmd.cd(Path.packaging)
|
73
75
|
package = File.basename(Dir[File.join(Path.packaging, "#{@library}*.deb")].first)
|
74
76
|
Cmd.run("sudo dpkg -i #{package}") if package or Options.reveal
|
77
|
+
Cmd.move(File.join(Path.packaging, package.to_s), Path.packages) if package or Options.reveal
|
75
78
|
end
|
76
79
|
else
|
77
80
|
if Cmd.cd(Path.packaging)
|
78
81
|
package = File.basename(Dir[File.join(Path.packaging, "#{@library}0*.deb")].first)
|
79
82
|
Cmd.run("sudo dpkg -i #{package}") if package or Options.reveal
|
83
|
+
Cmd.move(File.join(Path.packaging, package.to_s), Path.packages) if package or Options.reveal
|
80
84
|
dev_package = File.basename(Dir[File.join(Path.packaging, "#{@library}-dev*.deb")].first)
|
81
85
|
Cmd.run("sudo dpkg -i #{dev_package}") if dev_package or Options.reveal
|
86
|
+
Cmd.move(File.join(Path.packaging, dev_package.to_s), Path.packages) if dev_package or Options.reveal
|
82
87
|
end
|
83
88
|
end
|
84
89
|
end
|
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: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 5
|
10
|
+
version: 0.3.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Technology Transfer Alliance Team
|