Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
f3306e9e
Commit
f3306e9e
authored
Dec 09, 2001
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile cleanup, some special options for OSX
parent
8d8429b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
9 deletions
+42
-9
Makefile
Makefile
+5
-3
mac.c
mac.c
+37
-6
No files found.
Makefile
View file @
f3306e9e
...
...
@@ -9,8 +9,8 @@ VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg
# The code for 3 Bytes/Pixel is not very efficient!
FLAG24
=
-DALLOW24BPP
OPTFLAGS
=
-g
# -Wall
#
OPTFLAGS=-O2 -Wall
#
OPTFLAGS=-g # -Wall
OPTFLAGS
=
-O2
-Wall
CFLAGS
=
$(OPTFLAGS)
$(PTHREADDEF)
$(FLAG24)
$(INCLUDES)
RANLIB
=
ranlib
...
...
@@ -59,7 +59,9 @@ OSXvnc-server: mac.o libvncserver.a
x11vnc
:
x11vnc.o libvncserver.a
$(CC)
-o
x11vnc x11vnc.o libvncserver.a
-lz
-ljpeg
$(XLIBS)
# $(CC) -o x11vnc x11vnc.o libvncserver.a /usr/lib/libz.a /usr/lib/libjpeg.a $(XLIBS)
x11vnc_static
:
x11vnc.o libvncserver.a
$(CC)
-o
x11vnc_static x11vnc.o libvncserver.a /usr/lib/libz.a /usr/lib/libjpeg.a
$(XLIBS)
#$(LIBS) $(XLIBS)
storepasswd
:
storepasswd.o d3des.o vncauth.o
...
...
mac.c
View file @
f3306e9e
...
...
@@ -37,6 +37,10 @@
rfbScreenInfoPtr
rfbScreen
;
/* some variables to enable special behaviour */
int
startTime
=
-
1
,
maxSecsToConnect
=
0
;
Bool
disconnectAfterFirstClient
=
True
;
/* Where do I get the "official" list of Mac key codes?
Ripped these out of a Mac II emulator called Basilisk II
that I found on the net. */
...
...
@@ -283,18 +287,45 @@ ScreenInit(int argc, char**argv)
static
void
refreshCallback
(
CGRectCount
count
,
const
CGRect
*
rectArray
,
void
*
ignore
)
{
int
i
;
int
i
;
for
(
i
=
0
;
i
<
count
;
i
++
)
rfbMarkRectAsModified
(
rfbScreen
,
rectArray
[
i
].
origin
.
x
,
rectArray
[
i
].
origin
.
y
,
rectArray
[
i
].
origin
.
x
+
rectArray
[
i
].
size
.
width
,
rectArray
[
i
].
origin
.
y
+
rectArray
[
i
].
size
.
height
);
if
(
startTime
>
0
&&
time
()
>
startTime
+
maxSecsToConnect
)
exit
(
0
);
for
(
i
=
0
;
i
<
count
;
i
++
)
rfbMarkRectAsModified
(
rfbScreen
,
rectArray
[
i
].
origin
.
x
,
rectArray
[
i
].
origin
.
y
,
rectArray
[
i
].
origin
.
x
+
rectArray
[
i
].
size
.
width
,
rectArray
[
i
].
origin
.
y
+
rectArray
[
i
].
size
.
height
);
}
void
clientGone
(
rfbClientPtr
cl
)
{
exit
(
0
);
}
void
newClient
(
rfbClientPtr
cl
)
{
if
(
startTime
>
0
&&
time
()
>
startTime
+
maxSecsToConnect
)
exit
(
0
);
if
(
disconnectAfterFirstClient
)
cl
->
clientGoneHook
=
clientGone
;
}
int
main
(
int
argc
,
char
*
argv
[])
{
for
(
i
=
argc
-
1
;
i
>
0
;
i
--
)
if
(
i
<
argc
-
1
&&
strcmp
(
argv
[
i
],
"-wait4client"
)
==
0
)
{
maxSecsToConnect
=
atoi
(
argv
[
i
+
1
])
/
1000
;
startTime
=
time
();
}
else
if
(
strcmp
(
argv
[
i
],
"-runforever"
)
==
0
)
{
disconnectAfterFirstClient
=
FALSE
;
}
ScreenInit
(
argc
,
argv
);
rfbScreen
->
newClientHook
=
newClient
;
/* enter background event loop */
rfbRunEventLoop
(
rfbScreen
,
40
,
TRUE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment