Skip to content

Commit

Permalink
Ensure that Mac App Store build options are explicitly Mac-specific.
Browse files Browse the repository at this point in the history
  • Loading branch information
ywwg committed Jul 8, 2014
1 parent e9411b5 commit 1d0eded
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ available_features = [features.Mad,
features.HSS1394,
features.HID,
features.Bulk,
features.AppStoreException,
features.MacAppStoreException,
features.VinylControl,
features.Shoutcast,
features.Opus,
Expand Down
16 changes: 8 additions & 8 deletions build/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ def description(self):
def enabled(self, build):
build.flags['vinylcontrol'] = util.get_flags(build.env,
'vinylcontrol', 0)
# Existence of the appstore option forces vinylcontrol off due to
# Existence of the macappstore option forces vinylcontrol off due to
# licensing issues.
if build.flags.has_key('appstore') and int(build.flags['appstore']):
if build.flags.has_key('macappstore') and int(build.flags['macappstore']):
return False
if int(build.flags['vinylcontrol']):
return True
Expand Down Expand Up @@ -1290,22 +1290,22 @@ def configure(self, build, conf):
def sources(self, build):
return ['library/dao/autodjcratesdao.cpp']

class AppStoreException(Feature):
class MacAppStoreException(Feature):
def description(self):
return "Build for Mac App Store"

def enabled(self, build):
build.flags['appstore'] = util.get_flags(build.env,
'appstore', 0)
if int(build.flags['appstore']):
# Existence of the appstore option forces vinylcontrol off due to
build.flags['macappstore'] = util.get_flags(build.env,
'macappstore', 0)
if int(build.flags['macappstore']):
# Existence of the macappstore option forces vinylcontrol off due to
# licensing issues.
build.flags['vinylcontrol'] = 0
return True
return False

def add_options(self, build, vars):
vars.Add('appstore', 'Set to 1 to indicate the build is for the Mac App Store', 1)
vars.Add('macappstore', 'Set to 1 to indicate the build is for the Mac App Store', 1)

def configure(self, build, conf):
if not self.enabled(build):
Expand Down

0 comments on commit 1d0eded

Please sign in to comment.