author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 16 Feb 2016 07:46:52 +0000 | |
changeset 39 | 8af34937e1ec |
parent 30 | c8fe298c8cc7 |
child 43 | 1006839761af |
permissions | -rw-r--r-- |
1 | 1 |
"{ Package: 'stx:goodies/libcairo' }" |
2 |
||
3 |
"{ NameSpace: Cairo }" |
|
4 |
||
30
c8fe298c8cc7
GraphicsContext refactoring (part 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
29
diff
changeset
|
5 |
CObject subclass:#Pattern |
1 | 6 |
instanceVariableNames:'' |
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
12 | 9 |
category:'Cairo-Objects' |
1 | 10 |
! |
11 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
12 |
|
1 | 13 |
!Pattern class methodsFor:'accessing'! |
14 |
||
12 | 15 |
dllPath |
16 |
||
17 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
18 |
^ #( 'C:\Windows' 'C:\Windows\System32' "Wild guess, should not harm" ) |
|
19 |
]. |
|
20 |
||
21 |
OperatingSystem isUNIXlike ifTrue:[ |
|
22 |
OperatingSystem getSystemType == #linux ifTrue:[ |
|
23 |
| path | |
|
24 |
||
25 |
path := #( '/lib' '/usr/lib' '/usr/local/lib' ). |
|
26 |
(OperatingSystem getSystemInfo at:#machine) = 'x86_64' ifTrue:[ |
|
27 |
"If the machine is 64bit, prepend standard path for 32bit libs. |
|
28 |
Leave standard paths at the end, as the system might be completely |
|
29 |
32bit but running on 64bit-capable CPU. |
|
30 |
||
31 |
CAVEAT: This is bit dangerous, as on 64bit OS, if ia32 libs are |
|
32 |
not installed byt 64bit sqlite libs are, then 64bit libs are found |
|
33 |
and when a function is called, segfault will occur!! |
|
34 |
||
35 |
Q: Is there a way how to figure out if the OS itself is 32bit, |
|
36 |
regardles on CPU?" |
|
37 |
path := #( '/lib32' '/usr/lib32' '/usr/local/lib32' ) , path. |
|
38 |
]. |
|
39 |
^path |
|
40 |
||
41 |
]. |
|
42 |
]. |
|
43 |
||
44 |
self error:'Unsupported operating system' |
|
45 |
||
46 |
" |
|
47 |
SqliteLibrary dllPath |
|
48 |
" |
|
49 |
||
50 |
"Created: / 31-08-2011 / 18:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
51 |
! |
|
52 |
||
1 | 53 |
libraryName |
54 |
||
29
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
55 |
OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2']. |
1 | 56 |
|
29
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
57 |
OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll']. |
1 | 58 |
|
29
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
59 |
self error:'Library name for host OS is not known' |
1 | 60 |
! |
61 |
||
29
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
62 |
sizeof |
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
63 |
"Returns size of undelaying structure in bytes" |
1 | 64 |
|
29
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
65 |
^0 |
1 | 66 |
! ! |
67 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
68 |
!Pattern class methodsFor:'documentation'! |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
69 |
|
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
70 |
version |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
71 |
^'$Id$' |
11 | 72 |
! |
73 |
||
23
38ee47dbd976
Added version_HG to make Mercurial happy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
20
diff
changeset
|
74 |
version_HG |
38ee47dbd976
Added version_HG to make Mercurial happy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
20
diff
changeset
|
75 |
^ '$Changeset: <not expanded> $' |
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
76 |
! ! |
29
6ba06265e543
Bindinge updated to recent Cairo version.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
23
diff
changeset
|
77 |