Skip to content

Spike271/Analog-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clock logo

Analog Clock

Build for all platforms

Deploy to GitHub Pages

About the Project

Just a simple clock.

Screenshot

Screenshot

Features

This clock displays real-time with ticking sound.

Technologies Used

  • Language: C++
  • Graphics Library: raylib

Prerequisites

Before building or running this project, ensure you have the following dependencies installed:

  • C++ 20 compatible compiler or higher

For Desktop

  • CMake (3.31 or higher)
  • Ninja (if you're not building for Visual Studio)
For Linux

Info: Make sure to check out the raylib wiki to make sure you have all necessary dependencies installed on your machine.

For Web

Building the Project (For Desktop)

Clone the Repository

Start by cloning the project from the GitHub repository:

# Clone the Repository
git clone https://github.com/Spike271/Analog-Clock.git

For Windows (Visual Studio)

  1. Generate build files:

    cmake -B build
  2. Build the project:

    cmake --build build -j8 --config Release

For Other Platforms (Also works for Windows)

  1. Create and navigate to the build directory:

    mkdir build
    cd build
  2. Generate the build system files using Ninja:

    cmake -G "Ninja" -D CMAKE_CXX_COMPILER=g++ -D CMAKE_BUILD_TYPE=Release ..
  3. Build the project:

    ninja

Building for Web

  1. Ensure you have Emscripten installed and activated in your environment.

  2. Create and navigate to the build-web directory:

    mkdir build-web
    cd build-web
  3. Generate the build files using Emscripten:

    emcmake cmake .. -DPLATFORM=Web -DCMAKE_BUILD_TYPE=Release
  4. Build the project:

    emmake make
  5. The build will generate the following files:

    • Analog_Clock.html - The HTML page to load the App
    • Analog_Clock.js - JavaScript code
    • Analog_Clock.wasm - WebAssembly binary
    • Analog_Clock.data - App resources
  6. To run the Application, you'll need to serve these files using a local web server:

    # Using Python 3
    python3 -m http.server 8080
    # Then open localhost:8080/Analog_Clock.html in your browser
    
    # Alternatively, if you have the emscripten binaries in your path, you can run the following command
    emrun Analog_Clock.html

About

Analog Clock made in C++ using raylib.

Topics

Resources

Stars

Watchers

Forks

Contributors