Class: Kompo::Packing::ForLinux
- Inherits:
-
Taski::Task
- Object
- Taski::Task
- Kompo::Packing::ForLinux
- Includes:
- CommonHelpers
- Defined in:
- lib/kompo/tasks/packing.rb
Overview
Linux implementation - compiles with gcc and pkg-config paths
Constant Summary collapse
- DYN_LINK_LIBS =
Libraries that must be dynamically linked
%w[pthread dl m c].freeze
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/kompo/tasks/packing.rb', line 169 def run work_dir = CollectDependencies.work_dir deps = CollectDependencies.deps ext_paths = CollectDependencies.ext_paths enc_files = CollectDependencies.enc_files @output_path = CollectDependencies.output_path command = build_command(work_dir, deps, ext_paths, enc_files) if Taski.args[:dry_run] Taski.(Shellwords.join(command)) return end group("Compiling binary (Linux)") do system(*command) or raise "Failed to compile final binary" puts "Binary size: #{File.size(@output_path) / 1024 / 1024} MB" end puts "Successfully created: #{@output_path}" end |