<commit_before>#!/usr/bin/ruby -wKU

# First include the functions in the jamoma lib
glibdir = "."
Dir.chdir glibdir             # change to libdir so that requires work
glibdir = Dir.pwd

$main_repository = true

require "supports/jamomalib"


###################################################################
# Check Args
###################################################################

if(ARGV.length == 0)
  puts "usage: "
  puts "build.rb <required:configuration> <optional:clean>"
  exit 0;
end

configuration = ARGV[0];
if win32?
 	 if(configuration == "Development" || configuration == "Debug" )
    		configuration = "Debug"
  	else
		if(configuration == "Deployment" || configuration == "Release" )
    			configuration = "Release"
		end
 	 end
end

clean = false;
debug = false;

if(ARGV.length > 1)
  if(ARGV[1] != "0" || ARGV[1] != "false")
    clean = true;
  end
end

if(ARGV.length > 2)
  if(ARGV[2] != "0" || ARGV[2] != "false")
    debug = true;
  end
end

###################################################################
# Clean the Build folder
###################################################################
if(clean)

  puts " "
  puts "  Cleaning Builds folder "
  puts " "

  Dir.chdir "#{glibdir}/../Builds/MaxMSP"
  
  `rm -rf *.maxhelp`
  
  # Windows
  if win32?

    `rm -f *.ttdll`
    `rm -f *.dll`
    `rm -f *.mxe`

  # Mac
  else

    `rm -rf *.mxo`
    `rm -rf *.txt`

  end

end
###################################################################
# Get Revision Info
###################################################################

git_desc = `git describe --tags --abbrev=5 --long`.split('-')
git_tag = git_desc[0]
git_dirty_commits = git_desc[git_desc.size()-2]
git_rev = git_desc[git_desc.size()-1]
git_rev.sub!('g', '')
git_rev.chop!

version_digits = git_tag.split(/\./)
version_maj = 0
version_min = 0
version_sub = 0
version_mod = ''
version_mod = version_digits[3] if version_digits.size() > 3
version_sub = version_digits[2] if version_digits.size() > 2
version_min = version_digits[1] if version_digits.size() > 1
version_maj = version_digits[0] if version_digits.size() > 0

puts ""
puts "  Building Jamoma #{git_tag} (rev. #{git_rev})"
puts ""
if git_dirty_commits != '0'
	puts "  !!! WARNING !!!"
	puts "	THIS BUILD IS COMING FROM A DIRTY REVISION   "
	puts "	THIS BUILD IS FOR PERSONAL USE ONLY  "
	puts "	DO NOT DISTRIBUTE THIS BUILD TO OTHERS       "
	puts ""
end
puts ""


###################################################################
# Build Jamoma
###################################################################

quietly do
#  ARGV = [configuration, clean, debug, git_tag, git_rev]
  ARGV = [configuration, clean, debug]
end
                     
Dir.chdir "#{glibdir}/../Modules/Foundation"
load "build.rb"      
                     
Dir.chdir "#{glibdir}/../Modules/DSP"
load "build.rb"      
                     
Dir.chdir "#{glibdir}/../Modules/Graphics"
load "build.rb"      

Dir.chdir "#{glibdir}/../Modules/Graph"
load "build.rb"
                     
Dir.chdir "#{glibdir}/../Modules/AudioGraph"
load "build.rb"      
                     
Dir.chdir "#{glibdir}/../Modules/Modular"
load "build.rb"

Dir.chdir "#{glibdir}/../Modules/Documentation"
load "build.rb"

if win32?
  # At the moment we don't build TTRuby for Windows
  # If someone is interested in doing that, please feel free!
else
  Dir.chdir "#{glibdir}/../Modules/Ruby"
  load "build.rb"      
end<commit_msg>build script now installs the ruby language bindings.<commit_after>#!/usr/bin/ruby -wKU

# First include the functions in the jamoma lib
glibdir = "."
Dir.chdir glibdir             # change to libdir so that requires work
glibdir = Dir.pwd

