Mercurial > enso_osx
annotate src/SConscript @ 25:9109b605bf7c default tip
The quasimode keycode is no longer a constructor parameter for the inputmanager.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sat, 01 Mar 2008 23:36:09 -0600 |
parents | df405fded717 |
children |
rev | line source |
---|---|
2
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
1 # ---------------------------------------------------------------------------- |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
2 # |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
3 # enso_osx.graphics SConscript |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
4 # |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
5 # ---------------------------------------------------------------------------- |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
6 |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
7 # ---------------------------------------------------------------------------- |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
8 # Imports |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
9 # ---------------------------------------------------------------------------- |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
10 |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
11 Import( "env" ) |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
12 |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
13 import os |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
14 import sys |
5
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
15 import subprocess |
2
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
16 |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
17 |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
18 # ---------------------------------------------------------------------------- |
7 | 19 # Helper Functions |
2
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
20 # ---------------------------------------------------------------------------- |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
21 |
5
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
22 def getOutput( params ): |
7 | 23 """ |
24 Runs the given program, as specified by the parameter list. Raises an | |
25 exception with stderr output if the process has a nonzero return | |
26 code. Otherwise, it returns the stdout of the process as a string. | |
27 """ | |
28 | |
5
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
29 popen = subprocess.Popen( params, |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
30 stdout=subprocess.PIPE, |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
31 stderr=subprocess.PIPE ) |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
32 output, errors = popen.communicate() |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
33 if popen.returncode != 0: |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
34 sys.stderr.write( "Running '%s' failed.\n" % " ".join(params) ) |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
35 sys.stderr.write( "Output was:\n%s\n(end of output)\n" % errors ) |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
36 raise SystemError() |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
37 return output |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
38 |
7 | 39 |
40 # ---------------------------------------------------------------------------- | |
41 # Build Actions | |
42 # ---------------------------------------------------------------------------- | |
43 | |
44 # quartz cairo bridge | |
45 | |
5
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
46 cairoLibFlags = getOutput( ["pkg-config", "cairo", "--libs"] ) |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
47 cairoIncludeFlags = getOutput( ["pkg-config", "cairo", "--cflags"] ) |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
48 |
7 | 49 qcbEnv = env.Copy() |
50 | |
51 qcbEnv.Append( | |
21
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
52 CPPPATH=["pycairo"], |
5
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
53 CCFLAGS=cairoIncludeFlags.split(), |
f1194791e5e1
pkg-config is now used to dynamically fetch required cairo paths as necessary.
Atul Varma <varmaa@toolness.com>
parents:
3
diff
changeset
|
54 LINKFLAGS=cairoLibFlags, |
2
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
55 LIBS=["python", "cairo"], |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
56 FRAMEWORKS=["AppKit"], |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
57 ) |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
58 |
7 | 59 quartzCairoBridge = qcbEnv.LoadableModule( |
2
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
60 source = ["quartz_cairo_bridge.m"], |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
61 target = ["quartz_cairo_bridge.so"], |
a636a7618da6
Added the prototype OSX TrasparentWindow implementation.
Atul Varma <varmaa@toolness.com>
parents:
diff
changeset
|
62 ) |
3
911cb701a42e
Moved all c/objc files into a new 'src' directory; other minor refactorings.
Atul Varma <varmaa@toolness.com>
parents:
2
diff
changeset
|
63 |
12
e0dcf6c116be
Simplified directory/package structure.
Atul Varma <varmaa@toolness.com>
parents:
7
diff
changeset
|
64 qcbEnv.Install( "#enso_osx", quartzCairoBridge ) |
7 | 65 |
66 # key notifier | |
67 | |
68 keyNotifier = env.Program( | |
15
af72a81169aa
Renamed KeyNotifier to EnsoKeyNotifier, as it may eventually get installed in a place like /usr/local/bin, we want its name to be more descriptive.
Atul Varma <varmaa@toolness.com>
parents:
12
diff
changeset
|
69 source = ["EnsoKeyNotifier.m"], |
7 | 70 FRAMEWORKS = ["ApplicationServices", "Foundation"] |
71 ) | |
72 | |
73 env.Install( "#bin", keyNotifier ) | |
21
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
74 |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
75 # Pycairo |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
76 |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
77 pycairoEnv = env.Copy() |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
78 |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
79 pycairoEnv.Append( |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
80 CCFLAGS=cairoIncludeFlags.split(), |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
81 LINKFLAGS=cairoLibFlags |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
82 ) |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
83 |
df405fded717
Modified pycairo to work with Quartz-based cairo surfaces and to be mounted at enso_osx.cairo, added it to the build system, and created an enso_osx.cairo shadow package.
Atul Varma <varmaa@toolness.com>
parents:
15
diff
changeset
|
84 SConscript( "pycairo/SConscript", exports="pycairoEnv" ) |