2 # -*- Mode: Python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4 -*-
3 # vi: set ts=4 sw=4 expandtab:
5 # ***** BEGIN LICENSE BLOCK *****
6 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
8 # The contents of this file are subject to the Mozilla Public License Version
9 # 1.1 (the "License"); you may not use this file except in compliance with
10 # the License. You may obtain a copy of the License at
11 # http://www.mozilla.org/MPL/
13 # Software distributed under the License is distributed on an "AS IS" basis,
14 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
15 # for the specific language governing rights and limitations under the
18 # The Original Code is [Open Source Virtual Machine.].
20 # The Initial Developer of the Original Code is
21 # Adobe System Incorporated.
22 # Portions created by the Initial Developer are Copyright (C) 2004-2006
23 # the Initial Developer. All Rights Reserved.
28 # Alternatively, the contents of this file may be used under the terms of
29 # either the GNU General Public License Version 2 or later (the "GPL"), or
30 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 # in which case the provisions of the GPL or the LGPL are applicable instead
32 # of those above. If you wish to allow use of your version of this file only
33 # under the terms of either the GPL or the LGPL, and not to allow others to
34 # use your version of this file under the terms of the MPL, indicate your
35 # decision by deleting the provisions above and replace them with the notice
36 # and other provisions required by the GPL or the LGPL. If you do not delete
37 # the provisions above, a recipient may use your version of this file under
38 # the terms of any one of the MPL, the GPL or the LGPL.
40 # ***** END LICENSE BLOCK *****
46 classpath
= os
.environ
.get('ASC')
48 classpath
= "../utils/asc.jar"
49 #print "ERROR: ASC environment variable must point to asc.jar"
52 def mv(oldfile
, newfile
):
53 shutil
.copyfile(oldfile
,newfile
)
57 if os
.access(file, os
.F_OK
) == True:
60 javacmd
= "java -ea -DAS3 -DAVMPLUS -classpath "+classpath
61 asc
= javacmd
+" macromedia.asc.embedding.ScriptCompiler "
63 print("ASC="+classpath
)
64 print("Building shell_toplevel...")
69 os
.system(asc
+" -abcfuture -import ../generated/builtin.abc -builtin "+configs
+"-apiversioning -out shell_toplevel shell_toplevel.as Domain.as ../extensions/Sampler.as ../extensions/Trace.as ../extensions/Dictionary.as Endian.as Java.as")
71 rm("shell_toplevel.h")
72 rm("shell_toplevel.cpp")
73 mv("shell_toplevel.abc", "../generated/shell_toplevel.abc")
75 print("Generating native thunks...")
76 os
.system("python ../utils/nativegen.py ../generated/builtin.abc ../generated/shell_toplevel.abc")