This commit is contained in:
Jorge Morante 2023-05-24 08:58:23 +02:00
parent 659595f953
commit c2184a5d38
4 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,5 @@
# frozen_string_literal: true
TARGET="x86_64-macos-none"
MRUBY_REV= 'c32f7915fb567c73b78db10ebc13c38a617a75aa'
MRUBY_ROOT = 'build/mruby'
RUBY_FILES = [
@ -39,13 +38,13 @@ end
desc 'Compile mruby'
task build_mruby: [MRUBY_ROOT] do
Dir.chdir('build/mruby') do
sh "CC=\"zig cc -target #{TARGET}\" MRUBY_CONFIG=../../build_config.rb rake"
sh "MRUBY_CONFIG=../../build_config.rb rake"
end
end
desc 'Compile tmux-fingers'
task compile: ['build_mruby'] do
sh "#{MRUBY_ROOT}/bin/mrbc -B main_ruby -o build/bytecode.c #{RUBY_FILES.join(' ')}"
sh "zig cc -target #{TARGET} -I#{MRUBY_ROOT}/include main.c -o build/tmux-fingers #{MRUBY_ROOT}/build/host/lib/libmruby.a -lm"
sh "cc -I#{MRUBY_ROOT}/include main.c -o build/tmux-fingers #{MRUBY_ROOT}/build/host/lib/libmruby.a -lm"
sh 'echo tmux-fingers build complete'
end

View File

@ -2,6 +2,8 @@ MRuby::Build.new do |conf|
# load specific toolchain settings
conf.toolchain
#conf.enable_debug
# Use mrbgems
conf.gem :core => 'mruby-sleep'
conf.gem :github => 'iij/mruby-env'
@ -84,7 +86,7 @@ MRuby::Build.new do |conf|
# conf.file_separator = '/'
# Turn on `enable_debug` for better debugging
# conf.enable_debug
conf.enable_debug
conf.enable_bintest
conf.enable_test
end

View File

@ -29,7 +29,8 @@ module Fingers
command_class.new(args, cli_path).run
rescue => e
puts e
Fingers.logger.error(e)
puts e.backtrace
#Fingers.logger.error(e)
end
end

View File

@ -6,7 +6,7 @@ module Kernel
end
begin
absolute_fingers_path = "/home/morantron/hacking/tmux-fingers/build/tmux-fingers"
absolute_fingers_path = File.expand_path(ARGV[0])
ARGV.shift
Fingers::CLI.new(ARGV, absolute_fingers_path).run
rescue StandardError => e