Permalink
Browse files

Refactor DevKit valid compilers checking

Thanks to @Azolo aka Justin Baker for suggesting this refactor.
  • Loading branch information...
1 parent b90c367 commit 84419844ce67e8575c225982778136ec4c1f5766 @jonforums jonforums committed Apr 29, 2012
Showing with 1 addition and 16 deletions.
  1. +0 −15 config/devkit.rb
  2. +1 −1 recipes/devkit/devkit.rake
View
@@ -1,23 +1,8 @@
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
@@ -36,7 +36,7 @@ namespace(:devkit) do
# canonicalize DevKit compiler version and check if version is supported
ENV['DKVER'] = ENV['DKVER'].nil? ? DevKitInstaller::DEFAULT_VERSION.downcase : ENV['DKVER'].downcase
- fail '[FAIL] invalid DKVER value provided' unless DevKitInstaller::VALID_COMPILERS.include?(ENV['DKVER'])
+ fail '[FAIL] invalid DKVER value provided' unless DevKitInstaller::COMPILERS.has_key?(ENV['DKVER'])
task :installer, [:target] => [DevKitInstaller::DevKit.inno_config, :innosetup] do |t, args|
InnoSetup.iscc(DevKitInstaller::DevKit.inno_script,

0 comments on commit 8441984

Please sign in to comment.