dgd-tools 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/TODO +1 -0
- data/exe/dgd-manifest +2 -1
- data/lib/dgd-tools/manifest.rb +19 -9
- data/lib/dgd-tools/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf28b15e9e5aa7fe5c3d52835011e37c2b34f8ed839b59e6faea3ff9b23433d7
|
4
|
+
data.tar.gz: 66d8280067875fe8dfbb056e3288dec4471eba855937ee182dd24db70f30cd9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79fb4a29346b26de15f1cf4b6fe0c81ad845f45e24688b83f91f03c6aca61b691b6fb0698d64eb2fd633ae0f52d8df2bdb2226549ba524d748201b8f728adab2
|
7
|
+
data.tar.gz: 1f4ffe31a23b5f0302b0d47815c74a4484847cfd9afce393d37c85515be981943447d5807eef11bca221269c2cde7c3137e5868561f306e8d83035ac5d03dd5b
|
data/Gemfile.lock
CHANGED
data/exe/dgd-manifest
CHANGED
@@ -24,7 +24,8 @@ when "install"
|
|
24
24
|
repo.manifest_file("dgd.manifest")
|
25
25
|
repo.assemble_app(".")
|
26
26
|
when "server"
|
27
|
-
puts "Starting DGD server...
|
27
|
+
puts "Starting DGD server..."
|
28
|
+
DGD::Manifest.system_call("~/.dgd-tools/dgd/bin/dgd dgd.config")
|
28
29
|
else
|
29
30
|
raise "Unrecognised #{$0} command: #{ARGV[0].inspect}!"
|
30
31
|
end
|
data/lib/dgd-tools/manifest.rb
CHANGED
@@ -9,7 +9,12 @@ module DGD; end
|
|
9
9
|
module DGD::Manifest
|
10
10
|
DGD_BUILD_COMMAND = %(make DEFINES='-DUINDEX_TYPE="unsigned int" -DUINDEX_MAX=UINT_MAX -DEINDEX_TYPE="unsigned short" -DEINDEX_MAX=USHRT_MAX -DSSIZET_TYPE="unsigned int" -DSSIZET_MAX=1048576' install
|
11
11
|
)
|
12
|
-
|
12
|
+
KERNEL_PATH_MAP = {
|
13
|
+
"src/kernel" => "/kernel",
|
14
|
+
"src/include" => "/include",
|
15
|
+
"src/doc/kernel" => "/doc/kernel"
|
16
|
+
}
|
17
|
+
KERNEL_PATHS = KERNEL_PATH_MAP.values
|
13
18
|
DEFAULT_KERNELLIB_URL = "https://github.com/ChatTheatre/kernellib"
|
14
19
|
|
15
20
|
GENERATED_ROOT = ".root"
|
@@ -69,6 +74,8 @@ module DGD::Manifest
|
|
69
74
|
write_config_file("#{location}/dgd.config")
|
70
75
|
specs = @manifest_file.specs
|
71
76
|
|
77
|
+
copies = []
|
78
|
+
|
72
79
|
specs.each do |spec|
|
73
80
|
git_repo = spec.source
|
74
81
|
git_repo.use_details(spec.source_details)
|
@@ -76,12 +83,16 @@ module DGD::Manifest
|
|
76
83
|
spec.paths.each do |from, to|
|
77
84
|
from_path = "#{git_repo.local_dir}/#{from}"
|
78
85
|
to_path = "#{dgd_root}/#{to}"
|
79
|
-
|
80
|
-
FileUtils.mkdir_p to_dir
|
81
|
-
STDERR.puts "COPYING #{from_path.inspect} #{to_path.inspect}"
|
82
|
-
FileUtils.cp_r(from_path, to_path)
|
86
|
+
copies << [from_path, to_path]
|
83
87
|
end
|
84
88
|
end
|
89
|
+
|
90
|
+
copies.sort_by { |c| c[1] }.each do |from_path, to_path|
|
91
|
+
to_dir = to_path.split("/")[0..-2].join("/")
|
92
|
+
FileUtils.mkdir_p to_dir
|
93
|
+
STDERR.puts "COPYING #{from_path.inspect} #{to_path.inspect}"
|
94
|
+
FileUtils.cp_r(from_path, to_path)
|
95
|
+
end
|
85
96
|
end
|
86
97
|
|
87
98
|
def write_config_file(path)
|
@@ -93,7 +104,7 @@ telnet_port = ([
|
|
93
104
|
"*":50100 /* telnet port number */
|
94
105
|
]);
|
95
106
|
binary_port = ([
|
96
|
-
"*":50110
|
107
|
+
"*":50110 /* Failsafe */
|
97
108
|
]); /* binary ports */
|
98
109
|
directory = "./#{GENERATED_ROOT}";
|
99
110
|
|
@@ -196,10 +207,9 @@ CONTENTS
|
|
196
207
|
puts "This dgd.manifest needs the default Kernel Library."
|
197
208
|
# This app has specified no kernellib paths -- add them
|
198
209
|
git_repo = @repo.git_repo(DEFAULT_KERNELLIB_URL)
|
199
|
-
kl_paths = { "src/kernel" => "/kernel", "src/include/kernel" => "/include/kernel", "src/doc/kernel" => "/doc/kernel" }
|
200
210
|
klib_spec = GoodsSpec.new @repo, name: "default Kernel Library",
|
201
|
-
source: git_repo, paths:
|
202
|
-
specs.
|
211
|
+
source: git_repo, paths: KERNEL_PATH_MAP
|
212
|
+
specs.unshift klib_spec
|
203
213
|
end
|
204
214
|
|
205
215
|
nil
|
data/lib/dgd-tools/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dgd-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Gibbs
|
@@ -25,6 +25,7 @@ files:
|
|
25
25
|
- Gemfile.lock
|
26
26
|
- README.md
|
27
27
|
- Rakefile
|
28
|
+
- TODO
|
28
29
|
- bin/console
|
29
30
|
- bin/setup
|
30
31
|
- dgd-tools.gemspec
|