patch from Joe Button to cache VST personal use question/answer
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 26 Apr 2007 01:05:30 +0000 (01:05 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 26 Apr 2007 01:05:30 +0000 (01:05 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1748 d708f5d6-7413-0410-9779-e7cbd77b26cf

SConstruct

index edbb2d9274098bbf1f46f0d7341ea8e6ca6cfee4..39b3822817aaea04a66636b844f36904aa987b7f 100644 (file)
@@ -382,14 +382,22 @@ env.Append (BUILDERS = {'Tarball' : tarball_bld})
 #
 
 if env['VST']:
-    sys.stdout.write ("Are you building Ardour for personal use (rather than distribution to others)? [no]: ")
-    answer = sys.stdin.readline ()
-    answer = answer.rstrip().strip()
-    if answer != "yes" and answer != "y":
-        print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. Build with VST=false.'
-        sys.exit (-1);
+    if os.path.isfile('.personal_use_only'):
+        print "Enabling VST support. Note that distributing a VST-enabled ardour\nis a violation of several different licences.\nBuild with VST=false if you intend to distribute ardour to others."
     else:
-        print "OK, VST support will be enabled"
+        sys.stdout.write ("Are you building Ardour for personal use (rather than distribution to others)? [no]: ")
+        answer = sys.stdin.readline ()
+        answer = answer.rstrip().strip()
+        if answer == "yes" or answer == "y":
+            fh = open('.personal_use_only', 'w')
+            fh.close()
+            print "OK, VST support will be enabled"
+        else:
+            print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. Build with VST=false.'
+            sys.exit (-1);
+else:
+    if os.path.isfile('.personal_use_only'):
+        os.remove('.personal_use_only')
 
 
 #######################