Class: Ramekin::AMKSetup::NormalSetup
- Defined in:
- lib/ramekin/amk_setup.rb
Constant Summary
Constants included from Util
Instance Method Summary collapse
- #setup! ⇒ Object
-
#setup_amk! ⇒ Object
Using AddMusicKFF as it is the only one that seems to compile cleanly outside of Windows.
- #setup_asar! ⇒ Object
Methods inherited from Setup
#error!, #initialize, #latest_tag, #unpack_repo_source!
Methods included from Util
#adsr_value, #extra_nice_length_amk, #nice_length_amk
Constructor Details
This class inherits a constructor from Ramekin::AMKSetup::Setup
Instance Method Details
#setup! ⇒ Object
78 79 80 81 |
# File 'lib/ramekin/amk_setup.rb', line 78 def setup! setup_asar! setup_amk! end |
#setup_amk! ⇒ Object
Using AddMusicKFF as it is the only one that seems to compile cleanly outside of Windows.
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/ramekin/amk_setup.rb', line 108 def setup_amk! unpack_repo_source!('KungFuFurby/AddMusicKFF', Ramekin.config.amk_dir) or return Dir.chdir(Ramekin.config.amk_dir) do system(make) # link in the silly asar lib file FileUtils.ln_s(@asar_lib_file, '.') end end |
#setup_asar! ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/ramekin/amk_setup.rb', line 83 def setup_asar! unpack_repo_source!('RPGHacker/asar', Ramekin.config.asar_dir) or return Dir.chdir(Ramekin.config.asar_dir) do system(cmake, 'src') error! "failed to configure asar" unless $?.success? system(make) error! "failed to compile asar" unless $?.success? lib_file = Dir.glob('asar/lib/*').find do |entry| next false unless File.file?(entry) next false if File.symlink?(entry) next true if entry.end_with?('.dylib') next true if entry.end_with?('.dll') next true if entry =~ /[.]so([.]\d+)*\z/ end or error!( "couldn't find a dynamic library in #{Ramekin.config.asar_dir} - did it compile correctly?" ) @asar_lib_file = File.(lib_file, Ramekin.config.asar_dir) end end |