Repository: TigerVNC/tigervnc Branch: master Commit: 71fe03a49684 Files: 897 Total size: 5.7 MB Directory structure: gitextract_fwbflnoz/ ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── config.yml │ │ └── feature_request.md │ ├── containers/ │ │ ├── jammy/ │ │ │ ├── Dockerfile │ │ │ └── build.sh │ │ ├── noble/ │ │ │ ├── Dockerfile │ │ │ └── build.sh │ │ ├── rocky10/ │ │ │ ├── Dockerfile │ │ │ └── build.sh │ │ ├── rocky8/ │ │ │ ├── Dockerfile │ │ │ └── build.sh │ │ └── rocky9/ │ │ ├── Dockerfile │ │ └── build.sh │ └── workflows/ │ ├── build.yml │ └── test-report.yml ├── .gitignore ├── BUILDING.txt ├── CMakeLists.txt ├── LICENCE.TXT ├── README.rst ├── cmake/ │ ├── Modules/ │ │ ├── CMakeMacroLibtoolFile.cmake │ │ ├── FindAVCodec.cmake │ │ ├── FindAVUtil.cmake │ │ ├── FindGLib.cmake │ │ ├── FindGMP.cmake │ │ ├── FindGio.cmake │ │ ├── FindGobject.cmake │ │ ├── FindNettle.cmake │ │ ├── FindPAM.cmake │ │ ├── FindPWQuality.cmake │ │ ├── FindPipeWire.cmake │ │ ├── FindPixman.cmake │ │ ├── FindSELinux.cmake │ │ ├── FindSWScale.cmake │ │ ├── FindSystemd.cmake │ │ ├── FindUuid.cmake │ │ ├── FindWaylandClient.cmake │ │ └── FindXkbcommon.cmake │ ├── StaticBuild.cmake │ └── cmake_uninstall.cmake.in ├── common/ │ ├── CMakeLists.txt │ ├── core/ │ │ ├── CMakeLists.txt │ │ ├── Configuration.cxx │ │ ├── Configuration.h │ │ ├── Exception.cxx │ │ ├── Exception.h │ │ ├── LogWriter.cxx │ │ ├── LogWriter.h │ │ ├── Logger.cxx │ │ ├── Logger.h │ │ ├── Logger_file.cxx │ │ ├── Logger_file.h │ │ ├── Logger_stdio.cxx │ │ ├── Logger_stdio.h │ │ ├── Logger_syslog.cxx │ │ ├── Logger_syslog.h │ │ ├── Rect.h │ │ ├── Region.cxx │ │ ├── Region.h │ │ ├── Timer.cxx │ │ ├── Timer.h │ │ ├── string.cxx │ │ ├── string.h │ │ ├── time.cxx │ │ ├── time.h │ │ ├── winerrno.h │ │ ├── xdgdirs.cxx │ │ └── xdgdirs.h │ ├── network/ │ │ ├── CMakeLists.txt │ │ ├── Socket.cxx │ │ ├── Socket.h │ │ ├── TcpSocket.cxx │ │ ├── TcpSocket.h │ │ ├── UnixSocket.cxx │ │ └── UnixSocket.h │ ├── rdr/ │ │ ├── AESInStream.cxx │ │ ├── AESInStream.h │ │ ├── AESOutStream.cxx │ │ ├── AESOutStream.h │ │ ├── BufferedInStream.cxx │ │ ├── BufferedInStream.h │ │ ├── BufferedOutStream.cxx │ │ ├── BufferedOutStream.h │ │ ├── CMakeLists.txt │ │ ├── FdInStream.cxx │ │ ├── FdInStream.h │ │ ├── FdOutStream.cxx │ │ ├── FdOutStream.h │ │ ├── FileInStream.cxx │ │ ├── FileInStream.h │ │ ├── HexInStream.cxx │ │ ├── HexInStream.h │ │ ├── HexOutStream.cxx │ │ ├── HexOutStream.h │ │ ├── InStream.h │ │ ├── MemInStream.h │ │ ├── MemOutStream.h │ │ ├── OutStream.h │ │ ├── RandomStream.cxx │ │ ├── RandomStream.h │ │ ├── TLSException.cxx │ │ ├── TLSException.h │ │ ├── TLSInStream.cxx │ │ ├── TLSInStream.h │ │ ├── TLSOutStream.cxx │ │ ├── TLSOutStream.h │ │ ├── TLSSocket.cxx │ │ ├── TLSSocket.h │ │ ├── ZlibInStream.cxx │ │ ├── ZlibInStream.h │ │ ├── ZlibOutStream.cxx │ │ └── ZlibOutStream.h │ └── rfb/ │ ├── AccessRights.cxx │ ├── AccessRights.h │ ├── Blacklist.cxx │ ├── Blacklist.h │ ├── CConnection.cxx │ ├── CConnection.h │ ├── CMakeLists.txt │ ├── CMsgHandler.h │ ├── CMsgReader.cxx │ ├── CMsgReader.h │ ├── CMsgWriter.cxx │ ├── CMsgWriter.h │ ├── CSecurity.h │ ├── CSecurityDH.cxx │ ├── CSecurityDH.h │ ├── CSecurityMSLogonII.cxx │ ├── CSecurityMSLogonII.h │ ├── CSecurityNone.h │ ├── CSecurityPlain.cxx │ ├── CSecurityPlain.h │ ├── CSecurityRSAAES.cxx │ ├── CSecurityRSAAES.h │ ├── CSecurityStack.cxx │ ├── CSecurityStack.h │ ├── CSecurityTLS.cxx │ ├── CSecurityTLS.h │ ├── CSecurityVeNCrypt.cxx │ ├── CSecurityVeNCrypt.h │ ├── CSecurityVncAuth.cxx │ ├── CSecurityVncAuth.h │ ├── ClientParams.cxx │ ├── ClientParams.h │ ├── ComparingUpdateTracker.cxx │ ├── ComparingUpdateTracker.h │ ├── Congestion.cxx │ ├── Congestion.h │ ├── CopyRectDecoder.cxx │ ├── CopyRectDecoder.h │ ├── Cursor.cxx │ ├── Cursor.h │ ├── DecodeManager.cxx │ ├── DecodeManager.h │ ├── Decoder.cxx │ ├── Decoder.h │ ├── EncodeManager.cxx │ ├── EncodeManager.h │ ├── Encoder.cxx │ ├── Encoder.h │ ├── Exception.h │ ├── H264Decoder.cxx │ ├── H264Decoder.h │ ├── H264DecoderContext.cxx │ ├── H264DecoderContext.h │ ├── H264LibavDecoderContext.cxx │ ├── H264LibavDecoderContext.h │ ├── H264WinDecoderContext.cxx │ ├── H264WinDecoderContext.h │ ├── HextileDecoder.cxx │ ├── HextileDecoder.h │ ├── HextileEncoder.cxx │ ├── HextileEncoder.h │ ├── JPEGDecoder.cxx │ ├── JPEGDecoder.h │ ├── JPEGEncoder.cxx │ ├── JPEGEncoder.h │ ├── JpegCompressor.cxx │ ├── JpegCompressor.h │ ├── JpegDecompressor.cxx │ ├── JpegDecompressor.h │ ├── KeyRemapper.cxx │ ├── KeyRemapper.h │ ├── KeysymStr.c │ ├── KeysymStr.h │ ├── Palette.h │ ├── PixelBuffer.cxx │ ├── PixelBuffer.h │ ├── PixelFormat.cxx │ ├── PixelFormat.h │ ├── PixelFormat.inl │ ├── RREDecoder.cxx │ ├── RREDecoder.h │ ├── RREEncoder.cxx │ ├── RREEncoder.h │ ├── RawDecoder.cxx │ ├── RawDecoder.h │ ├── RawEncoder.cxx │ ├── RawEncoder.h │ ├── SConnection.cxx │ ├── SConnection.h │ ├── SDesktop.h │ ├── SMsgHandler.h │ ├── SMsgReader.cxx │ ├── SMsgReader.h │ ├── SMsgWriter.cxx │ ├── SMsgWriter.h │ ├── SSecurity.h │ ├── SSecurityNone.h │ ├── SSecurityPlain.cxx │ ├── SSecurityPlain.h │ ├── SSecurityRSAAES.cxx │ ├── SSecurityRSAAES.h │ ├── SSecurityStack.cxx │ ├── SSecurityStack.h │ ├── SSecurityTLS.cxx │ ├── SSecurityTLS.h │ ├── SSecurityVeNCrypt.cxx │ ├── SSecurityVeNCrypt.h │ ├── SSecurityVncAuth.cxx │ ├── SSecurityVncAuth.h │ ├── ScreenSet.h │ ├── Security.cxx │ ├── Security.h │ ├── SecurityClient.cxx │ ├── SecurityClient.h │ ├── SecurityServer.cxx │ ├── SecurityServer.h │ ├── ServerCore.cxx │ ├── ServerCore.h │ ├── ServerParams.cxx │ ├── ServerParams.h │ ├── TightConstants.h │ ├── TightDecoder.cxx │ ├── TightDecoder.h │ ├── TightEncoder.cxx │ ├── TightEncoder.h │ ├── TightJPEGEncoder.cxx │ ├── TightJPEGEncoder.h │ ├── UnixPasswordValidator.cxx │ ├── UnixPasswordValidator.h │ ├── UpdateTracker.cxx │ ├── UpdateTracker.h │ ├── VNCSConnectionST.cxx │ ├── VNCSConnectionST.h │ ├── VNCServer.h │ ├── VNCServerST.cxx │ ├── VNCServerST.h │ ├── WinPasswdValidator.cxx │ ├── WinPasswdValidator.h │ ├── XF86keysym.h │ ├── ZRLEDecoder.cxx │ ├── ZRLEDecoder.h │ ├── ZRLEEncoder.cxx │ ├── ZRLEEncoder.h │ ├── clipboardTypes.h │ ├── d3des.c │ ├── d3des.h │ ├── encodings.cxx │ ├── encodings.h │ ├── fenceTypes.h │ ├── hextileConstants.h │ ├── keysymdef.h │ ├── ks_tables.h │ ├── ledStates.h │ ├── msgTypes.h │ ├── obfuscate.cxx │ ├── obfuscate.h │ ├── qemuTypes.h │ └── screenTypes.h ├── config.h.in ├── contrib/ │ └── packages/ │ ├── deb/ │ │ ├── ubuntu-jammy/ │ │ │ └── debian/ │ │ │ ├── changelog │ │ │ ├── compat │ │ │ ├── control │ │ │ ├── copyright │ │ │ ├── rules │ │ │ ├── source/ │ │ │ │ └── format │ │ │ ├── tigervncserver.postinst.in │ │ │ ├── tigervncserver.prerm │ │ │ ├── xorg-source-patches/ │ │ │ │ ├── 516_tigervnc-xorg-manpages.patch │ │ │ │ └── debian_libtool.patch │ │ │ ├── xtigervncviewer.menu │ │ │ ├── xtigervncviewer.postinst │ │ │ └── xtigervncviewer.prerm │ │ └── ubuntu-noble/ │ │ └── debian/ │ │ ├── changelog │ │ ├── compat │ │ ├── control │ │ ├── copyright │ │ ├── rules │ │ ├── source/ │ │ │ └── format │ │ ├── tigervncserver.postinst.in │ │ ├── tigervncserver.prerm │ │ ├── xorg-source-patches/ │ │ │ ├── 516_tigervnc-xorg-manpages.patch │ │ │ └── debian_libtool.patch │ │ ├── xtigervncviewer.menu │ │ ├── xtigervncviewer.postinst │ │ └── xtigervncviewer.prerm │ └── rpm/ │ ├── el10/ │ │ ├── SOURCES/ │ │ │ └── 0001-configure.ac-search-for-the-fontrootdir-ourselves.patch │ │ └── SPECS/ │ │ └── tigervnc.spec │ ├── el8/ │ │ ├── SOURCES/ │ │ │ └── 10-libvnc.conf │ │ └── SPECS/ │ │ └── tigervnc.spec │ └── el9/ │ ├── SOURCES/ │ │ └── 10-libvnc.conf │ └── SPECS/ │ └── tigervnc.spec ├── doc/ │ └── keyboard-test.txt ├── java/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── cmake/ │ │ └── SignJar.cmake │ └── com/ │ ├── jcraft/ │ │ ├── jsch/ │ │ │ ├── Buffer.java │ │ │ ├── ChangeLog │ │ │ ├── Channel.java │ │ │ ├── ChannelAgentForwarding.java │ │ │ ├── ChannelDirectTCPIP.java │ │ │ ├── ChannelExec.java │ │ │ ├── ChannelForwardedTCPIP.java │ │ │ ├── ChannelSession.java │ │ │ ├── ChannelSftp.java │ │ │ ├── ChannelShell.java │ │ │ ├── ChannelSubsystem.java │ │ │ ├── ChannelX11.java │ │ │ ├── Cipher.java │ │ │ ├── CipherNone.java │ │ │ ├── Compression.java │ │ │ ├── ConfigRepository.java │ │ │ ├── DH.java │ │ │ ├── DHEC256.java │ │ │ ├── DHEC384.java │ │ │ ├── DHEC521.java │ │ │ ├── DHECN.java │ │ │ ├── DHG1.java │ │ │ ├── DHG14.java │ │ │ ├── DHGEX.java │ │ │ ├── DHGEX256.java │ │ │ ├── ECDH.java │ │ │ ├── ForwardedTCPIPDaemon.java │ │ │ ├── GSSContext.java │ │ │ ├── HASH.java │ │ │ ├── HostKey.java │ │ │ ├── HostKeyRepository.java │ │ │ ├── IO.java │ │ │ ├── Identity.java │ │ │ ├── IdentityFile.java │ │ │ ├── IdentityRepository.java │ │ │ ├── JSch.java │ │ │ ├── JSchAuthCancelException.java │ │ │ ├── JSchException.java │ │ │ ├── JSchPartialAuthException.java │ │ │ ├── KeyExchange.java │ │ │ ├── KeyPair.java │ │ │ ├── KeyPairDSA.java │ │ │ ├── KeyPairECDSA.java │ │ │ ├── KeyPairGenDSA.java │ │ │ ├── KeyPairGenECDSA.java │ │ │ ├── KeyPairGenRSA.java │ │ │ ├── KeyPairPKCS8.java │ │ │ ├── KeyPairRSA.java │ │ │ ├── KnownHosts.java │ │ │ ├── LICENSE.txt │ │ │ ├── LocalIdentityRepository.java │ │ │ ├── Logger.java │ │ │ ├── MAC.java │ │ │ ├── OpenSSHConfig.java │ │ │ ├── PBKDF.java │ │ │ ├── Packet.java │ │ │ ├── PortWatcher.java │ │ │ ├── Proxy.java │ │ │ ├── ProxyHTTP.java │ │ │ ├── ProxySOCKS4.java │ │ │ ├── ProxySOCKS5.java │ │ │ ├── README │ │ │ ├── Random.java │ │ │ ├── Request.java │ │ │ ├── RequestAgentForwarding.java │ │ │ ├── RequestEnv.java │ │ │ ├── RequestExec.java │ │ │ ├── RequestPtyReq.java │ │ │ ├── RequestSftp.java │ │ │ ├── RequestShell.java │ │ │ ├── RequestSignal.java │ │ │ ├── RequestSubsystem.java │ │ │ ├── RequestWindowChange.java │ │ │ ├── RequestX11.java │ │ │ ├── ServerSocketFactory.java │ │ │ ├── Session.java │ │ │ ├── SftpATTRS.java │ │ │ ├── SftpException.java │ │ │ ├── SftpProgressMonitor.java │ │ │ ├── SftpStatVFS.java │ │ │ ├── Signature.java │ │ │ ├── SignatureDSA.java │ │ │ ├── SignatureECDSA.java │ │ │ ├── SignatureRSA.java │ │ │ ├── SocketFactory.java │ │ │ ├── UIKeyboardInteractive.java │ │ │ ├── UserAuth.java │ │ │ ├── UserAuthGSSAPIWithMIC.java │ │ │ ├── UserAuthKeyboardInteractive.java │ │ │ ├── UserAuthNone.java │ │ │ ├── UserAuthPassword.java │ │ │ ├── UserAuthPublicKey.java │ │ │ ├── UserInfo.java │ │ │ ├── Util.java │ │ │ ├── jce/ │ │ │ │ ├── AES128CBC.java │ │ │ │ ├── AES128CTR.java │ │ │ │ ├── AES192CBC.java │ │ │ │ ├── AES192CTR.java │ │ │ │ ├── AES256CBC.java │ │ │ │ ├── AES256CTR.java │ │ │ │ ├── ARCFOUR.java │ │ │ │ ├── ARCFOUR128.java │ │ │ │ ├── ARCFOUR256.java │ │ │ │ ├── BlowfishCBC.java │ │ │ │ ├── DH.java │ │ │ │ ├── ECDH256.java │ │ │ │ ├── ECDH384.java │ │ │ │ ├── ECDH521.java │ │ │ │ ├── ECDHN.java │ │ │ │ ├── HMAC.java │ │ │ │ ├── HMACMD5.java │ │ │ │ ├── HMACMD596.java │ │ │ │ ├── HMACSHA1.java │ │ │ │ ├── HMACSHA196.java │ │ │ │ ├── HMACSHA256.java │ │ │ │ ├── HMACSHA512.java │ │ │ │ ├── KeyPairGenDSA.java │ │ │ │ ├── KeyPairGenECDSA.java │ │ │ │ ├── KeyPairGenRSA.java │ │ │ │ ├── MD5.java │ │ │ │ ├── PBKDF.java │ │ │ │ ├── Random.java │ │ │ │ ├── SHA1.java │ │ │ │ ├── SHA256.java │ │ │ │ ├── SHA384.java │ │ │ │ ├── SHA512.java │ │ │ │ ├── SignatureDSA.java │ │ │ │ ├── SignatureECDSA.java │ │ │ │ ├── SignatureRSA.java │ │ │ │ ├── TripleDESCBC.java │ │ │ │ └── TripleDESCTR.java │ │ │ ├── jcraft/ │ │ │ │ ├── Compression.java │ │ │ │ ├── HMAC.java │ │ │ │ ├── HMACMD5.java │ │ │ │ ├── HMACMD596.java │ │ │ │ ├── HMACSHA1.java │ │ │ │ └── HMACSHA196.java │ │ │ └── jgss/ │ │ │ └── GSSContextKrb5.java │ │ └── jzlib/ │ │ ├── Adler32.java │ │ ├── CRC32.java │ │ ├── ChangeLog │ │ ├── Checksum.java │ │ ├── Deflate.java │ │ ├── Deflater.java │ │ ├── DeflaterOutputStream.java │ │ ├── GZIPException.java │ │ ├── GZIPHeader.java │ │ ├── GZIPInputStream.java │ │ ├── GZIPOutputStream.java │ │ ├── InfBlocks.java │ │ ├── InfCodes.java │ │ ├── InfTree.java │ │ ├── Inflate.java │ │ ├── Inflater.java │ │ ├── InflaterInputStream.java │ │ ├── JZlib.java │ │ ├── LICENSE.txt │ │ ├── README │ │ ├── StaticTree.java │ │ ├── Tree.java │ │ ├── ZInputStream.java │ │ ├── ZOutputStream.java │ │ ├── ZStream.java │ │ └── ZStreamException.java │ └── tigervnc/ │ ├── network/ │ │ ├── FileDescriptor.java │ │ ├── SSLEngineManager.java │ │ ├── Socket.java │ │ ├── SocketDescriptor.java │ │ ├── SocketException.java │ │ ├── SocketListener.java │ │ ├── TcpListener.java │ │ └── TcpSocket.java │ ├── rdr/ │ │ ├── AESEAXCipher.java │ │ ├── AESInStream.java │ │ ├── AESOutStream.java │ │ ├── EndOfStream.java │ │ ├── Exception.java │ │ ├── FdInStream.java │ │ ├── FdInStreamBlockCallback.java │ │ ├── FdOutStream.java │ │ ├── InStream.java │ │ ├── MemInStream.java │ │ ├── MemOutStream.java │ │ ├── OutStream.java │ │ ├── SystemException.java │ │ ├── TLSException.java │ │ ├── TLSInStream.java │ │ ├── TLSOutStream.java │ │ ├── TimedOut.java │ │ ├── WarningException.java │ │ └── ZlibInStream.java │ ├── rfb/ │ │ ├── AliasParameter.java │ │ ├── AuthFailureException.java │ │ ├── BoolParameter.java │ │ ├── CConnection.java │ │ ├── CMsgHandler.java │ │ ├── CMsgReader.java │ │ ├── CMsgWriter.java │ │ ├── CSecurity.java │ │ ├── CSecurityIdent.java │ │ ├── CSecurityNone.java │ │ ├── CSecurityPlain.java │ │ ├── CSecurityRSAAES.java │ │ ├── CSecurityStack.java │ │ ├── CSecurityTLS.java │ │ ├── CSecurityVeNCrypt.java │ │ ├── CSecurityVncAuth.java │ │ ├── Configuration.java │ │ ├── ConnFailedException.java │ │ ├── CopyRectDecoder.java │ │ ├── Cursor.java │ │ ├── DecodeManager.java │ │ ├── Decoder.java │ │ ├── DesCipher.java │ │ ├── Encoder.java │ │ ├── Encodings.java │ │ ├── Exception.java │ │ ├── FullFramePixelBuffer.java │ │ ├── Hextile.java │ │ ├── HextileDecoder.java │ │ ├── Hostname.java │ │ ├── IntParameter.java │ │ ├── JpegCompressor.java │ │ ├── JpegDecompressor.java │ │ ├── Keysym2ucs.java │ │ ├── Keysymdef.java │ │ ├── LogWriter.java │ │ ├── ManagedPixelBuffer.java │ │ ├── ModifiablePixelBuffer.java │ │ ├── MsgTypes.java │ │ ├── PixelBuffer.java │ │ ├── PixelFormat.java │ │ ├── Point.java │ │ ├── RREDecoder.java │ │ ├── RawDecoder.java │ │ ├── Rect.java │ │ ├── Region.java │ │ ├── Screen.java │ │ ├── ScreenSet.java │ │ ├── Security.java │ │ ├── SecurityClient.java │ │ ├── ServerParams.java │ │ ├── StringParameter.java │ │ ├── TightDecoder.java │ │ ├── UserMsgBox.java │ │ ├── UserPasswdGetter.java │ │ ├── VncAuth.java │ │ ├── VoidParameter.java │ │ ├── ZRLEDecoder.java │ │ ├── fenceTypes.java │ │ └── screenTypes.java │ └── vncviewer/ │ ├── CConn.java │ ├── ClipboardDialog.java │ ├── DesktopWindow.java │ ├── Dialog.java │ ├── ExtProcess.java │ ├── FileUtils.java │ ├── JavaPixelBuffer.java │ ├── KeyMap.java │ ├── LICENCE.TXT │ ├── MANIFEST.MF │ ├── MenuKey.java │ ├── OptionsDialog.java │ ├── Parameters.java │ ├── PasswdDialog.java │ ├── PlatformPixelBuffer.java │ ├── README │ ├── ServerDialog.java │ ├── Tunnel.java │ ├── UserDialog.java │ ├── UserPreferences.java │ ├── Viewport.java │ ├── VncViewer.java │ └── timestamp.in ├── media/ │ ├── CMakeLists.txt │ ├── icons/ │ │ └── tigervnc.icns │ ├── insecure.xpm │ └── secure.xpm ├── po/ │ ├── CMakeLists.txt │ ├── DO_NOT_EDIT │ ├── LINGUAS │ ├── ar.po │ ├── bg.po │ ├── checkaccels │ ├── cs.po │ ├── da.po │ ├── de.po │ ├── el.po │ ├── eo.po │ ├── es.po │ ├── fi.po │ ├── fr.po │ ├── fur.po │ ├── he.po │ ├── hu.po │ ├── id.po │ ├── it.po │ ├── ka.po │ ├── ko.po │ ├── nl.po │ ├── pl.po │ ├── pt_BR.po │ ├── ro.po │ ├── ru.po │ ├── sk.po │ ├── sr.po │ ├── sv.po │ ├── tigervnc.pot │ ├── tr.po │ ├── uk.po │ ├── vi.po │ ├── zh_CN.po │ └── zh_TW.po ├── release/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── Info.plist.in │ ├── makemacapp.in │ ├── maketarball.in │ ├── tigervnc.iss.in │ └── winvnc.iss.in ├── tests/ │ ├── .gitignore │ ├── CMakeLists.txt │ ├── perf/ │ │ ├── CMakeLists.txt │ │ ├── convperf.cxx │ │ ├── decperf.cxx │ │ ├── encperf.cxx │ │ ├── fbperf.cxx │ │ ├── results/ │ │ │ ├── multicore/ │ │ │ │ ├── README │ │ │ │ └── multicore.ods │ │ │ └── notrans/ │ │ │ ├── README │ │ │ ├── armhf.csv │ │ │ ├── i386.csv │ │ │ └── x86_64.csv │ │ ├── util.cxx │ │ └── util.h │ └── unit/ │ ├── CMakeLists.txt │ ├── configargs.cxx │ ├── conv.cxx │ ├── convertlf.cxx │ ├── emulatemb.cxx │ ├── gesturehandler.cxx │ ├── hostport.cxx │ ├── parameters.cxx │ ├── pixelformat.cxx │ ├── shortcuthandler.cxx │ └── unicode.cxx ├── unix/ │ ├── CMakeLists.txt │ ├── common/ │ │ ├── CMakeLists.txt │ │ ├── RandrGlue.h │ │ ├── randr.cxx │ │ └── unixcommon.h │ ├── tx/ │ │ ├── CMakeLists.txt │ │ ├── TXButton.h │ │ ├── TXCheckbox.h │ │ ├── TXDialog.h │ │ ├── TXLabel.h │ │ ├── TXWindow.cxx │ │ └── TXWindow.h │ ├── w0vncserver/ │ │ ├── CMakeLists.txt │ │ ├── GSocketSource.cxx │ │ ├── GSocketSource.h │ │ ├── RFBTimerSource.cxx │ │ ├── RFBTimerSource.h │ │ ├── parameters.cxx │ │ ├── parameters.h │ │ ├── pipewire/ │ │ │ ├── PipeWirePixelBuffer.cxx │ │ │ ├── PipeWirePixelBuffer.h │ │ │ ├── PipeWireSource.cxx │ │ │ ├── PipeWireSource.h │ │ │ ├── PipeWireStream.cxx │ │ │ └── PipeWireStream.h │ │ ├── portals/ │ │ │ ├── Clipboard.cxx │ │ │ ├── Clipboard.h │ │ │ ├── PortalDesktop.cxx │ │ │ ├── PortalDesktop.h │ │ │ ├── PortalProxy.cxx │ │ │ ├── PortalProxy.h │ │ │ ├── RemoteDesktop.cxx │ │ │ ├── RemoteDesktop.h │ │ │ └── portalConstants.h │ │ ├── qnum_to_xorgevdev.c │ │ ├── w0vncserver-forget.cxx │ │ ├── w0vncserver-forget.man │ │ ├── w0vncserver.cxx │ │ ├── w0vncserver.h │ │ ├── w0vncserver.man │ │ ├── wayland/ │ │ │ ├── GWaylandSource.cxx │ │ │ ├── GWaylandSource.h │ │ │ ├── WaylandDesktop.cxx │ │ │ ├── WaylandDesktop.h │ │ │ ├── WaylandPixelBuffer.cxx │ │ │ ├── WaylandPixelBuffer.h │ │ │ ├── objects/ │ │ │ │ ├── DataControl.cxx │ │ │ │ ├── DataControl.h │ │ │ │ ├── Display.cxx │ │ │ │ ├── Display.h │ │ │ │ ├── ImageCaptureSource.cxx │ │ │ │ ├── ImageCaptureSource.h │ │ │ │ ├── ImageCopyCaptureCursorSession.cxx │ │ │ │ ├── ImageCopyCaptureCursorSession.h │ │ │ │ ├── ImageCopyCaptureManager.cxx │ │ │ │ ├── ImageCopyCaptureManager.h │ │ │ │ ├── ImageCopyCaptureSession.cxx │ │ │ │ ├── ImageCopyCaptureSession.h │ │ │ │ ├── Keyboard.cxx │ │ │ │ ├── Keyboard.h │ │ │ │ ├── Object.cxx │ │ │ │ ├── Object.h │ │ │ │ ├── Output.cxx │ │ │ │ ├── Output.h │ │ │ │ ├── Pointer.cxx │ │ │ │ ├── Pointer.h │ │ │ │ ├── ScreencopyManager.cxx │ │ │ │ ├── ScreencopyManager.h │ │ │ │ ├── Seat.cxx │ │ │ │ ├── Seat.h │ │ │ │ ├── Shm.cxx │ │ │ │ ├── Shm.h │ │ │ │ ├── ShmPool.cxx │ │ │ │ ├── ShmPool.h │ │ │ │ ├── VirtualKeyboard.cxx │ │ │ │ ├── VirtualKeyboard.h │ │ │ │ ├── VirtualPointer.cxx │ │ │ │ └── VirtualPointer.h │ │ │ └── protocols/ │ │ │ ├── ext-data-control-v1.xml │ │ │ ├── ext-foreign-toplevel-list-v1.xml │ │ │ ├── ext-image-capture-source-v1.xml │ │ │ ├── ext-image-copy-capture-v1.xml │ │ │ ├── virtual-keyboard-unstable-v1.xml │ │ │ ├── wlr-screencopy-unstable-v1.xml │ │ │ └── wlr-virtual-pointer-unstable-v1.xml │ │ └── xkb_to_qnum.c │ ├── xserver/ │ │ ├── .gitignore │ │ └── hw/ │ │ └── vnc/ │ │ ├── .gitignore │ │ ├── Makefile.am │ │ ├── RFBGlue.cc │ │ ├── RFBGlue.h │ │ ├── RandrGlue.c │ │ ├── XorgGlue.c │ │ ├── XorgGlue.h │ │ ├── XserverDesktop.cc │ │ ├── XserverDesktop.h │ │ ├── Xvnc.man │ │ ├── buildtime.c │ │ ├── qnum_to_xorgevdev.c │ │ ├── qnum_to_xorgkbd.c │ │ ├── vncBlockHandler.c │ │ ├── vncBlockHandler.h │ │ ├── vncDRI3.c │ │ ├── vncDRI3.h │ │ ├── vncDRI3Draw.c │ │ ├── vncExt.c │ │ ├── vncExtInit.cc │ │ ├── vncExtInit.h │ │ ├── vncHooks.c │ │ ├── vncHooks.h │ │ ├── vncInput.c │ │ ├── vncInput.h │ │ ├── vncInputXKB.c │ │ ├── vncModule.c │ │ ├── vncPresent.c │ │ ├── vncPresent.h │ │ ├── vncSelection.c │ │ ├── vncSelection.h │ │ ├── xorg-version.h │ │ └── xvnc.c │ ├── xserver120.patch │ └── xserver21.patch └── win/ ├── CMakeLists.txt ├── logmessages/ │ ├── messages.h │ ├── messages.mc │ └── messages.rc ├── resdefs.h.in ├── rfb_win32/ │ ├── AboutDialog.cxx │ ├── AboutDialog.h │ ├── BitmapInfo.h │ ├── CMakeLists.txt │ ├── CleanDesktop.cxx │ ├── CleanDesktop.h │ ├── Clipboard.cxx │ ├── Clipboard.h │ ├── CompatibleBitmap.h │ ├── ComputerName.h │ ├── CurrentUser.cxx │ ├── CurrentUser.h │ ├── DIBSectionBuffer.cxx │ ├── DIBSectionBuffer.h │ ├── DeviceContext.cxx │ ├── DeviceContext.h │ ├── DeviceFrameBuffer.cxx │ ├── DeviceFrameBuffer.h │ ├── Dialog.cxx │ ├── Dialog.h │ ├── EventManager.cxx │ ├── EventManager.h │ ├── Handle.h │ ├── IconInfo.h │ ├── IntervalTimer.h │ ├── LaunchProcess.cxx │ ├── LaunchProcess.h │ ├── ListViewControl.cxx │ ├── ListViewControl.h │ ├── LocalMem.h │ ├── ModuleFileName.h │ ├── MonitorInfo.cxx │ ├── MonitorInfo.h │ ├── MsgBox.h │ ├── MsgWindow.cxx │ ├── MsgWindow.h │ ├── RegConfig.cxx │ ├── RegConfig.h │ ├── Registry.cxx │ ├── Registry.h │ ├── SDisplay.cxx │ ├── SDisplay.h │ ├── SDisplayCorePolling.cxx │ ├── SDisplayCorePolling.h │ ├── SDisplayCoreWMHooks.cxx │ ├── SDisplayCoreWMHooks.h │ ├── SInput.cxx │ ├── SInput.h │ ├── Security.cxx │ ├── Security.h │ ├── SecurityPage.cxx │ ├── SecurityPage.h │ ├── Service.cxx │ ├── Service.h │ ├── SocketManager.cxx │ ├── SocketManager.h │ ├── TrayIcon.h │ ├── TsSessions.cxx │ ├── TsSessions.h │ ├── WMCursor.cxx │ ├── WMCursor.h │ ├── WMHooks.cxx │ ├── WMHooks.h │ ├── WMNotifier.cxx │ ├── WMNotifier.h │ ├── WMPoller.cxx │ ├── WMPoller.h │ ├── WMShatter.cxx │ ├── WMShatter.h │ ├── WMWindowCopyRect.cxx │ ├── WMWindowCopyRect.h │ ├── Win32Util.cxx │ ├── Win32Util.h │ ├── keymap.h │ └── resource.h ├── vncconfig/ │ ├── Authentication.h │ ├── CMakeLists.txt │ ├── Connections.h │ ├── Desktop.h │ ├── Hooking.h │ ├── Inputs.h │ ├── Legacy.cxx │ ├── Legacy.h │ ├── PasswordDialog.cxx │ ├── PasswordDialog.h │ ├── Sharing.h │ ├── resource.h │ ├── vncconfig.cxx │ ├── vncconfig.exe.manifest │ ├── vncconfig.exe.manifest64 │ └── vncconfig.rc ├── winvnc/ │ ├── AddNewClientDialog.h │ ├── CMakeLists.txt │ ├── ControlPanel.cxx │ ├── ControlPanel.h │ ├── ListConnInfo.h │ ├── ManagedListener.cxx │ ├── ManagedListener.h │ ├── QueryConnectDialog.cxx │ ├── QueryConnectDialog.h │ ├── STrayIcon.cxx │ ├── STrayIcon.h │ ├── VNCServerService.cxx │ ├── VNCServerService.h │ ├── VNCServerWin32.cxx │ ├── VNCServerWin32.h │ ├── buildTime.cxx │ ├── resource.h │ ├── winvnc.cxx │ ├── winvnc.rc │ ├── winvnc4.exe.manifest │ └── winvnc4.exe.manifest64 └── wm_hooks/ ├── CMakeLists.txt ├── resource.h ├── wm_hooks.cxx ├── wm_hooks.h └── wm_hooks.rc ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Client (please complete the following information):** - OS: [e.g. Windows 8.1] - VNC client: [e.g. TigerVNC, or UltraVNC] - VNC client version: [e.g. 1.8.0] - Client downloaded from: [e.g. my Linux distribution] **Server (please complete the following information):** - OS: [e.g. Windows 8.1] - VNC server: [e.g. TigerVNC, or UltraVNC] - VNC server version: [e.g. 1.8.0] - Server downloaded from: [e.g. my Linux distribution] - Server was started using: [e.g. `vncserver`] **Additional context** Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: Usage question or discussion url: https://groups.google.com/forum/#!forum/tigervnc-users about: Ask a question or start a discussion on how to use TigerVNC - name: Development question or discussion url: https://groups.google.com/forum/#!forum/tigervnc-devel about: Ask a question or start a discussion about TigerVNC's code ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .github/containers/jammy/Dockerfile ================================================ FROM ubuntu:jammy ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update RUN apt-get -y install packaging-dev equivs RUN useradd -s /bin/bash -m deb RUN echo >> /etc/sudoers RUN echo "deb ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER deb WORKDIR /home/deb ================================================ FILE: .github/containers/jammy/build.sh ================================================ #!/bin/bash set -e set -x ## Basic variables CURDIR=$(dirname $(readlink -f $0)) TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) DEBDIR=${TOPDIR}/contrib/packages/deb/ubuntu-jammy VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') ## Prepare the build directory rm -rf ${CURDIR}/build mkdir -p ${CURDIR}/build chmod a+w ${CURDIR}/build [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/build ## Copy over the source code (cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | xz > ${CURDIR}/build/tigervnc_${VERSION}.orig.tar.xz ## Copy over the packaging files cp -r ${DEBDIR}/debian ${CURDIR}/build/debian chmod a+x ${CURDIR}/build/debian/rules # Assemble a fake changelog entry to get the correct version cat - > ${CURDIR}/build/debian/changelog << EOT tigervnc (${VERSION}-1ubuntu1) UNRELEASED; urgency=low * Automated build for TigerVNC -- Build bot $(date -R) EOT cat ${DEBDIR}/debian/changelog >> ${CURDIR}/build/debian/changelog ## Start the build docker run --volume ${CURDIR}/build:/home/deb/build --interactive --rm tigervnc/${DOCKER} \ bash -e -x -c " tar -C ~/build -axf ~/build/tigervnc_${VERSION}.orig.tar.xz cp -a ~/build/debian ~/build/tigervnc-${VERSION}/debian sudo apt-get update mk-build-deps ~/build/tigervnc-${VERSION}/debian/control sudo DEBIAN_FRONTEND=noninteractive \ apt-get install -y ~/tigervnc-build-deps_*.deb cd ~/build/tigervnc-${VERSION} && dpkg-buildpackage " mkdir -p ${CURDIR}/result cp -av ${CURDIR}/build/*.deb ${CURDIR}/result cp -av ${CURDIR}/build/*.ddeb ${CURDIR}/result ================================================ FILE: .github/containers/noble/Dockerfile ================================================ FROM ubuntu:noble ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update RUN apt-get -y install packaging-dev equivs RUN useradd -s /bin/bash -m deb RUN echo >> /etc/sudoers RUN echo "deb ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER deb WORKDIR /home/deb ================================================ FILE: .github/containers/noble/build.sh ================================================ #!/bin/bash set -e set -x ## Basic variables CURDIR=$(dirname $(readlink -f $0)) TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) DEBDIR=${TOPDIR}/contrib/packages/deb/ubuntu-noble VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') ## Prepare the build directory rm -rf ${CURDIR}/build mkdir -p ${CURDIR}/build chmod a+w ${CURDIR}/build [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/build ## Copy over the source code (cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | xz > ${CURDIR}/build/tigervnc_${VERSION}.orig.tar.xz ## Copy over the packaging files cp -r ${DEBDIR}/debian ${CURDIR}/build/debian chmod a+x ${CURDIR}/build/debian/rules # Assemble a fake changelog entry to get the correct version cat - > ${CURDIR}/build/debian/changelog << EOT tigervnc (${VERSION}-1ubuntu1) UNRELEASED; urgency=low * Automated build for TigerVNC -- Build bot $(date -R) EOT cat ${DEBDIR}/debian/changelog >> ${CURDIR}/build/debian/changelog ## Start the build docker run --volume ${CURDIR}/build:/home/deb/build --interactive --rm tigervnc/${DOCKER} \ bash -e -x -c " tar -C ~/build -axf ~/build/tigervnc_${VERSION}.orig.tar.xz cp -a ~/build/debian ~/build/tigervnc-${VERSION}/debian sudo apt-get update mk-build-deps ~/build/tigervnc-${VERSION}/debian/control sudo DEBIAN_FRONTEND=noninteractive \ apt-get install -y ~/tigervnc-build-deps_*.deb cd ~/build/tigervnc-${VERSION} && dpkg-buildpackage " mkdir -p ${CURDIR}/result cp -av ${CURDIR}/build/*.deb ${CURDIR}/result cp -av ${CURDIR}/build/*.ddeb ${CURDIR}/result ================================================ FILE: .github/containers/rocky10/Dockerfile ================================================ FROM rockylinux/rockylinux:10 RUN dnf -y group install 'Development Tools' RUN dnf -y install dnf-plugins-core sudo RUN dnf config-manager --set-enabled crb RUN dnf -y install epel-release RUN useradd -s /bin/bash -m rpm RUN echo >> /etc/sudoers RUN echo "rpm ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER rpm WORKDIR /home/rpm ================================================ FILE: .github/containers/rocky10/build.sh ================================================ #!/bin/bash set -e set -x ## Basic variables CURDIR=$(dirname $(readlink -f $0)) TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) RPMDIR=${TOPDIR}/contrib/packages/rpm/el10 VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') ## Prepare the build directory rm -rf ${CURDIR}/rpmbuild mkdir -p ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,SOURCES,SPECS,RPMS} chmod a+w ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,RPMS} [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/rpmbuild ## Copy over the packaging files cp ${RPMDIR}/SOURCES/* ${CURDIR}/rpmbuild/SOURCES cp ${RPMDIR}/SPECS/tigervnc.spec ${CURDIR}/rpmbuild/SPECS sed -i "s/@VERSION@/${VERSION}/" ${CURDIR}/rpmbuild/SPECS/tigervnc.spec ## Copy over the source code (cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | bzip2 > ${CURDIR}/rpmbuild/SOURCES/tigervnc-${VERSION}.tar.bz2 ## Download the xorg-server source code curl -L https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-21.1.18.tar.xz > ${CURDIR}/rpmbuild/SOURCES/xorg-server-21.1.18.tar.xz ## Start the build docker run --volume ${CURDIR}/rpmbuild:/home/rpm/rpmbuild --interactive --rm tigervnc/${DOCKER} \ bash -e -x -c " sudo dnf builddep -y ~/rpmbuild/SPECS/tigervnc.spec sudo chown 0.0 ~/rpmbuild/SOURCES/* sudo chown 0.0 ~/rpmbuild/SPECS/* rpmbuild -ba ~/rpmbuild/SPECS/tigervnc.spec " mkdir -p ${CURDIR}/result cp -av ${CURDIR}/rpmbuild/RPMS ${CURDIR}/result cp -av ${CURDIR}/rpmbuild/SRPMS ${CURDIR}/result ================================================ FILE: .github/containers/rocky8/Dockerfile ================================================ FROM rockylinux/rockylinux:8 RUN dnf -y group install 'Development Tools' RUN dnf -y install sudo RUN dnf -y install dnf-plugins-core RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm RUN dnf config-manager --set-enabled powertools RUN useradd -s /bin/bash -m rpm RUN echo >> /etc/sudoers RUN echo "rpm ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER rpm WORKDIR /home/rpm ================================================ FILE: .github/containers/rocky8/build.sh ================================================ #!/bin/bash set -e set -x ## Basic variables CURDIR=$(dirname $(readlink -f $0)) TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) RPMDIR=${TOPDIR}/contrib/packages/rpm/el8 VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') ## Prepare the build directory rm -rf ${CURDIR}/rpmbuild mkdir -p ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,SOURCES,SPECS,RPMS} chmod a+w ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,RPMS} [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/rpmbuild ## Copy over the packaging files cp ${RPMDIR}/SOURCES/* ${CURDIR}/rpmbuild/SOURCES cp ${RPMDIR}/SPECS/tigervnc.spec ${CURDIR}/rpmbuild/SPECS sed -i "s/@VERSION@/${VERSION}/" ${CURDIR}/rpmbuild/SPECS/tigervnc.spec ## Copy over the source code (cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | bzip2 > ${CURDIR}/rpmbuild/SOURCES/tigervnc-${VERSION}.tar.bz2 ## Start the build docker run --volume ${CURDIR}/rpmbuild:/home/rpm/rpmbuild --interactive --rm tigervnc/${DOCKER} \ bash -e -x -c " sudo dnf install -y xorg-x11-server-devel sudo dnf builddep -y ~/rpmbuild/SPECS/tigervnc.spec sudo chown 0.0 ~/rpmbuild/SOURCES/* sudo chown 0.0 ~/rpmbuild/SPECS/* rpmbuild -ba ~/rpmbuild/SPECS/tigervnc.spec " mkdir -p ${CURDIR}/result cp -av ${CURDIR}/rpmbuild/RPMS ${CURDIR}/result cp -av ${CURDIR}/rpmbuild/SRPMS ${CURDIR}/result ================================================ FILE: .github/containers/rocky9/Dockerfile ================================================ FROM rockylinux/rockylinux:9 RUN dnf -y group install 'Development Tools' RUN dnf -y install dnf-plugins-core sudo RUN dnf config-manager --set-enabled crb RUN useradd -s /bin/bash -m rpm RUN echo >> /etc/sudoers RUN echo "rpm ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER rpm WORKDIR /home/rpm ================================================ FILE: .github/containers/rocky9/build.sh ================================================ #!/bin/bash set -e set -x ## Basic variables CURDIR=$(dirname $(readlink -f $0)) TOPDIR=$(git rev-parse --show-toplevel 2>/dev/null) RPMDIR=${TOPDIR}/contrib/packages/rpm/el9 VERSION=$(grep '^set(VERSION ' ${TOPDIR}/CMakeLists.txt | sed 's@^set(VERSION \(.*\))@\1@') ## Prepare the build directory rm -rf ${CURDIR}/rpmbuild mkdir -p ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,SOURCES,SPECS,RPMS} chmod a+w ${CURDIR}/rpmbuild/{BUILD,BUILDROOT,SRPMS,RPMS} [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled && chcon -Rt container_file_t ${CURDIR}/rpmbuild ## Copy over the packaging files cp ${RPMDIR}/SOURCES/* ${CURDIR}/rpmbuild/SOURCES cp ${RPMDIR}/SPECS/tigervnc.spec ${CURDIR}/rpmbuild/SPECS sed -i "s/@VERSION@/${VERSION}/" ${CURDIR}/rpmbuild/SPECS/tigervnc.spec ## Copy over the source code (cd ${TOPDIR} && git archive --prefix tigervnc-${VERSION}/ HEAD) | bzip2 > ${CURDIR}/rpmbuild/SOURCES/tigervnc-${VERSION}.tar.bz2 ## Start the build docker run --volume ${CURDIR}/rpmbuild:/home/rpm/rpmbuild --interactive --rm tigervnc/${DOCKER} \ bash -e -x -c " sudo dnf install -y xorg-x11-server-devel sudo dnf builddep -y ~/rpmbuild/SPECS/tigervnc.spec sudo chown 0.0 ~/rpmbuild/SOURCES/* sudo chown 0.0 ~/rpmbuild/SPECS/* rpmbuild -ba ~/rpmbuild/SPECS/tigervnc.spec " mkdir -p ${CURDIR}/result cp -av ${CURDIR}/rpmbuild/RPMS ${CURDIR}/result cp -av ${CURDIR}/rpmbuild/SRPMS ${CURDIR}/result ================================================ FILE: .github/workflows/build.yml ================================================ name: Build on: [push, pull_request] jobs: build-linux: runs-on: ubuntu-latest timeout-minutes: 10 env: VERBOSE: 1 steps: - uses: actions/checkout@v4 - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y libfltk1.3-dev fluid gettext appstream sudo apt-get install -y libpixman-1-dev libjpeg-turbo8-dev sudo apt-get install -y libgnutls28-dev nettle-dev libgmp-dev sudo apt-get install -y libxtst-dev libxdamage-dev libxfixes-dev libxrandr-dev libpam-dev sudo apt-get install -y libavcodec-dev libavutil-dev libswscale-dev sudo apt-get install -y uuid-dev libglib2.0-dev libpipewire-0.3-dev sudo apt-get install -y libwayland-dev libxkbcommon-dev sudo apt-get install -y libgtest-dev - name: Configure run: | cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DENABLE_NLS=ON \ -DENABLE_H264=ON \ -DENABLE_GNUTLS=ON \ -DENABLE_NETTLE=ON \ -DBUILD_VIEWER=ON \ -S . -B build - name: Build working-directory: build run: make - name: Install working-directory: build run: make tarball - uses: actions/upload-artifact@v4 with: name: Linux (Ubuntu) path: build/tigervnc-*.tar.gz - name: Test working-directory: build run: ctest --test-dir tests/unit/ --output-junit test-results.xml - name: Upload test results uses: actions/upload-artifact@v4 if: always() with: name: test-results-linux path: build/tests/unit/test-results.xml build-windows: runs-on: windows-latest timeout-minutes: 20 env: VERBOSE: 1 defaults: run: shell: msys2 {0} steps: - uses: actions/checkout@v4 - uses: msys2/setup-msys2@v2 with: update: true - name: Install dependencies run: | pacman --sync --noconfirm --needed \ make mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake pacman --sync --noconfirm --needed \ mingw-w64-x86_64-fltk1.3 mingw-w64-x86_64-libjpeg-turbo \ mingw-w64-x86_64-gnutls mingw-w64-x86_64-pixman \ mingw-w64-x86_64-nettle mingw-w64-x86_64-gmp \ mingw-w64-x86_64-gtest - name: Configure run: | cmake \ -G "MSYS Makefiles" \ -DCMAKE_BUILD_TYPE=Debug \ -DENABLE_NLS=ON \ -DENABLE_H264=ON \ -DENABLE_GNUTLS=ON \ -DENABLE_NETTLE=ON \ -DBUILD_VIEWER=ON \ -S . -B build - name: Build working-directory: build run: make - name: Install working-directory: build env: MSYS2_PATH_TYPE: inherit run: make installer winvnc_installer - uses: actions/upload-artifact@v4 with: name: Windows path: build/release/tigervnc*.exe - name: Test working-directory: build run: ctest --test-dir tests/unit/ --output-junit test-results.xml - name: Upload test results uses: actions/upload-artifact@v4 if: always() with: name: test-results-windows path: build/tests/unit/test-results.xml build-macos: runs-on: macos-latest timeout-minutes: 20 env: VERBOSE: 1 steps: - uses: actions/checkout@v4 - name: Install dependencies run: | brew install fltk@1.3 pixman ffmpeg brew install gnutls nettle gmp brew install googletest brew link fltk@1.3 - name: Configure run: | cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DENABLE_NLS=ON \ -DENABLE_H264=ON \ -DENABLE_GNUTLS=ON \ -DENABLE_NETTLE=ON \ -DENABLE_WAYLAND=ON \ -DBUILD_VIEWER=ON \ -S . -B build - name: Build working-directory: build run: make - name: Install working-directory: build run: make dmg - uses: actions/upload-artifact@v4 with: name: macOS path: build/release/TigerVNC-*.dmg - name: Test working-directory: build run: ctest --test-dir tests/unit/ --output-junit test-results.xml - name: Upload test results uses: actions/upload-artifact@v4 if: always() with: name: test-results-macos path: build/tests/unit/test-results.xml build-java: runs-on: ubuntu-latest timeout-minutes: 5 env: VERBOSE: 1 strategy: matrix: java: [ '8', '11', '17', '21' ] steps: - uses: actions/checkout@v4 - name: Setup java uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} - name: Configure working-directory: java run: cmake -DCMAKE_BUILD_TYPE=Debug -S . -B build - name: Build working-directory: java/build run: make - uses: actions/upload-artifact@v4 with: name: Java (${{ matrix.java }}) path: java/build/VncViewer.jar build-packages: timeout-minutes: 20 strategy: matrix: target: - rocky8 - rocky9 - rocky10 - jammy - noble fail-fast: false runs-on: ubuntu-latest env: DOCKER: ${{ matrix.target }} steps: - uses: actions/checkout@v4 - name: Build image run: docker build -t tigervnc/$DOCKER .github/containers/$DOCKER - name: Build packages run: .github/containers/$DOCKER/build.sh - uses: actions/upload-artifact@v4 with: name: Packages (${{ matrix.target }}) path: .github/containers/${{ matrix.target }}/result ================================================ FILE: .github/workflows/test-report.yml ================================================ name: Test report on: workflow_run: workflows: ['build'] types: - completed jobs: report: runs-on: ubuntu-latest steps: - uses: dorny/test-reporter@v1 with: artifact: /test-results-(.*)/ name: Unit tests ($1) path: '*.xml' reporter: java-junit ================================================ FILE: .gitignore ================================================ *.[ao] *.mo *.la *.lo .deps .libs CMakeFiles CMakeCache.txt Makefile Makefile.in config.h cmake_install.cmake cmake_uninstall.cmake install_manifest.txt ================================================ FILE: BUILDING.txt ================================================ ******************************************************************************* ** Building TigerVNC ******************************************************************************* ================================ Build requirements (all systems) ================================ -- CMake (http://www.cmake.org) v3.10 or later -- gcc Development kits for the following packages: -- zlib -- pixman -- FLTK 1.3.3 or later -- If building TLS support: * GnuTLS 3.x * See "Building TLS Support" below. -- If building RSA-AES support: * Nettle 3.0 or later -- If building native language support (NLS): * Gnu gettext 0.14.4 or later * See "Building Native Language Support" below. -- libjpeg-turbo * "Normal" libjpegv6 is also supported, although it is not recommended as it is much slower. ========================= Build requirements (Unix) ========================= -- Non-Mac platforms: * Development kits for all standard X11 libraries * PAM -- If building Xvnc/libvnc.so: * Xorg server source code, 1.20 or later * All build requirements Xorg imposes (see its documentation) * patch -- If building x0vncserver with socket activation support: * libsystemd -- If building w0vncserver: * GLib (Gio + GObject) * libpipewire * libuuuid * libwayland-client * libxkbcommon -- Optional ffmpeg development kit support (libav) * You might have to enable additional repositories for this. E.g., on RHEL, EPEL and RPMFusion (free + nonfree) need to be enabled. -- If building vncpasswd with password quality check support: * libpwquality ============================ Build requirements (Windows) ============================ -- MinGW or MinGW-w64 -- Inno Setup (needed to build the TigerVNC installer) Inno Setup can be downloaded from http://www.jrsoftware.org/isinfo.php. You also need the Inno Setup Preprocessor, which is available in the Inno Setup QuickStart Pack. Add the directory containing iscc.exe (for instance, C:\Program Files\Inno Setup 5) to the system or user PATH environment variable prior to building TigerVNC. ========================= Build requirements (Java) ========================= -- Sun/Oracle JDK 1.7 or later or OpenJDK 7 or later -- See "Building Java support" below. ================== Out-of-tree builds ================== Binary objects, libraries, and executables are generated in the same directory from which cmake was executed (the "binary directory"), and this directory need not necessarily be the same as the TigerVNC source directory. You can create multiple independent binary directories, in which different versions of TigerVNC can be built from the same source tree using different compilers or settings. In the sections below, {build_directory} refers to the binary directory, whereas {source_directory} refers to the TigerVNC source directory. For in-tree builds, these directories are the same. ================= Building TigerVNC ================= Building the TigerVNC viewer on Unix/Mac systems ------------------------------------------------ The following procedure will build the TigerVNC viewer on Linux and Unix systems. cd {build_directory} cmake -G "Unix Makefiles" [additional CMake flags] {source_directory} make Building the TigerVNC server on Unix/Linux systems -------------------------------------------------- Building the TigerVNC server (Xvnc) is a bit trickier. Xvnc is typically built to use the X11 shared libraries provided with the system. The procedure for this is system-specific, since it requires specifying such things as font directories, but the general outline is as follows (this procedure assumes that the viewer has already been built, per above.) > cd {build_directory} If performing an out-of-tree build: > cp -R {source_directory}/unix/xserver unix/ > cp -R {xorg_source}/* unix/xserver/ (NOTE: {xorg_source} is the directory containing the Xorg source for the machine on which you are building TigerVNC. The most recent versions of Red Hat/CentOS/Fedora, for instance, provide an RPM called "xorg-x11-server-source", which installs the Xorg source under /usr/share/xorg-x11-server-source.) > cd unix/xserver/ > patch -p1 < {source_directory}/unix/xserver{version}.patch (where {version} matches the X server version you are building, such as "120" for version 1.20.x.) > autoreconf -fiv > ./configure --with-pic --without-dtrace --disable-static --disable-dri \ --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \ --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ --disable-config-hal --disable-config-udev --disable-dri2 --enable-glx \ --with-default-font-path="catalogue:/etc/X11/fontpath.d,built-ins" \ --with-xkb-path=/usr/share/X11/xkb \ --with-xkb-output=/var/lib/xkb \ --with-xkb-bin-directory=/usr/bin \ --with-serverconfig-path=/usr/lib64/xorg \ {additional configure options} (NOTE: This is merely an example that works with Red Hat Enterprise/CentOS 9 and recent Fedora releases. You should customize it for your particular system. In particular, it will be necessary to customize the XKB directory.) For a regular, in-tree build: > make TIGERVNC_SRCDIR={source_directory} If performing an out-of-tree build: > make TIGERVNC_SRCDIR={source_directory} TIGERVNC_BUILDDIR={build_directory} (NOTE: Use absolute paths for source_directory and build_directory) Building the Windows TigerVNC viewer with MinGW ----------------------------------------------- If building the Windows version of TigerVNC on a Windows build system, use the following procedure. cd {build_directory} cmake -G "MSYS Makefiles" [additional CMake flags] {source_directory} make If cross-compiling on a Unix/Linux system, then see the "Build Recipes" section below. Debug build ----------- Add "-DCMAKE_BUILD_TYPE=Debug" to the CMake command line. Portable (semi-static) build ---------------------------- TigerVNC can under favourble circumstances be built in a way that allows the resulting binaries to run on any system without having to also install all the dynamic libraries it depends on. Enable this mode by adding: -DBUILD_STATIC=1 to the CMake command line. Note that the method used to achieve this is very fragile and it may be necessary to tweak cmake/StaticBuild.cmake to make things work on your specific system. ===================== Building Java support ===================== TigerVNC includes a Java version of the TigerVNC Viewer, which can be used on any platform that has a Java Runtime Environment (JRE) installed. The Java viewer works similarly to the native viewer, but with lower performance. To build the Java TigerVNC Viewer, add -DBUILD_JAVA=1 to the CMake or build-xorg command line. The build system will attempt to find an installed Java Development Kit (JDK) and determine the appropriate paths for the Java compiler (javac) and the JAR creation utility (jar). You can override these paths by setting the Java_JAVAC_EXECUTABLE and Java_JAR_EXECUTABLE CMake variables. You can also override the default flags that are passed to javac by setting the JAVACFLAGS CMake variable. The build system will look for keytool and jarsigner in the same directory as Java_JAR_EXECUTABLE. These tools are needed to sign the JAR file, which is necessary to enable certain functionality (such as clipboard transfers) when the Java viewer is used as an applet. If the Java viewer is built along with the Windows TigerVNC server (WinVNC), then the build system will embed the Java viewer into WinVNC4.exe so that it will automatically be served up using WinVNC's built-in HTTP server. Similarly, if the Java viewer is built along with the Unix TigerVNC server (Xvnc), then the build system will include the Java viewer in the server tarball. By default, a self-signed certificate will be generated and used to sign the jar file. By specifying the following command line arguments to the CMake command line, an alternate certificate may be used for signing. -DJAVA_KEYSTORE=${keystore_location_or_url} -DJAVA_KEYSTORE_TYPE=${keystore_type} (Default: "jks") -DJAVA_KEY_ALIAS=${keytore_key_alias} -DJAVA_STOREPASS=${keystore_password} -DJAVA_KEYPASS=${keystore_entry_password} -DJAVA_TSA_URL=${url_of_timestamping_authority} The values of the JAVA_STOREPASS and JAVA_KEYPASS arguments may optionally be read from file or environment variables by prefixing the value with ":env " or ":file " (see the jarsigner documentation for more info): export StorePass=tigervnc export KeyPass=tigervnc cmake \ ... -DJAVA_STOREPASS=":env StorePass" -DJAVA_KEYPASS=":env KeyPass" ====================================== Building TLS support ====================================== TLS requires GnuTLS, which is supplied with most Linux distributions and with MinGW for Windows and can be built from source on OS X and other Unix variants. However, GnuTLS versions > 2.12.x && < 3.3.x should be avoided because of potential incompatibilities during initial handshaking. ====================================== Building native language support (NLS) ====================================== NLS requires gettext, which is supplied with most Linux distributions and with MinGW for Windows and which can easily be built from source on OS X and other Unix variants. =================== Installing TigerVNC =================== You can use the build system to install TigerVNC into a directory of your choosing. To do this, add: -DCMAKE_INSTALL_PREFIX={install_directory} to the CMake command line. Then, you can run 'make install' to build and install it. If you don't specify CMAKE_INSTALL_PREFIX, then the default is c:\Program Files\TigerVNC on Windows and /usr/local on Unix. ========================= Creating release packages ========================= The following commands can be used to create various types of release packages: Unix ---- make tarball Create a binary tarball containing the TigerVNC viewer macOS ----- make dmg Create Macintosh disk image file that contains an application bundle of the TigerVNC viewer Windows ------- make installer Create a Windows installer using Inno Setup. The installer package (TigerVNC[64].exe) will be located under {build_directory}. ============= Build recipes ============= MinGW build on Cygwin --------------------- cd {build_directory} CC=/usr/bin/x86_64-w64-mingw32-gcc CXX=/usr/bin/x86_64-w64-mingw32-g++ \ RC=/usr/bin/x86_64-w64-mingw32-windres \ cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \ -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory} make This produces a build of TigerVNC that does not depend on cygwin1.dll or other Cygwin DLL's. The mingw64-x86_64-gcc-core and mingw64-x86_64-gcc-g++ packages (and their dependencies) must be installed. MinGW-w64 build on Windows -------------------------- This produces a build of TigerVNC using the "native" MinGW-w64 toolchain (which is faster than the Cygwin version): cd {build_directory} CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \ CXX={mingw-w64_binary_path}/x86_64-w64-mingw32-g++ \ RC={mingw-w64_binary_path}/x86_64-w64-mingw32-windres \ cmake -G "MSYS Makefiles" \ -DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \ -DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \ {source_directory} make MinGW build on Linux -------------------- cd {build_directory} CC={mingw_binary_path}/x86_64-w64-mingw32-gcc \ CXX={mingw_binary_path}/x86_64-w64-mingw32-g++ \ RC={mingw_binary_path}/x86_64-w64-mingw32-windres \ cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \ -DCMAKE_AR={mingw_binary_path}/x86_64-w64-mingw32-ar \ -DCMAKE_RANLIB={mingw_binary_path}/x86_64-w64-mingw32-ranlib \ {source_directory} make =============================== Distribution-specific packaging =============================== Configuration for building packages for current versions of RHEL/CentOS and Ubuntu LTS can be found under contrib/packages. ================================================ FILE: CMakeLists.txt ================================================ # # Setup # cmake_minimum_required(VERSION 3.10.0) # Internal cmake modules set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckLibraryExists) include(CheckVariableExists) include(CheckTypeSize) include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) include(CheckCSourceRuns) include(CMakeMacroLibtoolFile) project(tigervnc) set(VERSION 1.16.80) # The RC version must always be four comma-separated numbers string(REPLACE . , RCVERSION "${VERSION}.0") # Installation paths include(GNUInstallDirs) set(CMAKE_INSTALL_UNITDIR "lib/systemd/system" CACHE PATH "systemd unit files (lib/systemd/system)") if(IS_ABSOLUTE "${CMAKE_INSTALL_UNITDIR}") set(CMAKE_INSTALL_FULL_UNITDIR "${CMAKE_INSTALL_UNITDIR}") else() set(CMAKE_INSTALL_FULL_UNITDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_UNITDIR}") endif() option(INSTALL_SYSTEMD_UNITS "Install TigerVNC systemd units" ON) if(MSVC) message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW") endif() if(NOT BUILD_TIMESTAMP) STRING(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%d %H:%M" UTC) endif() # Default to optimised builds instead of debug ones. Our code has no bugs ;) # (CMake makes it fairly easy to toggle this back to Debug if needed) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") message(STATUS "VERSION = ${VERSION}") message(STATUS "BUILD_TIMESTAMP = ${BUILD_TIMESTAMP}") add_definitions(-DBUILD_TIMESTAMP="${BUILD_TIMESTAMP}") # We want to keep our asserts even in release builds so remove NDEBUG set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -UNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -UNDEBUG") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -UNDEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -UNDEBUG") set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -UNDEBUG") set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -UNDEBUG") # But extra debug checks are still gated by this custom define set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") # Enable debug friendly optimizations for debug builds set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og") # Make sure we get a sane C and C++ version set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") # Tell the compiler to be stringent add_compile_definitions(_FORTIFY_SOURCE=2) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wvla") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wvla") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") # Make sure we catch these issues whilst developing set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Werror") # clang doesn't support format_arg, which breaks this warning if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format-nonliteral -Wno-format-security") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-security") endif() option(ENABLE_ASAN "Enable address sanitizer support" OFF) if(ENABLE_ASAN AND NOT WIN32 AND NOT APPLE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") endif() option(ENABLE_TSAN "Enable thread sanitizer support" OFF) if(ENABLE_TSAN AND NOT WIN32 AND NOT APPLE AND CMAKE_SIZEOF_VOID_P MATCHES 8) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread") endif() if(MSVC) # undef min and max macro target_compile_definitions(rfb PRIVATE NOMINMAX) endif() if(NOT DEFINED BUILD_WINVNC) set(BUILD_WINVNC 1) endif() # libstdc++ doesn't implicitly include this, although it is very much # required when using any of the C++ threading features (at least on # systems where pthread is a separate library, e.g. glibc < 2.34) if(UNIX) link_libraries(pthread) endif() # Minimum version is Windows 7 if(WIN32) add_definitions(-D_WIN32_WINNT=0x0601) endif() # Legacy macros (macOS 10.12 and older) conflict with our code if(APPLE) add_definitions(-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0) endif() #### Check for required and optional libraries #### macro(trioption VAR DESC) set(${VAR} AUTO CACHE STRING "${DESC}") set_property(CACHE ${VAR} PROPERTY STRINGS AUTO ON OFF) endmacro() # X11 stuff. It's in a if() so that we can say REQUIRED if(UNIX AND NOT APPLE) find_package(X11 REQUIRED) if(X11_Xdamage_LIB) add_definitions(-DHAVE_XDAMAGE) endif() if(X11_Xfixes_LIB) add_definitions(-DHAVE_XFIXES) endif() if(X11_Xrandr_LIB) add_definitions(-DHAVE_XRANDR) endif() if(X11_XTest_LIB) add_definitions(-DHAVE_XTEST) endif() endif() # Check for zlib find_package(ZLIB REQUIRED) # Check for pixman find_package(Pixman REQUIRED) # Check for gettext trioption(ENABLE_NLS "Enable translation of program messages") if(ENABLE_NLS) # Tools if(ENABLE_NLS STREQUAL "AUTO") find_package(Gettext) else() find_package(Gettext REQUIRED) endif() # Runtime library if(ENABLE_NLS STREQUAL "AUTO") find_package(Intl) else() find_package(Intl REQUIRED) endif() if(NOT GETTEXT_FOUND OR NOT INTL_FOUND) message(WARNING "Gettext NOT found. Native Language Support disabled.") set(ENABLE_NLS 0) endif() endif() trioption(ENABLE_H264 "Enable H.264 RFB encoding") if(ENABLE_H264) if(WIN32) add_definitions("-DHAVE_H264") set(H264_LIBS "WIN") # may be LIBAV in the future set(H264_LIBRARIES ole32 mfplat mfuuid wmcodecdspuuid) set(CMAKE_REQUIRED_LIBRARIES ${H264_LIBRARIES}) check_variable_exists(CLSID_VideoProcessorMFT HAVE_VIDEO_PROCESSOR_MFT) set(CMAKE_REQUIRED_LIBRARIES) if(HAVE_VIDEO_PROCESSOR_MFT) add_definitions("-DHAVE_VIDEO_PROCESSOR_MFT") endif() else() if(ENABLE_H264 STREQUAL "AUTO") find_package(AVCodec) find_package(AVUtil) find_package(SWScale) else() find_package(AVCodec REQUIRED) find_package(AVUtil REQUIRED) find_package(SWScale REQUIRED) endif() if (AVCODEC_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND) set(H264_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS} ${SWSCALE_INCLUDE_DIRS}) set(H264_LIBRARIES ${AVCODEC_LIBRARIES} ${AVUTIL_LIBRARIES} ${SWSCALE_LIBRARIES}) add_definitions("-D__STDC_CONSTANT_MACROS") add_definitions("-DHAVE_H264") set(H264_LIBS "LIBAV") else() set(H264_LIBS "NONE") message(WARNING "FFMPEG support can't be found") endif() endif() add_definitions("-DH264_${H264_LIBS}") endif() # Check for libjpeg find_package(JPEG REQUIRED) # Warn if it doesn't seem to be the accelerated libjpeg that's found set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES}) set(CMAKE_REQUIRED_FLAGS -I${JPEG_INCLUDE_DIR}) set(JPEG_TEST_SOURCE "\n #include \n #include \n int main(void) {\n struct jpeg_compress_struct cinfo;\n struct jpeg_error_mgr jerr;\n cinfo.err=jpeg_std_error(&jerr);\n jpeg_create_compress(&cinfo);\n cinfo.input_components = 3;\n jpeg_set_defaults(&cinfo);\n cinfo.in_color_space = JCS_EXT_RGB;\n jpeg_default_colorspace(&cinfo);\n return 0;\n }") if(CMAKE_CROSSCOMPILING) check_c_source_compiles("${JPEG_TEST_SOURCE}" FOUND_LIBJPEG_TURBO) else() check_c_source_runs("${JPEG_TEST_SOURCE}" FOUND_LIBJPEG_TURBO) endif() set(CMAKE_REQUIRED_LIBRARIES) set(CMAKE_REQUIRED_FLAGS) set(CMAKE_REQUIRED_DEFINITIONS) if(NOT FOUND_LIBJPEG_TURBO) message(STATUS "Warning: You are not using libjpeg-turbo. Performance will suffer.") endif() option(BUILD_JAVA "Build Java version of the TigerVNC Viewer" FALSE) if(BUILD_JAVA) add_subdirectory(java) endif() trioption(BUILD_VIEWER "Build TigerVNC viewer") if(BUILD_VIEWER) # Check for FLTK set(FLTK_SKIP_FLUID TRUE) set(FLTK_SKIP_OPENGL TRUE) set(FLTK_SKIP_FORMS TRUE) if(BUILD_VIEWER STREQUAL "AUTO") find_package(FLTK) else() find_package(FLTK REQUIRED) endif() if(NOT FLTK_FOUND) message(WARNING "FLTK NOT found. TigerVNC viewer disabled.") set(BUILD_VIEWER 0) endif() if(UNIX AND NOT APPLE) # No proper handling for extra X11 libs that FLTK might need... if(X11_Xft_FOUND) # Xft headers include references to fontconfig, so we need # to link to that as well find_library(FONTCONFIG_LIB fontconfig) set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xft_LIB} ${FONTCONFIG_LIB}) endif() if(X11_Xinerama_FOUND) set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xinerama_LIB}) endif() if(X11_Xfixes_FOUND) set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xfixes_LIB}) endif() if(X11_Xcursor_FOUND) set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xcursor_LIB}) endif() if(X11_Xrender_FOUND) set(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${X11_Xrender_LIB}) endif() endif() if(FLTK_FOUND) set(CMAKE_REQUIRED_FLAGS "-Wno-error") set(CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR}) set(CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES}) check_cxx_source_compiles("#include \n#if FL_MAJOR_VERSION != 1 || FL_MINOR_VERSION != 3\n#error Wrong FLTK version\n#endif\nint main(int, char**) { return 0; }" OK_FLTK_VERSION) if(NOT OK_FLTK_VERSION) message(FATAL_ERROR "Incompatible version of FLTK") endif() set(CMAKE_REQUIRED_FLAGS) set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_LIBRARIES) endif() endif() # Check for GNUTLS library trioption(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication") if(ENABLE_GNUTLS) if(ENABLE_GNUTLS STREQUAL "AUTO") find_package(GnuTLS) else() find_package(GnuTLS REQUIRED) endif() if (GNUTLS_FOUND) add_definitions("-DHAVE_GNUTLS") endif() endif() trioption(ENABLE_NETTLE "Enable RSA-AES security types") if (ENABLE_NETTLE) if(ENABLE_NETTLE STREQUAL "AUTO") find_package(Nettle) else() find_package(Nettle REQUIRED) endif() if (NETTLE_FOUND) add_definitions("-DHAVE_NETTLE") endif() endif() # Check for PAM library if(UNIX AND NOT APPLE) find_package(PAM REQUIRED) endif() # Check for SELinux library if(UNIX AND NOT APPLE) trioption(ENABLE_SELINUX "Enable SELinux support") if(ENABLE_SELINUX) if(ENABLE_SELINUX STREQUAL "AUTO") find_package(SELinux) else() find_package(SELinux REQUIRED) endif() if(SELINUX_FOUND) add_definitions("-DHAVE_SELINUX") endif() endif() endif() # check for systemd support (socket activation) if(UNIX AND NOT APPLE) trioption(ENABLE_SYSTEMD "Enable systemd support") if(ENABLE_SYSTEMD) if(ENABLE_SYSTEMD STREQUAL "AUTO") find_package(Systemd) else() find_package(Systemd REQUIRED) endif() if (SYSTEMD_FOUND) add_definitions(-DHAVE_LIBSYSTEMD) endif() endif() endif() # check for password pwquality check support if(UNIX AND NOT APPLE) trioption(ENABLE_PWQUALITY "Enable password pwquality check") if(ENABLE_PWQUALITY) if(ENABLE_PWQUALITY STREQUAL "AUTO") find_package(PWQuality) else() find_package(PWQuality REQUIRED) endif() if(PWQUALITY_FOUND) add_definitions(-DHAVE_PWQUALITY) endif() endif() endif() # check for libraries needed for wayland support if(UNIX AND NOT APPLE) trioption(ENABLE_WAYLAND "Enable wayland support") if(ENABLE_WAYLAND) if(ENABLE_WAYLAND STREQUAL "AUTO") find_package(GLib) find_package(Gio) find_package(Gobject) # Portals specific find_package(PipeWire) find_package(Uuid) # wlroots specific find_package(WaylandClient) find_package(Xkbcommon) else() find_package(GLib REQUIRED) find_package(Gio REQUIRED) find_package(Gobject REQUIRED) # Portals specific find_package(PipeWire REQUIRED) find_package(Uuid REQUIRED) # wlroots specific find_package(WaylandClient REQUIRED) find_package(Xkbcommon REQUIRED) endif() if(NOT GLIB_FOUND OR NOT GIO_FOUND OR NOT GOBJECT_FOUND OR NOT PIPEWIRE_FOUND OR NOT UUID_FOUND OR NOT WAYLANDCLIENT_FOUND OR NOT XKBCOMMON_FOUND) set(ENABLE_WAYLAND 0) message(WARNING "GLib, Gio, Gobject, PipeWire, Uuid, WaylandClient or Xkbcommon NOT found. w0vncserver disabled.") endif() endif() endif() find_package(GTest) # Generate config.h and make sure the source finds it configure_file(config.h.in config.h) add_definitions(-DHAVE_CONFIG_H) include_directories(${CMAKE_BINARY_DIR}) include(cmake/StaticBuild.cmake) add_subdirectory(common) if(WIN32) add_subdirectory(win) else() # No interest in building x related parts on Apple if(NOT APPLE) add_subdirectory(unix) endif() endif() if(ENABLE_NLS) add_subdirectory(po) endif() if(BUILD_VIEWER) add_subdirectory(vncviewer) add_subdirectory(media) endif() add_subdirectory(tests) if(BUILD_VIEWER) add_subdirectory(release) endif() # uninstall configure_file("${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" "cmake_uninstall.cmake" IMMEDIATE @ONLY) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P cmake_uninstall.cmake) libtool_generate_control_files() ================================================ FILE: LICENCE.TXT ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ================================================ FILE: README.rst ================================================ About TigerVNC ============== Virtual Network Computing (VNC) is a remote display system which allows you to view and interact with a virtual desktop environment that is running on another computer on the network. Using VNC, you can run graphical applications on a remote machine and send only the display from these applications to your local machine. VNC is platform-independent and supports a wide variety of operating systems and architectures as both servers and clients. TigerVNC is a high-speed version of VNC based on the RealVNC 4 and X.org code bases. TigerVNC started as a next-generation development effort for TightVNC on Unix and Linux platforms, but it split from its parent project in early 2009 so that TightVNC could focus on Windows platforms. TigerVNC supports a variant of Tight encoding that is greatly accelerated by the use of the libjpeg-turbo JPEG codec. Legal ===== Incomplete and generally out of date copyright list:: Copyright (C) 1999 AT&T Laboratories Cambridge Copyright (C) 2002-2005 RealVNC Ltd. Copyright (C) 2000-2006 TightVNC Group Copyright (C) 2005-2006 Martin Koegler Copyright (C) 2005-2006 Sun Microsystems, Inc. Copyright (C) 2006 OCCAM Financial Technology Copyright (C) 2000-2008 Constantin Kaplinsky Copyright (C) 2004-2017 Peter Astrand for Cendio AB Copyright (C) 2010 Antoine Martin Copyright (C) 2010 m-privacy GmbH Copyright (C) 2009-2011 D. R. Commander Copyright (C) 2009-2011 Pierre Ossman for Cendio AB Copyright (C) 2004, 2009-2011 Red Hat, Inc. Copyright (C) 2009-2026 TigerVNC team All Rights Reserved. This software is distributed under the GNU General Public Licence as published by the Free Software Foundation. See the file LICENCE.TXT for the conditions under which this software is made available. TigerVNC also contains code from other sources. See the Acknowledgements section below, and the individual source files, for details of the conditions under which they are made available. All Platforms ============= All versions of TigerVNC contain the following programs: * vncviewer - the cross-platform TigerVNC Viewer, written using FLTK. vncviewer connects to a VNC server and allows you to interact with the remote desktop being displayed by the VNC server. The VNC server can be running on a Windows or a Unix/Linux machine. Windows-specific ================ The Windows version of TigerVNC contains the following programs: * winvnc - the TigerVNC server for Windows. winvnc allows a Windows desktop to be accessed remotely using a VNC viewer. WARNING: winvnc is currently unmaintained and and may not function correctly. winvnc may not work if the Fast user switching or Remote desktop features are in use. Unix/Linux-specific (not Mac) ============================= The Unix/Linux version of TigerVNC contains the following programs: * Xvnc - the TigerVNC server for Unix. Xvnc is both a VNC server and an X server with a "virtual" framebuffer. You should normally use the vncserver service to start Xvnc. * vncpasswd - a program which allows you to change the VNC password used to access your VNC server sessions (assuming that VNC authentication is being used.) This command must be run to set a password before using VNC authentication with any of the servers or services. * vncconfig - a program which is used to configure and control a running instance of Xvnc. * x0vncserver - an inefficient VNC server which continuously polls any X display, allowing it to be controlled via VNC. It is intended mainly as a demonstration of a simple VNC server. * w0vncserver - a VNC server for Wayland compositors which gives control over your local Wayland session. It also contains the following systemd service: * vncserver@.service - a service to start a user session with Xvnc and one of the desktop environments available on the system. ACKNOWLEDGEMENTS ================ This distribution contains public domain DES software by Richard Outerbridge. This is: Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. This distribution contains software from the X Window System. This is: Copyright 1987, 1988, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of The Open Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ================================================ FILE: cmake/Modules/CMakeMacroLibtoolFile.cmake ================================================ # FIXME: Since we cannot require CMake 3.17, we cannot used deferred # functions, and hence we have to do something similar manually set_property(GLOBAL PROPERTY LIBTOOL_TARGETS "") function(libtool_create_control_file target) set_property(GLOBAL APPEND PROPERTY LIBTOOL_TARGETS ${target}) endfunction() function(libtool_generate_control_files) get_property(LIBTOOL_TARGETS GLOBAL PROPERTY LIBTOOL_TARGETS) foreach(target ${LIBTOOL_TARGETS}) libtool_generate_control_file(${target}) endforeach() endfunction() function(libtool_generate_control_file _target) get_target_property(_target_type ${_target} TYPE) message("-- Creating static libtool control file for target ${_target}") # No support for shared libraries, as TigerVNC only needs libtool config # files for static libraries. if("${_target_type}" MATCHES "^[^STATIC_LIBRARY]$") message(FATAL_ERROR " - trying to use libtool_create_control_file for non-static library target.") endif() # # Parse the INTERFACE_LINK_LIBRARIES property to determine which # libraries to put into libtool control file as library dependencies, # and handle a few corner cases. # # First we need to split up any internal entries set(target_libs "") get_property(_target_libs TARGET ${_target} PROPERTY INTERFACE_LINK_LIBRARIES) foreach(library ${_target_libs}) if("${library}" MATCHES " ") string(REPLACE " " ";" lib_list "${library}") list(APPEND target_libs ${lib_list}) else() list(APPEND target_libs "${library}") endif() endforeach() set(STATIC_MODE OFF) set(FRAMEWORK OFF) get_property(LIBRARY_PATHS TARGET ${_target} PROPERTY INTERFACE_LINK_DIRECTORIES) foreach(library ${target_libs}) if(FRAMEWORK) set(_target_dependency_libs "${_target_dependency_libs} -framework ${library}") set(FRAMEWORK OFF) continue() elseif(${library} STREQUAL "-framework") set(FRAMEWORK ON) continue() # Assume all entries are shared libs if platform-specific static library # extension is not matched. elseif(NOT "${library}" MATCHES ".+${CMAKE_STATIC_LIBRARY_SUFFIX}$") set(SHARED OFF) foreach(suffix ${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES}) if("${library}" MATCHES ".+${suffix}$") set(SHARED ON) break() endif() endforeach() if(SHARED) # Shared library extension matched, so extract the path and library # name, then add the result to the libtool dependency libs. This # will always be an absolute path, because that's what CMake uses # internally. get_filename_component(_shared_lib ${library} NAME_WE) get_filename_component(_shared_lib_path ${library} PATH) string(REPLACE "lib" "" _shared_lib ${_shared_lib}) set(_target_dependency_libs "${_target_dependency_libs} -L${_shared_lib_path} -l${_shared_lib}") else() # No shared library extension matched. Check whether target is a CMake # target. if(TARGET ${library}) # Target is a CMake target, so assume it is a static library and # build a reference to it get_target_property(library_path ${library} BINARY_DIR) set(library ${library_path}/${CMAKE_STATIC_LIBRARY_PREFIX}${library}.la) set(_target_dependency_libs "${_target_dependency_libs} ${library}") elseif(${library} STREQUAL "-Wl,-Bstatic") # All following libraries should be static set(STATIC_MODE ON) elseif(${library} STREQUAL "-Wl,-Bdynamic") # All following libraries should be dynamic set(STATIC_MODE OFF) elseif(${library} MATCHES "^${CMAKE_LIBRARY_PATH_FLAG}") # Library search path string(REPLACE ${CMAKE_LIBRARY_PATH_FLAG} "" library ${library}) list(APPEND LIBRARY_PATHS ${library}) else() # Normal library, so use find_library() to attempt to locate the # library in a system directory. # Need to remove -l prefix if(${library} MATCHES "^${CMAKE_LINK_LIBRARY_FLAG}") string(REPLACE ${CMAKE_LINK_LIBRARY_FLAG} "" library ${library}) endif() if(STATIC_MODE) set(_library ${CMAKE_STATIC_LIBRARY_PREFIX}${library}${CMAKE_STATIC_LIBRARY_SUFFIX}) find_library(FL ${_library} PATHS ${LIBRARY_PATHS}) endif() if(NOT FL) find_library(FL ${library} PATHS ${LIBRARY_PATHS}) endif() if(FL) # Found library. Depending on if it's static or not we might # extract the path and library name, then add the # result to the libtool dependency libs. if("${FL}" MATCHES ".+${CMAKE_STATIC_LIBRARY_SUFFIX}$") set(_target_dependency_libs "${_target_dependency_libs} ${FL}") else() get_filename_component(_shared_lib ${FL} NAME_WE) get_filename_component(_shared_lib_path ${FL} PATH) string(REPLACE "lib" "" _shared_lib ${_shared_lib}) set(_target_dependency_libs "${_target_dependency_libs} -L${_shared_lib_path} -l${_shared_lib}") endif() else() message(FATAL_ERROR " - could not find library ${library}") endif() # Need to clear FL to get new results next loop unset(FL CACHE) endif() endif() else() # Detected a static library. Check whether the library pathname is # absolute and, if not, use find_library() to get the absolute path. get_filename_component(_name ${library} NAME) string(REPLACE "${_name}" "" _path ${library}) if(NOT "${_path}" STREQUAL "") # Pathname is absolute, so add it to the libtool library dependencies # as-is. set(_target_dependency_libs "${_target_dependency_libs} ${library}") else() # Pathname is not absolute, so use find_library() to get the absolute # path. find_library(FL ${library}) if(FL) # Absolute pathname found. Add it. set(_target_dependency_libs "${_target_dependency_libs} ${FL}") else() message(FATAL_ERROR " - could not find library ${library}") endif() # Need to clear FL to get new results next loop unset(FL CACHE) endif() endif() endforeach() get_target_property(_binary_dir ${_target} BINARY_DIR) # Write the libtool control file for the static library set(_lname ${CMAKE_STATIC_LIBRARY_PREFIX}${_target}) set(_laname ${_binary_dir}/${_lname}.la) file(WRITE ${_laname} "# ${_lname}.la - a libtool library file\n# Generated by ltmain.sh (GNU libtool) 2.2.6b\n") file(APPEND ${_laname} "dlname=''\n\n") file(APPEND ${_laname} "library_names=''\n\n") file(APPEND ${_laname} "old_library='${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}'\n\n") file(APPEND ${_laname} "inherited_linker_flags=''\n\n") file(APPEND ${_laname} "dependency_libs=' ${_target_dependency_libs}'\n\n") file(APPEND ${_laname} "weak_library_names=''\n\n") file(APPEND ${_laname} "current=\n") file(APPEND ${_laname} "age=\n") file(APPEND ${_laname} "revision=\n\n") file(APPEND ${_laname} "installed=no\n\n") file(APPEND ${_laname} "shouldnotlink=no\n\n") file(APPEND ${_laname} "dlopen=''\n") file(APPEND ${_laname} "dlpreopen=''\n\n") file(APPEND ${_laname} "libdir='/usr/lib'\n\n") # Make sure the timestamp is updated to trigger other make invocations set(_lamarker ${_binary_dir}/.${_lname}.la.fresh) add_custom_command(OUTPUT "${_lamarker}" DEPENDS ${_target} COMMENT "Updating timestamp on ${_lname}.la" COMMAND "${CMAKE_COMMAND}" -E touch "${_lamarker}" COMMAND "${CMAKE_COMMAND}" -E touch "${_laname}") # Add custom command to symlink the static library so that autotools finds # the library in .libs. These are executed after the specified target build. set(_libname ${_binary_dir}/.libs/${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}) add_custom_command(OUTPUT "${_libname}" DEPENDS ${_target} COMMENT "Creating symlink .libs/${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX}" COMMAND "${CMAKE_COMMAND}" -E make_directory "${_binary_dir}/.libs" COMMAND "${CMAKE_COMMAND}" -E create_symlink ../${_lname}${CMAKE_STATIC_LIBRARY_SUFFIX} "${_libname}") add_custom_target(${_target}.la ALL DEPENDS "${_lamarker}" "${_libname}") endfunction() ================================================ FILE: cmake/Modules/FindAVCodec.cmake ================================================ #[=======================================================================[.rst: FindAVCodec ----------- Find the FFmpeg avcodec library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``AVCODEC_INCLUDE_DIRS`` where to find libavcodec/avcodec.h, etc. ``AVCODEC_LIBRARIES`` the libraries to link against to use avcodec. ``AVCODEC_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_AVCodec QUIET libavcodec) endif() find_path(AVCodec_INCLUDE_DIR NAMES libavcodec/avcodec.h HINTS ${PC_AVCodec_INCLUDE_DIRS} ) mark_as_advanced(AVCodec_INCLUDE_DIR) find_library(AVCodec_LIBRARY NAMES avcodec HINTS ${PC_AVCodec_LIBRARY_DIRS} ) mark_as_advanced(AVCodec_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(AVCodec REQUIRED_VARS AVCodec_LIBRARY AVCodec_INCLUDE_DIR ) if(AVCodec_FOUND) set(AVCODEC_INCLUDE_DIRS ${AVCodec_INCLUDE_DIR}) set(AVCODEC_LIBRARIES ${AVCodec_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindAVUtil.cmake ================================================ #[=======================================================================[.rst: FindAVUtil ---------- Find the FFmpeg avutil library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``AVUTIL_INCLUDE_DIRS`` where to find libavutil/avutil.h, etc. ``AVUTIL_LIBRARIES`` the libraries to link against to use avutil. ``AVUTIL_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_AVUtil QUIET libavutil) endif() find_path(AVUtil_INCLUDE_DIR NAMES libavutil/avutil.h HINTS ${PC_AVUtil_INCLUDE_DIRS} ) mark_as_advanced(AVUtil_INCLUDE_DIR) find_library(AVUtil_LIBRARY NAMES avutil HINTS ${PC_AVUtil_LIBRARY_DIRS} ) mark_as_advanced(AVUtil_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(AVUtil REQUIRED_VARS AVUtil_LIBRARY AVUtil_INCLUDE_DIR ) if(AVUtil_FOUND) set(AVUTIL_INCLUDE_DIRS ${AVUtil_INCLUDE_DIR}) set(AVUTIL_LIBRARIES ${AVUtil_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindGLib.cmake ================================================ #[=======================================================================[.rst: FindGLib ---------- Find the GLib library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``GLIB_INCLUDE_DIRS`` where to find glib.h, etc. ``GLIB_LIBRARIES`` the libraries to link against to use libglib. ``GLIB_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_GLib QUIET glib-2.0) endif() find_path(GLib_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0 HINTS ${PC_GLib_INCLUDE_DIRS} ) mark_as_advanced(GLib_INCLUDE_DIR) find_path(GLib_CONFIG_INCLUDE_DIR NAMES glibconfig.h PATH_SUFFIXES glib-2.0/include HINTS ${PC_GLib_INCLUDE_DIRS} ) mark_as_advanced(GLib_CONFIG_INCLUDE_DIR) find_library(GLib_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLib_LIBRARY_DIRS} ) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GLib REQUIRED_VARS GLib_LIBRARIES GLib_INCLUDE_DIR GLib_CONFIG_INCLUDE_DIR ) if(GLIB_FOUND) set(GLIB_INCLUDE_DIRS ${GLib_INCLUDE_DIR} ${GLib_CONFIG_INCLUDE_DIR}) set(GLIB_LIBRARIES ${GLib_LIBRARIES}) endif() ================================================ FILE: cmake/Modules/FindGMP.cmake ================================================ #[=======================================================================[.rst: FindGMP ------- Find the GNU MP bignum library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``GMP_INCLUDE_DIRS`` where to find gmp.h, etc. ``GMP_LIBRARIES`` the libraries to link against to use GMP. ``GMP_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_GMP QUIET gmp) endif() find_path(GMP_INCLUDE_DIR NAMES gmp.h HINTS ${PC_GMP_INCLUDE_DIRS} ) mark_as_advanced(GMP_INCLUDE_DIR) find_library(GMP_LIBRARY NAMES gmp HINTS ${PC_GMP_LIBRARY_DIRS} ) mark_as_advanced(GMP_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(GMP REQUIRED_VARS GMP_LIBRARY GMP_INCLUDE_DIR ) if(GMP_FOUND) set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) set(GMP_LIBRARIES ${GMP_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindGio.cmake ================================================ #[=======================================================================[.rst: FindGio ---------- Find the GIO library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``GIO_INCLUDE_DIRS`` where to find gio/gio.h, etc. ``GIO_LIBRARIES`` the libraries to link against to use libgio. ``GIO_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_Gio QUIET gio-2.0) pkg_check_modules(PC_Gio_unix QUIET gio-unix-2.0) endif() find_path(Gio_INCLUDE_DIR NAMES gio/gio.h PATH_SUFFIXES glib-2.0 HINTS ${PC_Gio_INCLUDE_DIRS} ) mark_as_advanced(Gio_INCLUDE_DIR) find_path(Gio_unix_INCLUDE_DIR NAMES gio/gunixfdlist.h PATH_SUFFIXES gio-unix-2.0 HINTS ${PC_Gio_unix_INCLUDE_DIRS} ) mark_as_advanced(Gio_unix_INCLUDE_DIR) find_library(Gio_LIBRARIES NAMES gio-2.0 HINTS ${PC_Gio_LIBRARY_DIRS} ) mark_as_advanced(Gio_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Gio REQUIRED_VARS Gio_LIBRARIES Gio_INCLUDE_DIR Gio_unix_INCLUDE_DIR ) if(GIO_FOUND) set(GIO_INCLUDE_DIRS ${Gio_INCLUDE_DIR} ${Gio_unix_INCLUDE_DIR}) set(GIO_LIBRARIES ${Gio_LIBRARIES}) endif() ================================================ FILE: cmake/Modules/FindGobject.cmake ================================================ #[=======================================================================[.rst: FindGobject ---------- Find the GObject library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``GOBJECT_INCLUDE_DIRS`` where to find gobject/gobject.h, etc. ``GOBJECT_LIBRARIES`` the libraries to link against to use libgobject. ``GOBJECT_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_Gobject QUIET gobject-2.0) endif() find_path(Gobject_INCLUDE_DIR NAMES gobject/gobject.h PATH_SUFFIXES glib-2.0 HINTS ${PC_Gobject_INCLUDE_DIRS} ) mark_as_advanced(Gobject_INCLUDE_DIR) find_library(Gobject_LIBRARIES NAMES gobject-2.0 HINTS ${PC_Gobject_LIBRARY_DIRS} ) mark_as_advanced(Gobject_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Gobject REQUIRED_vARS Gobject_INCLUDE_DIR Gobject_LIBRARIES ) if(GOBJECT_FOUND) set(GOBJECT_INCLUDE_DIRS ${Gobject_INCLUDE_DIR}) set(GOBJECT_LIBRARIES ${Gobject_LIBRARIES}) endif() ================================================ FILE: cmake/Modules/FindNettle.cmake ================================================ #[=======================================================================[.rst: FindNettle ---------- Find the Nettle and Hogweed libraries Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``NETTLE_INCLUDE_DIRS`` where to find nettle/eax.h, etc. ``NETTLE_LIBRARIES`` the libraries to link against to use Nettle. ``HOGWEED_LIBRARIES`` the libraries to link against to use Hogweed. ``NETTLE_FOUND`` TRUE if found #]=======================================================================] if(Nettle_FIND_REQUIRED) find_package(GMP QUIET REQUIRED) else() find_package(GMP QUIET) endif() find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_Nettle QUIET nettle) pkg_check_modules(PC_Hogweed QUIET hogweed) endif() find_path(Nettle_INCLUDE_DIR NAMES nettle/eax.h HINTS ${PC_Nettle_INCLUDE_DIRS} ) mark_as_advanced(Nettle_INCLUDE_DIR) find_library(Nettle_LIBRARY NAMES nettle HINTS ${PC_Nettle_LIBRARY_DIRS} ) mark_as_advanced(Nettle_LIBRARY) find_library(Hogweed_LIBRARY NAMES hogweed HINTS ${PC_Hogweed_LIBRARY_DIRS} ) mark_as_advanced(Hogweed_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Nettle REQUIRED_VARS Nettle_LIBRARY Nettle_INCLUDE_DIR Hogweed_LIBRARY ) if(Nettle_FOUND) set(NETTLE_INCLUDE_DIRS ${Nettle_INCLUDE_DIR} ${GMP_INCLUDE_DIRS}) set(NETTLE_LIBRARIES ${Nettle_LIBRARY}) set(HOGWEED_LIBRARIES ${Hogweed_LIBRARY} ${GMP_LIBRARIES}) endif() ================================================ FILE: cmake/Modules/FindPAM.cmake ================================================ #[=======================================================================[.rst: FindPAM ------- Find the Pluggable Authentication Modules library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``PAM_INCLUDE_DIRS`` where to find security/pam_appl.h, etc. ``PAM_LIBRARIES`` the libraries to link against to use PAM. ``PAM_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_PAM QUIET pam) endif() find_path(PAM_INCLUDE_DIR NAMES security/pam_appl.h HINTS ${PC_PAM_INCLUDE_DIRS} ) mark_as_advanced(PAM_INCLUDE_DIR) find_library(PAM_LIBRARY NAMES pam HINTS ${PC_PAM_LIBRARY_DIRS} ) mark_as_advanced(PAM_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PAM REQUIRED_VARS PAM_LIBRARY PAM_INCLUDE_DIR ) if(PAM_FOUND) set(PAM_INCLUDE_DIRS ${PAM_INCLUDE_DIR}) set(PAM_LIBRARIES ${PAM_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindPWQuality.cmake ================================================ #[=======================================================================[.rst: FindPWQuality ------------- Find the password quality library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``PWQUALITY_INCLUDE_DIRS`` where to find pwquality.h, etc. ``PWQUALITY_LIBRARIES`` the libraries to link against to use pwquality. ``PWQUALITY_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_PWQuality QUIET pwquality) endif() find_path(PWQuality_INCLUDE_DIR NAMES pwquality.h HINTS ${PC_PWQuality_INCLUDE_DIRS} ) mark_as_advanced(PWQuality_INCLUDE_DIR) find_library(PWQuality_LIBRARY NAMES pwquality HINTS ${PC_PWQuality_LIBRARY_DIRS} ) mark_as_advanced(PWQuality_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PWQuality REQUIRED_VARS PWQuality_LIBRARY PWQuality_INCLUDE_DIR ) if(PWQuality_FOUND) set(PWQUALITY_INCLUDE_DIRS ${PWQuality_INCLUDE_DIR}) set(PWQUALITY_LIBRARIES ${PWQuality_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindPipeWire.cmake ================================================ #[=======================================================================[.rst: FindPipeWire ---------- Find the PipeWire library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``PIPEWIRE_INCLUDE_DIRS`` where to find pipewire/pipewire.h, etc. ``PIPEWIRE_LIBRARIES`` the libraries to link against to use libpipewire. ``PIPEWIRE_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_PipeWire QUIET libpipewire-0.3) endif() find_path(PipeWire_INCLUDE_DIR NAMES pipewire/pipewire.h PATH_SUFFIXES pipewire-0.3 HINTS ${PC_PipeWire_INCLUDE_DIRS} ) mark_as_advanced(PipeWire_INCLUDE_DIR) find_path(Spa_INCLUDE_DIR NAMES spa/pod/pod.h PATH_SUFFIXES spa-0.2 HINTS ${PC_PipeWire_INCLUDE_DIRS}) mark_as_advanced(Spa_INCLUDE_DIR) find_library(PipeWire_LIBRARY NAMES pipewire-0.3 HINTS ${PC_PipeWire_LIBRARY_DIRS} ) mark_as_advanced(PipeWire_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PipeWire REQUIRED_VARS PipeWire_LIBRARY PipeWire_INCLUDE_DIR Spa_INCLUDE_DIR ) if(PipeWire_FOUND) set(PIPEWIRE_LIBRARIES ${PipeWire_LIBRARY}) set(PIPEWIRE_INCLUDE_DIRS ${PipeWire_INCLUDE_DIR} ${Spa_INCLUDE_DIR}) endif() ================================================ FILE: cmake/Modules/FindPixman.cmake ================================================ #[=======================================================================[.rst: FindPixman ---------- Find the Pixman library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``PIXMAN_INCLUDE_DIRS`` where to find pixman.h, etc. ``PIXMAN_LIBRARIES`` the libraries to link against to use Pixman. ``PIXMAN_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_Pixman QUIET pixman-1) endif() find_path(Pixman_INCLUDE_DIR NAMES pixman.h PATH_SUFFIXES pixman-1 HINTS ${PC_Pixman_INCLUDE_DIRS} ) mark_as_advanced(Pixman_INCLUDE_DIR) find_library(Pixman_LIBRARY NAMES pixman-1 HINTS ${PC_Pixman_LIBRARY_DIRS} ) mark_as_advanced(Pixman_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Pixman REQUIRED_VARS Pixman_LIBRARY Pixman_INCLUDE_DIR ) if(Pixman_FOUND) set(PIXMAN_INCLUDE_DIRS ${Pixman_INCLUDE_DIR}) set(PIXMAN_LIBRARIES ${Pixman_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindSELinux.cmake ================================================ #[=======================================================================[.rst: FindSELinux ----------- Find the SELinux library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``SELINUX_INCLUDE_DIRS`` where to find selinux/selinux.h, etc. ``SELINUX_LIBRARIES`` the libraries to link against to use libselinux. ``SELINUX_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_SELinux QUIET libselinux) endif() find_path(SELinux_INCLUDE_DIR NAMES selinux/selinux.h HINTS ${PC_SELinux_INCLUDE_DIRS} ) mark_as_advanced(SELinux_INCLUDE_DIR) find_library(SELinux_LIBRARY NAMES selinux HINTS ${PC_SELinux_LIBRARY_DIRS} ) mark_as_advanced(SELinux_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SELinux REQUIRED_VARS SELinux_LIBRARY SELinux_INCLUDE_DIR ) if(SELinux_FOUND) set(SELINUX_INCLUDE_DIRS ${SELinux_INCLUDE_DIR}) set(SELINUX_LIBRARIES ${SELinux_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindSWScale.cmake ================================================ #[=======================================================================[.rst: FindSWScale ----------- Find the FFmpeg swscale library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``SWSCALE_INCLUDE_DIRS`` where to find libswscale/swscale.h, etc. ``SWSCALE_LIBRARIES`` the libraries to link against to use swscale. ``SWSCALE_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_SWScale QUIET libswscale) endif() find_path(SWScale_INCLUDE_DIR NAMES libswscale/swscale.h HINTS ${PC_SWScale_INCLUDE_DIRS} ) mark_as_advanced(SWScale_INCLUDE_DIR) find_library(SWScale_LIBRARY NAMES swscale HINTS ${PC_SWScale_LIBRARY_DIRS} ) mark_as_advanced(SWScale_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SWScale REQUIRED_VARS SWScale_LIBRARY SWScale_INCLUDE_DIR ) if(SWScale_FOUND) set(SWSCALE_INCLUDE_DIRS ${SWScale_INCLUDE_DIR}) set(SWSCALE_LIBRARIES ${SWScale_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindSystemd.cmake ================================================ #[=======================================================================[.rst: FindSystemd ----------- Find the systemd library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``SYSTEMD_INCLUDE_DIRS`` where to find systemd/sd-daemon.h, etc. ``SYSTEMD_LIBRARIES`` the libraries to link against to use libsystemd. ``SYSTEMD_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_Systemd QUIET libsystemd) endif() find_path(Systemd_INCLUDE_DIR NAMES systemd/sd-daemon.h HINTS ${PC_Systemd_INCLUDE_DIRS} ) mark_as_advanced(Systemd_INCLUDE_DIR) find_library(Systemd_LIBRARY NAMES systemd HINTS ${PC_Systemd_LIBRARY_DIRS} ) mark_as_advanced(Systemd_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Systemd REQUIRED_VARS Systemd_LIBRARY Systemd_INCLUDE_DIR ) if(Systemd_FOUND) set(SYSTEMD_INCLUDE_DIRS ${Systemd_INCLUDE_DIR}) set(SYSTEMD_LIBRARIES ${Systemd_LIBRARY}) endif() ================================================ FILE: cmake/Modules/FindUuid.cmake ================================================ #[=======================================================================[.rst: FindUuid ---------- Find the UUID library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``UUID_INCLUDE_DIRS`` where to find uuid/uuid.h, etc. ``UUID_LIBRARIES`` the libraries to link against to use libuuid. ``UUID_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_Uuid QUIET uuid) endif() find_path(Uuid_INCLUDE_DIR NAMES uuid/uuid.h HINTS ${PC_Uuid_INCLUDE_DIRS} ) mark_as_advanced(Uuid_INCLUDE_DIR) find_library(Uuid_LIBRARIES NAMES uuid HINTS ${PC_Uuid_LIBRARY_DIRS} ) mark_as_advanced(Uuid_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Uuid REQUIRED_VARS Uuid_LIBRARIES Uuid_INCLUDE_DIR ) if(Uuid_FOUND) set(UUID_INCLUDE_DIRS ${Uuid_INCLUDE_DIR}) set(UUID_LIBRARIES ${Uuid_LIBRARIES}) endif() ================================================ FILE: cmake/Modules/FindWaylandClient.cmake ================================================ #[=======================================================================[.rst: FindWaylandClient ----------------- Find the Wayland client library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``WAYLANDCLIENT_INCLUDE_DIRS`` where to find wayland-client.h.h, etc. ``WAYLANDCLIENT_LIBRARIES`` the libraries to link against to use wayland client. ``WAYLAND_CLIENT_FOUND`` TRUE if found #]=======================================================================] find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) pkg_check_modules(PC_WaylandClient QUIET wayland-client) endif() find_program(Wayland_scanner_EXECUTABLE NAMES wayland-scanner ) find_path(WaylandClient_INCLUDE_DIR NAMES wayland-client.h PATH_SUFFIXES wayland HINTS ${PC_WaylandClient_INCLUDE_DIRS} ) mark_as_advanced(WaylandClient_INCLUDE_DIR) find_library(WaylandClient_LIBRARIES NAMES wayland-client HINTS ${PC_WaylandClient_LIBRARY_DIRS} ) mark_as_advanced(WaylandClient_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(WaylandClient REQUIRED_VARS WaylandClient_LIBRARIES WaylandClient_INCLUDE_DIR Wayland_scanner_EXECUTABLE ) if(WaylandClient_FOUND) set(WAYLANDCLIENT_INCLUDE_DIRS ${WaylandClient_INCLUDE_DIR}) set(WAYLANDCLIENT_LIBRARIES ${WaylandClient_LIBRARIES}) set(WAYLAND_SCANNER_EXECUTABLE ${Wayland_scanner_EXECUTABLE}) endif() ================================================ FILE: cmake/Modules/FindXkbcommon.cmake ================================================ #[=======================================================================[.rst: FindXkbcommon ---------- Find the Xkbcommon library Result variables ^^^^^^^^^^^^^^^^ This module will set the following variables if found: ``XKBCOMMON_INCLUDE_DIRS`` where to find xkbcommon/xkbcommon.h, etc. ``XKBCOMMON_LIBRARIES`` the libraries to link against to use libxkbcommon. ``XKBCOMMON_FOUND`` TRUE if found #]=======================================================================] find_package(Pkgconfig QUIET) if(PKG_CONFIG_FOUND) pkg_check_modules(PC_Xkbcommon QUIET xkbcommon) endif() find_path(Xkbcommon_INCLUDE_DIR NAMES xkbcommon/xkbcommon.h HINTS ${PC_Xkbcommon_INCLUDE_DIRS} ) mark_as_advanced(Xkbcommon_INCLUDE_DIR) find_library(Xkbcommon_LIBRARIES NAMES xkbcommon HINTS ${PC_Xkbcommon_LIBRARY_DIRS} ) mark_as_advanced(Xkbcommon_LIBRARIES) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Xkbcommon REQUIRED_VARS Xkbcommon_LIBRARIES Xkbcommon_INCLUDE_DIR ) if(Xkbcommon_FOUND) set(XKBCOMMON_INCLUDE_DIRS ${Xkbcommon_INCLUDE_DIR}) set(XKBCOMMON_LIBRARIES ${Xkbcommon_LIBRARIES}) endif() ================================================ FILE: cmake/StaticBuild.cmake ================================================ # # Best-effort magic that tries to produce semi-static binaries # (i.e. only depends on "safe" libraries like libc and libX11) # # Note that this often fails as there is no way to automatically # determine the dependencies of the libraries we depend on, and # a lot of details change with each different build environment. # option(BUILD_STATIC "Link statically against most libraries, if possible" OFF) option(BUILD_STATIC_GCC "Link statically against only libgcc and libstdc++" OFF) if(BUILD_STATIC) message(STATUS "Attempting to link static binaries...") set(BUILD_STATIC_GCC 1) set(JPEG_LIBRARIES "-Wl,-Bstatic -ljpeg -Wl,-Bdynamic") set(ZLIB_LIBRARIES "-Wl,-Bstatic -lz -Wl,-Bdynamic") set(PIXMAN_LIBRARIES "-Wl,-Bstatic -lpixman-1 -Wl,-Bdynamic") # FIXME: This code has not yet been tested if(UNIX AND NOT APPLE) if (PIPEWIRE_FOUND) set(PIPEWIRE_LIBRARIES, "-Wl,-Bstatic -lpipewire-0.3 -Wl, -Bdynamic") endif() if (UUID_FOUND) set(UUID_LIBRARIES, "-Wl,-Bstatic -luuid -Wl, -Bdynamic") endif() if (GLIB_FOUND) set(GLIB_LIBRARIES, "-Wl,-Bstatic -lglib-2.0 -Wl, -Bdynamic") endif() if (GIO_FOUND) set(GIO_LIBRARIES, "-Wl,-Bstatic -lgio-2.0 -lgobject-2.0 -lglib-2.0 -Wl, -Bdynamic") endif() if (GOBJECT_FOUND) set(GOBJECT_LIBRARIES, "-Wl,-Bstatic -lgobject-2.0 -lglib-2.0 -Wl, -Bdynamic") endif() endif() # gettext is included in libc on many unix systems check_function_exists(dgettext LIBC_HAS_DGETTEXT) if(NOT LIBC_HAS_DGETTEXT) FIND_LIBRARY(UNISTRING_LIBRARY NAMES unistring libunistring) set(Intl_LIBRARIES "-Wl,-Bstatic -lintl") if(UNISTRING_LIBRARY) set(Intl_LIBRARIES "${Intl_LIBRARIES} -lunistring") endif() set(Intl_LIBRARIES "${Intl_LIBRARIES} -Wl,-Bdynamic") if(APPLE) set(Intl_LIBRARIES "${Intl_LIBRARIES} -liconv") else() set(Intl_LIBRARIES "${Intl_LIBRARIES} -Wl,-Bstatic") set(Intl_LIBRARIES "${Intl_LIBRARIES} -liconv") set(Intl_LIBRARIES "${Intl_LIBRARIES} -Wl,-Bdynamic") endif() if(APPLE) set(Intl_LIBRARIES "${Intl_LIBRARIES} -framework Carbon") endif() endif() if(GNUTLS_FOUND) # GnuTLS has historically had different crypto backends FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle libnettle HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) FIND_LIBRARY(TASN1_LIBRARY NAMES tasn1 libtasn1 HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) FIND_LIBRARY(IDN2_LIBRARY NAMES idn2 libidn2 HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) set(GNUTLS_LIBRARIES "-Wl,-Bstatic -lgnutls") if(TASN1_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -ltasn1") endif() if(NETTLE_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lhogweed -lnettle -lgmp") endif() if(IDN2_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lidn2") endif() if(ZSTD_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lzstd") endif() set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -Wl,-Bdynamic") if (WIN32) FIND_LIBRARY(P11KIT_LIBRARY NAMES p11-kit libp11-kit HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) FIND_LIBRARY(UNISTRING_LIBRARY NAMES unistring libunistring HINTS ${PC_GNUTLS_LIBDIR} ${PC_GNUTLS_LIBRARY_DIRS}) # GnuTLS uses various crypto-api stuff set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lcrypt32 -lncrypt -lbcrypt") # And sockets set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lws2_32") # p11-kit only available as dynamic library for MSYS2 on Windows and dynamic linking of unistring is required if(P11KIT_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lp11-kit") endif() if(UNISTRING_LIBRARY) set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lunistring") endif() endif() if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") # nanosleep() lives here on Solaris set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lrt") # and socket functions are hidden here set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} -lsocket") endif() # GnuTLS uses gettext and zlib, so make sure those are always # included and in the proper order set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} ${ZLIB_LIBRARIES}") set(GNUTLS_LIBRARIES "${GNUTLS_LIBRARIES} ${Intl_LIBRARIES}") # The last variables might introduce whitespace, which CMake # throws a hissy fit about string(STRIP ${GNUTLS_LIBRARIES} GNUTLS_LIBRARIES) endif() if(NETTLE_FOUND) set(NETTLE_LIBRARIES "-Wl,-Bstatic -lnettle -Wl,-Bdynamic") set(HOGWEED_LIBRARIES "-Wl,-Bstatic -lhogweed -lnettle -lgmp -Wl,-Bdynamic") endif() if(DEFINED FLTK_LIBRARIES) set(FLTK_LIBRARIES "-Wl,-Bstatic -lfltk_images -lpng -ljpeg -lfltk -Wl,-Bdynamic") if(WIN32) set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lcomctl32") elseif(APPLE) set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -framework Cocoa") else() set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lm -ldl") endif() if(X11_FOUND AND NOT APPLE) if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set(FLTK_LIBRARIES "${FLTK_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xfixes_LIB} -Wl,-Bstatic -lXft -Wl,-Bdynamic -lfontconfig -lXrender -lXext -R/usr/sfw/lib -L=/usr/sfw/lib -lfreetype -lsocket -lnsl") else() set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -Wl,-Bstatic -lXcursor -lXfixes -lXft -lfontconfig -lexpat -lfreetype -lpng -lbz2 -luuid -lXrender -lXext -lXinerama -Wl,-Bdynamic") endif() set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lX11") endif() endif() # X11 libraries change constantly on Linux systems so we have to link # them statically, even libXext. libX11 is somewhat stable, although # even it has had an ABI change once or twice. if(X11_FOUND AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS") set(X11_LIBRARIES "-Wl,-Bstatic -lXext -Wl,-Bdynamic -lX11") if(X11_XTest_LIB) set(X11_XTest_LIB "-Wl,-Bstatic -lXtst -Wl,-Bdynamic") endif() if(X11_Xdamage_LIB) set(X11_Xdamage_LIB "-Wl,-Bstatic -lXdamage -Wl,-Bdynamic") endif() if(X11_Xrandr_LIB) set(X11_Xrandr_LIB "-Wl,-Bstatic -lXrandr -lXrender -Wl,-Bdynamic") endif() if(X11_Xi_LIB) set(X11_Xi_LIB "-Wl,-Bstatic -lXi -Wl,-Bdynamic") endif() endif() endif() if(BUILD_STATIC_GCC) set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} -static-libgcc") set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -static-libstdc++ -static-libgcc") if(ENABLE_ASAN) set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} -static-libasan") set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -static-libasan") endif() if(ENABLE_TSAN) set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE} -static-libtsan") set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -static-libtsan") endif() endif() ================================================ FILE: cmake/cmake_uninstall.cmake.in ================================================ # This code is from the CMake FAQ if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) string(REGEX REPLACE "\n" ";" files "${files}") list(REVERSE files) foreach (file ${files}) message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") if (EXISTS "$ENV{DESTDIR}${file}") execute_process( COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" OUTPUT_VARIABLE rm_out RESULT_VARIABLE rm_retval ) if(NOT ${rm_retval} EQUAL 0) message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") endif (NOT ${rm_retval} EQUAL 0) else (EXISTS "$ENV{DESTDIR}${file}") message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") endif (EXISTS "$ENV{DESTDIR}${file}") endforeach(file) ================================================ FILE: common/CMakeLists.txt ================================================ add_subdirectory(core) add_subdirectory(rdr) add_subdirectory(network) add_subdirectory(rfb) # For any convenience libraries that are linked into libvnc.so, we need to # explicitly build their corresponding sources using PIC. WIN32 is excluded # because PIC code does not exist on that platform and MinGW complains if -fPIC # is passed (additionally, libvnc is not used on Windows.) if(NOT WIN32) set_target_properties(core rdr network rfb PROPERTIES COMPILE_FLAGS -fPIC) endif() ================================================ FILE: common/core/CMakeLists.txt ================================================ add_library(core STATIC Configuration.cxx Exception.cxx Logger.cxx Logger_file.cxx Logger_stdio.cxx LogWriter.cxx Region.cxx Timer.cxx string.cxx time.cxx xdgdirs.cxx) target_include_directories(core PUBLIC ${CMAKE_SOURCE_DIR}/common) target_include_directories(core SYSTEM PUBLIC ${PIXMAN_INCLUDE_DIRS}) target_link_libraries(core ${PIXMAN_LIBRARIES}) if(UNIX) target_sources(core PRIVATE Logger_syslog.cxx) endif() if(WIN32) target_link_libraries(core ws2_32) endif() if(UNIX) target_sources(core PRIVATE Logger_syslog.cxx) endif() if(UNIX) libtool_create_control_file(core) endif() ================================================ FILE: common/core/Configuration.cxx ================================================ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. * Copyright 2004-2005 Cendio AB. * Copyright 2017 Peter Astrand for Cendio AB * Copyright 2011-2025 Pierre Ossman for Cendio AB * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ // -=- Configuration.cxx #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include using namespace core; static LogWriter vlog("Config"); // -=- The Global Configuration object Configuration* Configuration::global_ = nullptr; Configuration* Configuration::global() { if (!global_) global_ = new Configuration(); return global_; } // -=- Configuration implementation bool Configuration::set(const char* paramName, const char* val, bool immutable) { for (VoidParameter* current: params) { if (strcasecmp(current->getName(), paramName) == 0) { bool b = current->setParam(val); if (b && immutable) current->setImmutable(); return b; } } return false; } VoidParameter* Configuration::get(const char* param) { for (VoidParameter* current: params) { if (strcasecmp(current->getName(), param) == 0) return current; } return nullptr; } void Configuration::list(int width, int nameWidth) { for (VoidParameter* current: params) { std::string def_str = current->getDefaultStr(); std::string desc_str = current->getDescription(); if (!def_str.empty()) desc_str += " (default=" + def_str + ")"; const char* desc = desc_str.c_str(); fprintf(stderr," %-*s -", nameWidth, current->getName()); int column = strlen(current->getName()); if (column < nameWidth) column = nameWidth; column += 4; while (true) { if (desc[0] == '\0') break; int wordLen = strcspn(desc, " \f\n\r\t\v,"); if (wordLen == 0) { desc++; continue; } if (desc[wordLen] == ',') wordLen++; if (column + wordLen + 1 > width) { fprintf(stderr,"\n%*s",nameWidth+4,""); column = nameWidth+4; } fprintf(stderr, " "); column++; fprintf(stderr, "%.*s", wordLen, desc); column += wordLen; desc += wordLen; } fprintf(stderr,"\n"); } } bool Configuration::remove(const char* param) { std::list::iterator iter; iter = std::find_if(params.begin(), params.end(), [param](VoidParameter* p) { return strcasecmp(p->getName(), param) == 0; }); if (iter == params.end()) return false; params.erase(iter); return true; } int Configuration::handleArg(int argc, char* argv[], int index) { std::string param, val; const char* equal = strchr(argv[index], '='); if (equal == argv[index]) return 0; if (equal) { param.assign(argv[index], equal-argv[index]); val.assign(equal+1); } else { param.assign(argv[index]); } if ((param.length() > 0) && (param[0] == '-')) { // allow gnu-style --