sixarma 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +167 -0
- data/README +3 -0
- data/Rakefile +48 -0
- data/lib/sixarma/config/pbotools.rb +6 -0
- data/lib/sixarma/config/sign.rb +3 -0
- data/lib/sixarma/pbotools.rb +52 -0
- data/lib/sixarma/sign.rb +44 -0
- data/lib/sixarma.rb +10 -0
- metadata +70 -0
data/LICENSE
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
== sixarma
|
2
|
+
|
3
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
4
|
+
Version 3, 29 June 2007
|
5
|
+
|
6
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
7
|
+
Everyone is permitted to copy and distribute verbatim copies
|
8
|
+
of this license document, but changing it is not allowed.
|
9
|
+
|
10
|
+
|
11
|
+
This version of the GNU Lesser General Public License incorporates
|
12
|
+
the terms and conditions of version 3 of the GNU General Public
|
13
|
+
License, supplemented by the additional permissions listed below.
|
14
|
+
|
15
|
+
0. Additional Definitions.
|
16
|
+
|
17
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
18
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
19
|
+
General Public License.
|
20
|
+
|
21
|
+
"The Library" refers to a covered work governed by this License,
|
22
|
+
other than an Application or a Combined Work as defined below.
|
23
|
+
|
24
|
+
An "Application" is any work that makes use of an interface provided
|
25
|
+
by the Library, but which is not otherwise based on the Library.
|
26
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
27
|
+
of using an interface provided by the Library.
|
28
|
+
|
29
|
+
A "Combined Work" is a work produced by combining or linking an
|
30
|
+
Application with the Library. The particular version of the Library
|
31
|
+
with which the Combined Work was made is also called the "Linked
|
32
|
+
Version".
|
33
|
+
|
34
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
35
|
+
Corresponding Source for the Combined Work, excluding any source code
|
36
|
+
for portions of the Combined Work that, considered in isolation, are
|
37
|
+
based on the Application, and not on the Linked Version.
|
38
|
+
|
39
|
+
The "Corresponding Application Code" for a Combined Work means the
|
40
|
+
object code and/or source code for the Application, including any data
|
41
|
+
and utility programs needed for reproducing the Combined Work from the
|
42
|
+
Application, but excluding the System Libraries of the Combined Work.
|
43
|
+
|
44
|
+
1. Exception to Section 3 of the GNU GPL.
|
45
|
+
|
46
|
+
You may convey a covered work under sections 3 and 4 of this License
|
47
|
+
without being bound by section 3 of the GNU GPL.
|
48
|
+
|
49
|
+
2. Conveying Modified Versions.
|
50
|
+
|
51
|
+
If you modify a copy of the Library, and, in your modifications, a
|
52
|
+
facility refers to a function or data to be supplied by an Application
|
53
|
+
that uses the facility (other than as an argument passed when the
|
54
|
+
facility is invoked), then you may convey a copy of the modified
|
55
|
+
version:
|
56
|
+
|
57
|
+
a) under this License, provided that you make a good faith effort to
|
58
|
+
ensure that, in the event an Application does not supply the
|
59
|
+
function or data, the facility still operates, and performs
|
60
|
+
whatever part of its purpose remains meaningful, or
|
61
|
+
|
62
|
+
b) under the GNU GPL, with none of the additional permissions of
|
63
|
+
this License applicable to that copy.
|
64
|
+
|
65
|
+
3. Object Code Incorporating Material from Library Header Files.
|
66
|
+
|
67
|
+
The object code form of an Application may incorporate material from
|
68
|
+
a header file that is part of the Library. You may convey such object
|
69
|
+
code under terms of your choice, provided that, if the incorporated
|
70
|
+
material is not limited to numerical parameters, data structure
|
71
|
+
layouts and accessors, or small macros, inline functions and templates
|
72
|
+
(ten or fewer lines in length), you do both of the following:
|
73
|
+
|
74
|
+
a) Give prominent notice with each copy of the object code that the
|
75
|
+
Library is used in it and that the Library and its use are
|
76
|
+
covered by this License.
|
77
|
+
|
78
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
79
|
+
document.
|
80
|
+
|
81
|
+
4. Combined Works.
|
82
|
+
|
83
|
+
You may convey a Combined Work under terms of your choice that,
|
84
|
+
taken together, effectively do not restrict modification of the
|
85
|
+
portions of the Library contained in the Combined Work and reverse
|
86
|
+
engineering for debugging such modifications, if you also do each of
|
87
|
+
the following:
|
88
|
+
|
89
|
+
a) Give prominent notice with each copy of the Combined Work that
|
90
|
+
the Library is used in it and that the Library and its use are
|
91
|
+
covered by this License.
|
92
|
+
|
93
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
94
|
+
document.
|
95
|
+
|
96
|
+
c) For a Combined Work that displays copyright notices during
|
97
|
+
execution, include the copyright notice for the Library among
|
98
|
+
these notices, as well as a reference directing the user to the
|
99
|
+
copies of the GNU GPL and this license document.
|
100
|
+
|
101
|
+
d) Do one of the following:
|
102
|
+
|
103
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
104
|
+
License, and the Corresponding Application Code in a form
|
105
|
+
suitable for, and under terms that permit, the user to
|
106
|
+
recombine or relink the Application with a modified version of
|
107
|
+
the Linked Version to produce a modified Combined Work, in the
|
108
|
+
manner specified by section 6 of the GNU GPL for conveying
|
109
|
+
Corresponding Source.
|
110
|
+
|
111
|
+
1) Use a suitable shared library mechanism for linking with the
|
112
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
113
|
+
a copy of the Library already present on the user's computer
|
114
|
+
system, and (b) will operate properly with a modified version
|
115
|
+
of the Library that is interface-compatible with the Linked
|
116
|
+
Version.
|
117
|
+
|
118
|
+
e) Provide Installation Information, but only if you would otherwise
|
119
|
+
be required to provide such information under section 6 of the
|
120
|
+
GNU GPL, and only to the extent that such information is
|
121
|
+
necessary to install and execute a modified version of the
|
122
|
+
Combined Work produced by recombining or relinking the
|
123
|
+
Application with a modified version of the Linked Version. (If
|
124
|
+
you use option 4d0, the Installation Information must accompany
|
125
|
+
the Minimal Corresponding Source and Corresponding Application
|
126
|
+
Code. If you use option 4d1, you must provide the Installation
|
127
|
+
Information in the manner specified by section 6 of the GNU GPL
|
128
|
+
for conveying Corresponding Source.)
|
129
|
+
|
130
|
+
5. Combined Libraries.
|
131
|
+
|
132
|
+
You may place library facilities that are a work based on the
|
133
|
+
Library side by side in a single library together with other library
|
134
|
+
facilities that are not Applications and are not covered by this
|
135
|
+
License, and convey such a combined library under terms of your
|
136
|
+
choice, if you do both of the following:
|
137
|
+
|
138
|
+
a) Accompany the combined library with a copy of the same work based
|
139
|
+
on the Library, uncombined with any other library facilities,
|
140
|
+
conveyed under the terms of this License.
|
141
|
+
|
142
|
+
b) Give prominent notice with the combined library that part of it
|
143
|
+
is a work based on the Library, and explaining where to find the
|
144
|
+
accompanying uncombined form of the same work.
|
145
|
+
|
146
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
147
|
+
|
148
|
+
The Free Software Foundation may publish revised and/or new versions
|
149
|
+
of the GNU Lesser General Public License from time to time. Such new
|
150
|
+
versions will be similar in spirit to the present version, but may
|
151
|
+
differ in detail to address new problems or concerns.
|
152
|
+
|
153
|
+
Each version is given a distinguishing version number. If the
|
154
|
+
Library as you received it specifies that a certain numbered version
|
155
|
+
of the GNU Lesser General Public License "or any later version"
|
156
|
+
applies to it, you have the option of following the terms and
|
157
|
+
conditions either of that published version or of any later version
|
158
|
+
published by the Free Software Foundation. If the Library as you
|
159
|
+
received it does not specify a version number of the GNU Lesser
|
160
|
+
General Public License, you may choose any version of the GNU Lesser
|
161
|
+
General Public License ever published by the Free Software Foundation.
|
162
|
+
|
163
|
+
If the Library as you received it specifies that a proxy can decide
|
164
|
+
whether future versions of the GNU Lesser General Public License shall
|
165
|
+
apply, that proxy's public statement of acceptance of any version is
|
166
|
+
permanent authorization for you to choose that version for the
|
167
|
+
Library.
|
data/README
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
#
|
2
|
+
# To change this template, choose Tools | Templates
|
3
|
+
# and open the template in the editor.
|
4
|
+
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'rake'
|
8
|
+
require 'rake/clean'
|
9
|
+
require 'rake/gempackagetask'
|
10
|
+
require 'rake/rdoctask'
|
11
|
+
require 'rake/testtask'
|
12
|
+
|
13
|
+
spec = Gem::Specification.new do |s|
|
14
|
+
s.name = 'sixarma'
|
15
|
+
s.rubyforge_project = s.name
|
16
|
+
s.version = '0.4.3'
|
17
|
+
s.has_rdoc = true
|
18
|
+
s.extra_rdoc_files = ['README', 'LICENSE']
|
19
|
+
s.summary = 'Basic function library for the Armed Assault game by Bohemia Interactive Studios'
|
20
|
+
s.description = s.summary
|
21
|
+
s.author = 'Sickboy'
|
22
|
+
s.email = 'sb@6thsense.eu'
|
23
|
+
s.homepage = 'http://6thsense.eu'
|
24
|
+
# s.executables = ['your_executable_here']
|
25
|
+
s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*.rb") + Dir.glob("{bin,lib,spec}/**/*.yaml")
|
26
|
+
s.require_path = "lib"
|
27
|
+
s.bindir = "bin"
|
28
|
+
s.add_dependency('sixcore', '>= 0.3.0')
|
29
|
+
end
|
30
|
+
|
31
|
+
Rake::GemPackageTask.new(spec) do |p|
|
32
|
+
p.gem_spec = spec
|
33
|
+
p.need_tar = true
|
34
|
+
p.need_zip = true
|
35
|
+
end
|
36
|
+
|
37
|
+
Rake::RDocTask.new do |rdoc|
|
38
|
+
files =['README', 'LICENSE', 'lib/**/*.rb']
|
39
|
+
rdoc.rdoc_files.add(files)
|
40
|
+
rdoc.main = "README" # page to start on
|
41
|
+
rdoc.title = "sixarma Docs"
|
42
|
+
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
|
43
|
+
rdoc.options << '--line-numbers'
|
44
|
+
end
|
45
|
+
|
46
|
+
Rake::TestTask.new do |t|
|
47
|
+
t.test_files = FileList['test/**/*.rb']
|
48
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
BINPBO = "C:\\Program Files (x86)\\Bohemia Interactive\\Tools\\BinPBO Personal Edition\\BINPbo.exe"
|
2
|
+
TEMPPATH = "H:\\temp\\binpbo"
|
3
|
+
INCLUDEFILE = "I:\\ACE\\trunk\\build-scripts\\_include.txt"
|
4
|
+
BINPBOPARAMSBIN = "-BINARIZE -CLEAR -TEMP #{TEMPPATH} -DEBUG -INCLUDE #{INCLUDEFILE}"
|
5
|
+
BINPBOPARAMSPBO = "-CLEAR -TEMP #{TEMPPATH} -DEBUG"
|
6
|
+
PREFIX_FILE = "$PBOPREFIX$"
|
@@ -0,0 +1,52 @@
|
|
1
|
+
=begin
|
2
|
+
6thSense.eu ArmA BuildTools (PboTools), by Sickboy (sb_at_6thSense.eu)
|
3
|
+
=end
|
4
|
+
require 'sixcore'
|
5
|
+
require 'sixarma'
|
6
|
+
module SixArma
|
7
|
+
module PboTools
|
8
|
+
require 'sixarma/config/pbotools'
|
9
|
+
|
10
|
+
module_function
|
11
|
+
# Checks prefix, returns read from file prefix, empty prefix, or given prefix
|
12
|
+
# source:: Source folder to look for PREFIX_FILE file
|
13
|
+
# prefix:: String: Empty, "__AUTO__" or specific prefix can be given
|
14
|
+
def check_prefix(source, prefix)
|
15
|
+
return prefix unless prefix == "__AUTO__"
|
16
|
+
if FileTest.exist?("#{source}\\#{PREFIX_FILE}")
|
17
|
+
pf = File.open("#{source}\\#{PREFIX_FILE}") do |file|
|
18
|
+
file.readlines.map { |line| SixCore::clean(line) }
|
19
|
+
end
|
20
|
+
if pf[0].empty?
|
21
|
+
return ""
|
22
|
+
else
|
23
|
+
return pf[0]
|
24
|
+
end
|
25
|
+
else
|
26
|
+
return ""
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Binarizes addon
|
31
|
+
# source:: source folder incl addon name
|
32
|
+
# destination:: destination folder without addon name
|
33
|
+
# prf:: Prefix, see check_prefix
|
34
|
+
def binarize(source, destination, prf = "")
|
35
|
+
params = BINPBOPARAMSBIN
|
36
|
+
prefix = check_prefix(source, prf)
|
37
|
+
params += " -PREFIX #{prefix}" unless prefix.empty?
|
38
|
+
SixCore::proc_cmd("#{BINPBO} \"#{source}\" \"#{destination}\" #{params}")
|
39
|
+
end
|
40
|
+
|
41
|
+
# Packs addon
|
42
|
+
# source:: source folder incl addon name
|
43
|
+
# destination:: destination folder without addon name
|
44
|
+
# prf:: Prefix, see check_prefix
|
45
|
+
def pack(source, destination, prf = "")
|
46
|
+
params = BINPBOPARAMSPBO
|
47
|
+
prefix = check_prefix(source, prf)
|
48
|
+
params += " -PREFIX #{prefix}" unless prefix.empty?
|
49
|
+
SixCore::proc_cmd("#{BINPBO} \"#{source}\" \"#{destination}\" #{params}")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/sixarma/sign.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
=begin
|
2
|
+
6thSense.eu ArmA BuildTools (Sign), by Sickboy (sb_at_6thSense.eu)
|
3
|
+
=end
|
4
|
+
require "sixarma"
|
5
|
+
|
6
|
+
module SixArma
|
7
|
+
module Sign
|
8
|
+
require "sixarma/config/sign"
|
9
|
+
COMPONENT = "SixArma::Sign"
|
10
|
+
|
11
|
+
module_function
|
12
|
+
# Creates signature file (.bisign and .biprivatekey), unless it exists already.
|
13
|
+
# Returns created files
|
14
|
+
# name:: String name of key
|
15
|
+
def create(name)
|
16
|
+
SixCore::debug("Creating Signature", COMPONENT, name)
|
17
|
+
|
18
|
+
# create the key
|
19
|
+
signfile = "#{name}.biprivatekey"
|
20
|
+
signkey = "#{name}.bikey"
|
21
|
+
unless FileTest.exist?("#{SIGNPATH}\\#{signfile}")
|
22
|
+
Dir.chdir(SIGNPATH)
|
23
|
+
SixCore::proc_cmd("#{DSCREATE} #{name}")
|
24
|
+
Dir.chdir(SixCore::MAINDIR)
|
25
|
+
end
|
26
|
+
return [signfile, signkey, SIGNPATH]
|
27
|
+
end
|
28
|
+
|
29
|
+
# Signs files in destination
|
30
|
+
# destination:: Destination folder
|
31
|
+
# signfile:: Signature file name
|
32
|
+
def sign(destination, signfile)
|
33
|
+
SixCore::debug("Signing...", COMPONENT, [destination, signfile])
|
34
|
+
if signfile.empty?
|
35
|
+
return 1
|
36
|
+
else
|
37
|
+
Dir.chdir(destination)
|
38
|
+
Dir.glob("*.pbo") { |file| SixCore::proc_cmd "#{DSSIGN} #{SIGNPATH}\\#{signfile} #{file}" }
|
39
|
+
Dir.chdir(SixCore::MAINDIR)
|
40
|
+
return 0
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/lib/sixarma.rb
ADDED
metadata
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sixarma
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sickboy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-11-29 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: sixcore
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.3.0
|
24
|
+
version:
|
25
|
+
description: Basic function library for the Armed Assault game by Bohemia Interactive Studios
|
26
|
+
email: sb@6thsense.eu
|
27
|
+
executables: []
|
28
|
+
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- README
|
33
|
+
- LICENSE
|
34
|
+
files:
|
35
|
+
- LICENSE
|
36
|
+
- README
|
37
|
+
- Rakefile
|
38
|
+
- lib/sixarma/config/pbotools.rb
|
39
|
+
- lib/sixarma/config/sign.rb
|
40
|
+
- lib/sixarma/pbotools.rb
|
41
|
+
- lib/sixarma/sign.rb
|
42
|
+
- lib/sixarma.rb
|
43
|
+
has_rdoc: true
|
44
|
+
homepage: http://6thsense.eu
|
45
|
+
post_install_message:
|
46
|
+
rdoc_options: []
|
47
|
+
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "0"
|
55
|
+
version:
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: "0"
|
61
|
+
version:
|
62
|
+
requirements: []
|
63
|
+
|
64
|
+
rubyforge_project: sixarma
|
65
|
+
rubygems_version: 1.3.1
|
66
|
+
signing_key:
|
67
|
+
specification_version: 2
|
68
|
+
summary: Basic function library for the Armed Assault game by Bohemia Interactive Studios
|
69
|
+
test_files: []
|
70
|
+
|