Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactor DevKit compiler initialization

Refactor the `config/compilers/0001_dkcompiler_init.rb` init code
into `config/devkit.rb`. Thanks to @Azolo aka Justin Baker for the
idea.
  • Loading branch information...
commit b90c367a7f7e916f53fc697460d347fecd41cb1d 1 parent eadcdb7
@jonforums jonforums authored
Showing with 21 additions and 22 deletions.
  1. +0 −19 config/compilers/001_dkcompiler_init.rb
  2. +21 −3 config/devkit.rb
View
19 config/compilers/001_dkcompiler_init.rb
@@ -1,19 +0,0 @@
-module DevKitInstaller
- puts "Initializing DevKit compilers" if Rake.application.options.trace
-
- COMPILERS = {}
-
- # TODO update this list when adding any new compiler or compiler version!
- # The format is a String consisting of vendor-bits-version
- VALID_COMPILERS = [
- 'tdm-32-4.6.1',
- 'tdm-32-4.5.2',
- 'tdm-64-4.6.1',
- 'mingw-32-4.6.2',
- 'mingw-32-4.5.2',
- 'mingw-32-3.4.5',
- 'mingw64-32-4.6.3',
-# 'mingw64-64-4.4.5',
- ]
-
-end
View
24 config/devkit.rb
@@ -1,15 +1,33 @@
require 'ostruct'
+module DevKitInstaller
+
+ DEFAULT_VERSION = 'tdm-32-4.5.2'
+ COMPILERS = {}
+
+ # TODO update this list when adding any new compiler or compiler version!
+ # The format is a String consisting of vendor-bits-version
+ VALID_COMPILERS = [
+ 'tdm-32-4.6.1',
+ 'tdm-32-4.5.2',
+ 'tdm-64-4.6.1',
+ 'mingw-32-4.6.2',
+ 'mingw-32-4.5.2',
+ 'mingw-32-3.4.5',
+ 'mingw64-32-4.6.3',
+# 'mingw64-64-4.4.5',
+ ]
+
+end
+
# load DevKit compiler definitions
Dir.glob("#{RubyInstaller::ROOT}/config/compilers/*.rb").sort.each do |compiler|
puts "Loading #{File.basename(compiler)}" if Rake.application.options.trace
- require compiler
+ load compiler
end
module DevKitInstaller
- DEFAULT_VERSION = 'tdm-32-4.5.2'
-
DevKit = OpenStruct.new(
:installer_guid => '{D25478D4-72AE-40BF-829F-2C8CE49E2EE8}',
:install_script => 'resources/devkit/dk.rb',
Please sign in to comment.
Something went wrong with that request. Please try again.