$main_repository = true

require "supports/jamomalib"


###################################################################
# Check Args
###################################################################

if(ARGV.length == 0)
  puts "usage: "
  puts "build.rb <required:configuration> <optional:clean>"
  exit 0;
end

configuration = ARGV[0];
if win32?
 	 if(configuration == "Development" || configuration == "Debug" )
    		configuration = "Debug"
  	else
		if(configuration == "Deployment" || configuration == "Release" )
    			configuration = "Release"
		end
 	 end
end

clean = false;
debug = false;

if(ARGV.length > 1)
  if(ARGV[1] != "0" || ARGV[1] != "false")
    clean = true;
  end
end

if(ARGV.length > 2)
  if(ARGV[2] != "0" || ARGV[2] != "false")
    debug = true;
  end
end

###################################################################
# Clean the Build folder
###################################################################
if(clean)

  puts " "
  puts "  Cleaning Builds folder "
  puts " "

  Dir.chdir "#{glibdir}/../Builds/MaxMSP"
  
  `rm -rf *.maxhelp`
  
  # Windows
  if win32?

    `rm -f *.ttdll`
    `rm -f *.dll`
    `rm -f *.mxe`

  # Mac
  else

    `rm -rf *.mxo`
    `rm -rf *.txt`

  end

end
###################################################################
# Get Revision Info
###################################################################

git_desc = `git describe --tags --abbrev=5 --long`.split('-')
git_tag = git_desc[0]
git_dirty_commits = git_desc[git_desc.size()-2]
git_rev = git_desc[git_desc.size()-1]
git_rev.sub!('g', '')
git_rev.chop!

version_digits = git_tag.split(/\./)
version_maj = 0
version_min = 0
version_sub = 0
version_mod = ''
version_mod = version_digits[3] if version_digits.size() > 3
version_sub = version_digits[2] if version_digits.size() > 2
version_min = version_digits[1] if version_digits.size() > 1
version_maj = version_digits[0] if version_digits.size() > 0

puts ""
puts "  Building Jamoma #{git_tag} (rev. #{git_rev})"
puts ""
if git_dirty_commits != '0'
	puts "  !!! WARNING !!!"
	puts "	THIS BUILD IS COMING FROM A DIRTY REVISION   "
	puts "	THIS BUILD IS FOR PERSONAL USE ONLY  "
	puts "	DO NOT DISTRIBUTE THIS BUILD TO OTHERS       "
	puts ""
end
puts ""


###################################################################
# Build Jamoma
###################################################################

quietly do
#  ARGV = [configuration, clean, debug, git_tag, git_rev]
  ARGV = [configuration, clean, debug]
end
                     
Dir.chdir "#{glibdir}/../Modules/Foundation"
load "build.rb"      
                     
Dir.chdir "#{glibdir}/../Modules/DSP"
load "build.rb"      
                     
Dir.chdir "#{glibdir}/../Modules/Graphics"
load "build.rb"      

Dir.chdir "#{glibdir}/../Modules/Graph"
load "build.rb"
                     
Dir.chdir "#{glibdir}/../Modules/AudioGraph"
load "build.rb"      
                     
Dir.chdir "#{glibdir}/../Modules/Modular"
load "build.rb"

Dir.chdir "#{glibdir}/../Modules/Documentation"
load "build.rb"

if win32?
  # At the moment we don't build TTRuby for Windows
  # If someone is interested in doing that, please feel free!
else
  Dir.chdir "#{glibdir}/../Modules/Ruby"
  load "build.rb"
  puts
  puts "Installing Jamoma Ruby support -- this may require your password"
  puts "If you just press enter without entering your password, then the updated Jamoma Ruby support will not be installed for your use."
  load "install.rb"
end
{'fraction_non_alphanumeric': 0.27092297015961136, 'fraction_numerical': 0.00916030534351145, 'mean_word_length': 3.4813432835820897, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '452866', 'n_tokens_mistral': 2475, 'n_tokens_neox': 2347, 'n_words': 598}