wip
This commit is contained in:
parent
659595f953
commit
c2184a5d38
5
Rakefile
5
Rakefile
|
@ -1,6 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
TARGET="x86_64-macos-none"
|
|
||||||
MRUBY_REV= 'c32f7915fb567c73b78db10ebc13c38a617a75aa'
|
MRUBY_REV= 'c32f7915fb567c73b78db10ebc13c38a617a75aa'
|
||||||
MRUBY_ROOT = 'build/mruby'
|
MRUBY_ROOT = 'build/mruby'
|
||||||
RUBY_FILES = [
|
RUBY_FILES = [
|
||||||
|
@ -39,13 +38,13 @@ end
|
||||||
desc 'Compile mruby'
|
desc 'Compile mruby'
|
||||||
task build_mruby: [MRUBY_ROOT] do
|
task build_mruby: [MRUBY_ROOT] do
|
||||||
Dir.chdir('build/mruby') 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
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'Compile tmux-fingers'
|
desc 'Compile tmux-fingers'
|
||||||
task compile: ['build_mruby'] do
|
task compile: ['build_mruby'] do
|
||||||
sh "#{MRUBY_ROOT}/bin/mrbc -B main_ruby -o build/bytecode.c #{RUBY_FILES.join(' ')}"
|
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'
|
sh 'echo tmux-fingers build complete'
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,8 @@ MRuby::Build.new do |conf|
|
||||||
# load specific toolchain settings
|
# load specific toolchain settings
|
||||||
conf.toolchain
|
conf.toolchain
|
||||||
|
|
||||||
|
#conf.enable_debug
|
||||||
|
|
||||||
# Use mrbgems
|
# Use mrbgems
|
||||||
conf.gem :core => 'mruby-sleep'
|
conf.gem :core => 'mruby-sleep'
|
||||||
conf.gem :github => 'iij/mruby-env'
|
conf.gem :github => 'iij/mruby-env'
|
||||||
|
@ -84,7 +86,7 @@ MRuby::Build.new do |conf|
|
||||||
# conf.file_separator = '/'
|
# conf.file_separator = '/'
|
||||||
|
|
||||||
# Turn on `enable_debug` for better debugging
|
# Turn on `enable_debug` for better debugging
|
||||||
# conf.enable_debug
|
conf.enable_debug
|
||||||
conf.enable_bintest
|
conf.enable_bintest
|
||||||
conf.enable_test
|
conf.enable_test
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,7 +29,8 @@ module Fingers
|
||||||
command_class.new(args, cli_path).run
|
command_class.new(args, cli_path).run
|
||||||
rescue => e
|
rescue => e
|
||||||
puts e
|
puts e
|
||||||
Fingers.logger.error(e)
|
puts e.backtrace
|
||||||
|
#Fingers.logger.error(e)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ module Kernel
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
absolute_fingers_path = "/home/morantron/hacking/tmux-fingers/build/tmux-fingers"
|
absolute_fingers_path = File.expand_path(ARGV[0])
|
||||||
ARGV.shift
|
ARGV.shift
|
||||||
Fingers::CLI.new(ARGV, absolute_fingers_path).run
|
Fingers::CLI.new(ARGV, absolute_fingers_path).run
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
|
|
Loading…
Reference in New Issue