Skip to content

Commit

Permalink
Refactor DevKit valid compilers checking
Browse files Browse the repository at this point in the history
Thanks to @Azolo aka Justin Baker for suggesting this refactor.
  • Loading branch information
jonforums committed Apr 29, 2012
1 parent b90c367 commit 8441984
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions config/devkit.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion recipes/devkit/devkit.rake
Expand Up @@ -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,
Expand Down

0 comments on commit 8441984

Please sign in to comment.