rake-delphi 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +26 -0
- data/lib/rake/delphi/dcc32.rb +2 -1
- data/lib/rake/delphi/dcc32tool.rb +1 -1
- data/lib/rake/delphi/envvariables.rb +1 -1
- data/lib/rake/delphi/project.rb +1 -1
- data/lib/rake/delphi/tool.rb +13 -8
- data/lib/rake/delphi/version.rb +1 -1
- data/test/helpers/verinfo.rb +2 -2
- data/test/resources/testproject/Rakefile.rb +1 -1
- data/test/resources/testproject-android/Rakefile.rb +1 -1
- data/test/test-delphi-android.rb +2 -1
- data/test/test-git.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d30171a3216bfeb302fbb9726822d42d188d7e9
|
4
|
+
data.tar.gz: bf6a445410c43ad323741d99daba4834d48b90e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 864baa63a25a053a866354018d541db9016a9f13aa71e629ad43fbb4683067ac8384240eee9d698deed1969eda9b1ce33bf6dfd5b7890c1ad10d10dad04c251a
|
7
|
+
data.tar.gz: 523a8f8b63b99ef7f7c4d2ae36d03f293ed4cbb7c242d1bfc6404bb6b24e0dde769c3022c065627bde421f2338b991e69535efb14d962ae2e02754ae7f484257
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rake-delphi (0.0.14)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
apktools (0.6.0)
|
10
|
+
rubyzip
|
11
|
+
inifile (3.0.0)
|
12
|
+
rake (10.0.4)
|
13
|
+
rubyzip (0.9.9)
|
14
|
+
xml-simple (1.1.4)
|
15
|
+
|
16
|
+
PLATFORMS
|
17
|
+
ruby
|
18
|
+
|
19
|
+
DEPENDENCIES
|
20
|
+
apktools
|
21
|
+
bundler (~> 1.3)
|
22
|
+
inifile
|
23
|
+
rake (~> 10.0.4)
|
24
|
+
rake-delphi!
|
25
|
+
rubyzip (~> 0.9.9)
|
26
|
+
xml-simple
|
data/lib/rake/delphi/dcc32.rb
CHANGED
@@ -91,7 +91,7 @@ module Rake
|
|
91
91
|
# enable appropriate PAClientTask
|
92
92
|
application[name + ':post'].needed = post_needed
|
93
93
|
# for XE and above set default aliases and namespaces
|
94
|
-
if
|
94
|
+
if EnvVariables.delphi_version >= DELPHI_VERSION_XE
|
95
95
|
@aliases = 'Generics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE'
|
96
96
|
@namespaces = 'Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap'
|
97
97
|
Logger.trace(Logger::TRACE, 'Aliases and namespaces are set for Delphi XE')
|
@@ -129,6 +129,7 @@ module Rake
|
|
129
129
|
|
130
130
|
def implicitpaths
|
131
131
|
ipaths = ['.', '..']
|
132
|
+
Logger.trace(Logger::TRACE, 'Using library paths? %s' + (@uselibrarypath ? 'YES' : 'NO'))
|
132
133
|
ipaths |= delphilibs if @uselibrarypath
|
133
134
|
_paths(ipaths)
|
134
135
|
end
|
@@ -26,7 +26,7 @@ module Rake
|
|
26
26
|
|
27
27
|
def readLibraryPaths(platform, platform_stripped)
|
28
28
|
Logger.trace(Logger::TRACE, 'Reading library paths for platform: ' + platform.to_s)
|
29
|
-
warn "WARNING! You are using Delphi XE or above but no platform defined!" if ENV['DELPHI_VERSION'].to_i >=
|
29
|
+
warn "WARNING! You are using Delphi XE or above but no platform defined!" if ENV['DELPHI_VERSION'].to_i >= DELPHI_VERSION_XE && ! platform
|
30
30
|
|
31
31
|
platform = platform.to_s != '' ? '\\' + platform : ''
|
32
32
|
# platform not used for old Delphis 'SearchPath'
|
data/lib/rake/delphi/project.rb
CHANGED
@@ -42,7 +42,7 @@ module Rake
|
|
42
42
|
|
43
43
|
def init(module_name, rake_file, vars, level = 1)
|
44
44
|
@level = level
|
45
|
-
module_name = module_name.dup.
|
45
|
+
module_name = module_name.dup.shift.to_s
|
46
46
|
self[:projectlabel] = eval("#{module_name}::PROJECT_NAME")
|
47
47
|
projectfile = eval("#{module_name}::PROJECT_FILE")
|
48
48
|
self[:projectfile] = File.dirname2(rake_file) + File.separator + projectfile
|
data/lib/rake/delphi/tool.rb
CHANGED
@@ -7,6 +7,11 @@ require 'rake/delphi/envvariables'
|
|
7
7
|
|
8
8
|
module Rake
|
9
9
|
module Delphi
|
10
|
+
DELPHI_VERSION_7 = 9
|
11
|
+
DELPHI_VERSION_2006 = 11
|
12
|
+
DELPHI_VERSION_2010 = 13
|
13
|
+
DELPHI_VERSION_XE = 14
|
14
|
+
DELPHI_VERSION_XE5 = 18
|
10
15
|
class CustomDelphiTool < CustomExec
|
11
16
|
DelphiRegRoot = 'SOFTWARE\\Borland\\Delphi'
|
12
17
|
BDSRegRoot = 'SOFTWARE\\Borland\\BDS'
|
@@ -44,9 +49,9 @@ module Rake
|
|
44
49
|
end
|
45
50
|
|
46
51
|
def versionInfoClass
|
47
|
-
return @@version.to_f <
|
48
|
-
@@version.to_f <
|
49
|
-
@@version.to_f <
|
52
|
+
return @@version.to_f < DELPHI_VERSION_2006 ? BDSVersionInfo : \
|
53
|
+
@@version.to_f < DELPHI_VERSION_2010 ? RAD2007VersionInfo : \
|
54
|
+
@@version.to_f < DELPHI_VERSION_XE ? RAD2010VersionInfo : XEVersionInfo
|
50
55
|
end
|
51
56
|
|
52
57
|
def self.readUserOption(key, name, ver)
|
@@ -73,7 +78,7 @@ module Rake
|
|
73
78
|
end
|
74
79
|
|
75
80
|
def self.version4version(version)
|
76
|
-
if version.to_f >=
|
81
|
+
if version.to_f >= DELPHI_VERSION_7
|
77
82
|
version = format('%.1f', version.to_f - 6)
|
78
83
|
end
|
79
84
|
if !version["."]
|
@@ -83,12 +88,12 @@ module Rake
|
|
83
88
|
end
|
84
89
|
|
85
90
|
def self.rootForVersion(version)
|
86
|
-
if version.to_f <
|
91
|
+
if version.to_f < DELPHI_VERSION_7
|
87
92
|
regRoot = DelphiRegRoot
|
88
93
|
else
|
89
|
-
if version.to_f
|
94
|
+
if version.to_f <= DELPHI_VERSION_2006
|
90
95
|
regRoot = BDSRegRoot
|
91
|
-
elsif version.to_f <
|
96
|
+
elsif version.to_f < DELPHI_VERSION_XE
|
92
97
|
regRoot = EDSRegRoot
|
93
98
|
else
|
94
99
|
regRoot = EmbarcaderoRegRoot
|
@@ -124,7 +129,7 @@ module Rake
|
|
124
129
|
end
|
125
130
|
|
126
131
|
def self.find(failIfNotFound = false)
|
127
|
-
v = EnvVariables.delphi_version
|
132
|
+
v = EnvVariables.delphi_version.to_s
|
128
133
|
if ENV['DELPHI_DIR']
|
129
134
|
Logger.trace(Logger::DEBUG, 'DELPHI_DIR is set: ' + ENV['DELPHI_DIR'])
|
130
135
|
# append trailing path delimiter
|
data/lib/rake/delphi/version.rb
CHANGED
data/test/helpers/verinfo.rb
CHANGED
@@ -22,7 +22,7 @@ class TestVerInfo < Test::Unit::TestCase
|
|
22
22
|
|
23
23
|
protected
|
24
24
|
def delphi_version
|
25
|
-
return Rake::Delphi::EnvVariables.delphi_version
|
25
|
+
return Rake::Delphi::EnvVariables.delphi_version.to_s
|
26
26
|
end
|
27
27
|
|
28
28
|
def prepare_ver_info_file?
|
@@ -39,7 +39,7 @@ protected
|
|
39
39
|
|
40
40
|
public
|
41
41
|
def setup
|
42
|
-
@saved_delphi_version = Rake::Delphi::EnvVariables.delphi_version
|
42
|
+
@saved_delphi_version = Rake::Delphi::EnvVariables.delphi_version.to_s
|
43
43
|
ENV['DELPHI_VERSION'] = delphi_version
|
44
44
|
|
45
45
|
template_ext = DPROJ_VERSIONS[delphi_version]
|
@@ -32,7 +32,7 @@ namespace :test do
|
|
32
32
|
_task = Rake::Task['test:compile']
|
33
33
|
dpr = Rake.application.define_task(Rake::Delphi::Project, (_task.name + ':delphi').to_sym)
|
34
34
|
dpr[:resources_additional] = 'resources' if opts[:useresources]
|
35
|
-
if
|
35
|
+
if Rake::Delphi::EnvVariables.delphi_version >= Rake::Delphi::DELPHI_VERSION_XE
|
36
36
|
dpr[:platform] = 'Win32'
|
37
37
|
end
|
38
38
|
options = opts[:options] || {}
|
@@ -26,7 +26,7 @@ module TestAndroidModule
|
|
26
26
|
|
27
27
|
desc 'Preparation'
|
28
28
|
task :prepare, :useresources, :options do |t, opts|
|
29
|
-
fail 'Cannot compile this project with Delphi below XE5' if
|
29
|
+
fail 'Cannot compile this project with Delphi below XE5' if Rake::Delphi::EnvVariables.delphi_version < Rake::Delphi::DELPHI_VERSION_XE5
|
30
30
|
_task = Rake::Task['test_android:compile']
|
31
31
|
dpr = Rake.application.define_task(Rake::Delphi::Project, (_task.name + ':delphi').to_sym)
|
32
32
|
dpr[:resources_additional] = 'resources' if opts[:useresources]
|
data/test/test-delphi-android.rb
CHANGED
@@ -5,6 +5,7 @@ require 'rake'
|
|
5
5
|
require 'fileutils'
|
6
6
|
require 'test/unit'
|
7
7
|
require 'rake/delphi/dccaarmtool'
|
8
|
+
require 'rake/delphi/envvariables'
|
8
9
|
require 'rake/helpers/unittest'
|
9
10
|
require 'rake/helpers/raketask'
|
10
11
|
require 'helpers/consts'
|
@@ -100,7 +101,7 @@ module DelphiAndroidTests
|
|
100
101
|
|
101
102
|
public
|
102
103
|
def setup
|
103
|
-
fail 'Cannot compile this project with Delphi below XE5' if
|
104
|
+
fail 'Cannot compile this project with Delphi below XE5' if Rake::Delphi::EnvVariables.delphi_version < Rake::Delphi::DELPHI_VERSION_XE5
|
104
105
|
Rake::Delphi::DccARMTool.reinit
|
105
106
|
ENV['DELPHI_DIR'] = nil
|
106
107
|
super
|
data/test/test-git.rb
CHANGED
@@ -84,7 +84,7 @@ public
|
|
84
84
|
def test_changelog_last
|
85
85
|
Rake::Delphi::ChDir.new(@rake_task, @test_git_dir) do
|
86
86
|
chlog = Rake::Delphi::GitChangelog.new(@rake_task, nil)
|
87
|
-
assert_equal [], chlog.changelog, 'Changelog'
|
87
|
+
assert_equal ["line two added message", "file content added", "first commit"], chlog.changelog, 'Changelog'
|
88
88
|
assert_equal [], chlog.processed, 'Processed'
|
89
89
|
end
|
90
90
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake-delphi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Shumkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -88,6 +88,7 @@ extensions: []
|
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
90
|
- Gemfile
|
91
|
+
- Gemfile.lock
|
91
92
|
- LICENSE.txt
|
92
93
|
- Messages.txt
|
93
94
|
- README.md
|