Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit a66ea76

Browse files
[[ RefactorGraphics ]] Tweaks to get the Mac and Linux server engines to compile and run.
1 parent 5922db3 commit a66ea76

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

engine/Makefile.kernel-server

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ SOURCES=\
1111
execpt.cpp express.cpp field.cpp fieldf.cpp fieldh.cpp fields.cpp \
1212
font.cpp funcs.cpp funcsm.cpp globals.cpp graphic.cpp group.cpp \
1313
handler.cpp hc.cpp hndlrlst.cpp ibmp.cpp idraw.cpp ifile.cpp \
14-
igif.cpp iimport.cpp ijpg.cpp image.cpp image_rep.cpp \
15-
image_rep_encoded.cpp image_rep_mutable.cpp image_rep_transformed.cpp \
14+
igif.cpp iimport.cpp ijpg.cpp image.cpp image_rep.cpp imagelist.cpp \
15+
image_rep_encoded.cpp image_rep_mutable.cpp \
1616
imagebitmap.cpp ipng.cpp \
1717
iquantization.cpp iquantize_new.cpp irle.cpp iutil.cpp \
1818
itransform.cpp keywords.cpp line.cpp literal.cpp magnify.cpp mcerror.cpp \
1919
mcio.cpp mcstring.cpp mctheme.cpp newobj.cpp \
2020
object.cpp objptr.cpp operator.cpp paragraf.cpp param.cpp \
21-
property.cpp pxmaplst.cpp pickle.cpp regex.cpp \
21+
property.cpp pickle.cpp regex.cpp \
2222
scriptpt.cpp scrolbar.cpp scrollbardraw.cpp sellst.cpp stack.cpp stack2.cpp \
2323
stack3.cpp stackcache.cpp stacklst.cpp \
2424
statemnt.cpp styledtext.cpp tooltip.cpp \
@@ -29,16 +29,17 @@ SOURCES=\
2929
combiners.cpp path.cpp metacontext.cpp \
3030
printer.cpp unicode.cpp rtf.cpp rtfsupport.cpp text.cpp pathgray.cpp \
3131
pathprocess.cpp \
32-
contextscalewrapper.cpp variablearray.cpp objectstream.cpp \
32+
variablearray.cpp objectstream.cpp \
3333
menuparse.cpp parentscript.cpp securemode.cpp \
3434
bitmapeffect.cpp bitmapeffectblur.cpp md5.cpp sha1.cpp capsule.cpp \
3535
externalv0.cpp externalv1.cpp lextable.cpp uuid.cpp \
3636
objectprops.cpp objectpropsets.cpp variablevalue.cpp mcutility.cpp notify.cpp customprinter.cpp \
3737
sysspec.cpp mode_server.cpp sysunxdate.cpp sysunxnetwork.cpp sysunxrandom.cpp \
3838
srvmain.cpp srvspec.cpp srvsession.cpp srvstack.cpp srvflst.cpp srvposix.cpp srvdebug.cpp \
39-
srvscript.cpp srvcgi.cpp srvoutput.cpp srvmultipart.cpp \
39+
srvscript.cpp srvcgi.cpp srvoutput.cpp srvmultipart.cpp srvtheme.cpp \
4040
eventqueue.cpp encodederrors.cpp name.cpp redraw.cpp sysregion.cpp tilecache.cpp tilecachesw.cpp \
41-
fonttable.cpp fieldrtf.cpp fieldhtml.cpp fieldstyledtext.cpp paragrafattr.cpp
41+
fonttable.cpp fieldrtf.cpp fieldhtml.cpp fieldstyledtext.cpp paragrafattr.cpp \
42+
graphicscontext.cpp
4243

4344
SOURCE_DIRS=
4445

engine/Makefile.server

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ TYPE=application
44
include ../rules/environment.linux.makefile
55

66
SOURCES=\
7-
stacksecurity.cpp
7+
stacksecurity.cpp \
8+
linuxstubs.cpp
89

910
SOURCE_DIRS=
1011

@@ -18,16 +19,20 @@ CUSTOM_INCLUDES=\
1819

1920
CUSTOM_DEPS=libkernel-server.a
2021

21-
CUSTOM_LIBS=pcre png jpeg z core gif kernel-server
22+
CUSTOM_LIBS=pcre png jpeg z core gif graphics skia kernel-server
2223
CUSTOM_STATIC_LIBS=curl ssl crypto rt
23-
CUSTOM_DYNAMIC_LIBS=dl m
24+
CUSTOM_DYNAMIC_LIBS=dl m pthread
2425

2526
CUSTOM_CCFLAGS=\
2627
-Wall -Wno-unused-variable -Wno-switch -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -fno-strict-aliasing \
2728
-fmessage-length=0
2829

2930
CUSTOM_LDFLAGS=-export-dynamic -Wl,-x
3031

32+
linuxstubs.cpp: src/linux.stubs
33+
../prebuilt/bin/Revolution.lnx "../tools/weak_stub_maker.lc" <./src/linux.stubs >./src/linuxstubs.cpp
34+
35+
3136
include ../rules/application.linux.makefile
3237

3338

engine/src/srvstack.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
4141

4242
#include "globals.h"
4343

44+
// MM-2013-03-06: [[ RefactorGraphics ]] Added to allow server engines to compile.
45+
MCGFloat MCResGetDeviceScale(void)
46+
{
47+
return 1.0;
48+
}
49+
4450
MCStack *MCStack::findstackd(Window w)
4551
{
4652
if (w == window)
@@ -153,7 +159,8 @@ void MCStack::effectrect(const MCRectangle& p_rect, Boolean& r_abort)
153159
}
154160
}
155161

156-
MCRectangle MCStack::getwindowrect() const
162+
// MM-2013-03-06: [[ RefactorGraphics ]] Added to allow server engines to compile.
163+
MCRectangle MCStack::device_getwindowrect() const
157164
{
158165
return rect;
159166
}

libgraphics/src/lnxtext.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
////////////////////////////////////////////////////////////////////////////////
88

9+
extern "C" int initialise_weak_link_pango();
10+
extern "C" int initialise_weak_link_pangoft2();
11+
912
static PangoFontMap *s_font_map = NULL;
1013
static PangoContext *s_pango = NULL;
1114
static PangoLayout *s_layout = NULL;
@@ -15,6 +18,9 @@ static bool lnx_pango_initialize(void)
1518
bool t_success;
1619
t_success = true;
1720

21+
if (t_success)
22+
t_success == initialise_weak_link_pango() != 0 && initialise_weak_link_pangoft2() != 0;
23+
1824
if (t_success)
1925
if (s_font_map == NULL)
2026
{

0 commit comments

Comments
 (0)