Class: Rake::Delphi::Dcc32Tool

Inherits:
CustomDelphiTool show all
Defined in:
lib/rake/delphi/dcc32.rb

Constant Summary

Constants inherited from CustomDelphiTool

CustomDelphiTool::BDSRegRoot, CustomDelphiTool::DelphiRegRoot, CustomDelphiTool::EDSRegRoot, CustomDelphiTool::EmbarcaderoRegRoot

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CustomDelphiTool

checkToolFailure, find, #initialize, readDelphiDir, readUserOption, reinit, rootForVersion, #toolpath, #version, version4version, #versionInfoClass

Methods inherited from CustomExec

#execute, #to_system_path

Methods inherited from BasicTask

#initialize, #trace?

Constructor Details

This class inherits a constructor from Rake::Delphi::CustomDelphiTool

Class Method Details

.toolNameObject



15
16
17
# File 'lib/rake/delphi/dcc32.rb', line 15

def self.toolName
    'bin/dcc32.exe'
end

Instance Method Details

#delphidirObject



19
20
21
# File 'lib/rake/delphi/dcc32.rb', line 19

def delphidir
    @@delphidir
end

#delphilibObject



23
24
25
# File 'lib/rake/delphi/dcc32.rb', line 23

def delphilib
    ENV['BDSLIB']
end

#readLibraryPaths(platform) ⇒ Object



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/rake/delphi/dcc32.rb', line 27

def readLibraryPaths(platform)
    warn "WARNING! You are using Delphi XE or above but no platform defined!" if ENV['DELPHI_VERSION'].to_i >= 14 && ! platform

    platform = platform.to_s != '' ? '\\' + platform : ''
    # platform not used for old Delphis 'SearchPath'
    libpaths = self.class.readUserOption('Library' + platform, 'Search Path', self.version).split(';') \
        | self.class.readUserOption('Library', 'SearchPath', self.version).split(';')
    Logger.trace(Logger::TRACE, libpaths)
    dev = EnvVariables.new(self.class.rootForVersion(self.version) + '\Environment Variables', self.delphidir)
    libpaths.map! do |lp|
        unless lp.to_s.empty?
            lp = dev.expand(lp)
        end
        lp
    end
    Logger.trace(Logger::TRACE, libpaths)
    return libpaths
end