Coder Social home page Coder Social logo

rezaqorbani / local-chat Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 17.76 MB

A cross-platform GUI chat application, written in C++ using Boost.Asio and Qt libraries.

License: GNU General Public License v2.0

C++ 92.37% QMake 4.84% CMake 2.79%
boost qt

local-chat's Introduction

local-chat

A simple cross-platfrom chat application, written in C++, for chatting on a server hosted by users. Boost Asio is used for asynchronous communication and Qt is used for GUI.

GIF

Dependencies

Boost.Asio

Boost.Asio is included in the boost libraries which can be downloaded from here. However it is easier to use a package manager such as vcpkg. Once installed, navigate to the directory where vcpkg is installed and run the following command:

.\vcpkg install boost:x86-windows-static

this will install the 32 bit static version of boost libraries which was used to create this application.

Qt

The client side uses Qt6 for GUI. In this project three Qt modules are used: widgets, gui and core. Although this could be installed via vcpkg, the easiest way to build the project is to use Qt Creator.

Build

Server

Currently the server is an console application and does not depend on Qt. server can be easily built with CMake. Navigate to the projects root directory and run the following command:

cmake -S . -B .\out\build -DCMAKE_TOOLCHAIN_FILE=[VCPKG_DIRECTORY_PATH]/scripts/buildsystems/vcpkg.cmake

Replace [VCPKG_DIRECTORY_PATH] with the path to the vcpkg installation directory. This will try to generate build files for the native IDE, for example Visual Studio on windows, according to your platform. You can choose your preferred IDE with the -G parameter followed by the name of the IDE of your choice defined here. Once the build files are generated the project can be built with the command:

cmake --build .\out\build

By default, the build type will be Debug, in order to chanage the build type to release just use --config Release arugment. When built navigate to the folder where the executable is and start the server as follows (in Windows): .\server.exe [port]

Client

The client can be built with Qt Creator. After cloning the project, open the project file, local-chat.pro, and uncomment the following line:

INCLUDEPATH += [VCPKG_DIRECTORY_PATH]\installed\x86-windows\include

local-chat's People

Contributors

rezaqorbani avatar

Watchers

 avatar

Forkers

artvan15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.