Git Product home page Git Product logo

halilertekin / lightpack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from psieg/lightpack

0.0 1.0 0.0 26.81 MB

Lightpack and Prismatik open repository

License: GNU General Public License v3.0

C 20.68% C++ 24.12% Makefile 0.83% HTML 10.22% CSS 0.03% Assembly 0.04% XSLT 0.50% Python 1.53% Java 0.07% Scheme 0.01% C# 15.94% Shell 0.19% Pascal 25.16% Lua 0.07% Ruby 0.03% QMake 0.39% Batchfile 0.03% CMake 0.06% Inno Setup 0.09% Objective-C 0.03%

lightpack's Introduction

Lightpack project with Prismatik flavour

Latest version AUR bin package AUR git package

Modified version which includes various improvements for Windows, esp. a Desktop Duplication API Grabber

Table of Contents:
  Short Description
  Main Features
  Supported Devices and Protocols
  Making Plugins
  Useful URLs
  Build Prismatik with Windows
  Build with Linux
  Build with OS X
  Build Firmware

Lightpack is a fully open-source and simple hardware implementation of the backlight for any computer. It's a USB content-driven ambient lighting system.

Prismatik is an open-source software we buid to control Lightpack devices. It grabs the screen, analyzes the picture, calculates resulting colors, and provides soft and gentle lighting with a Lightpack device. Moreover, you can handle other devices with Prismatik such as Adalight, Ardulight, or even Alienware LightFX system.

Main Features:
Supported Devices and Protocols:
  • Lightpack PC/v1
  • Serial
    • Adalight
    • Ardulight
    • Arduino
    • ESP8266/ESP32 (WLED firmware highly recommended)
  • Wi-Fi UDP:
    • WARLS
    • DRGB
    • DNRGB
    • ESP8266/ESP32 (WLED firmware highly recommended)
Making Plugins:
Useful URLs:

Prismatik Build Instructions for Windows

Prerequisites:

  • Qt SDK, you may need to set %QTDIR% (sysdm.cpl → Advanced → Environment Variables → New) to something like C:\Qt\x.xx.x\msvc_xxxx\.
  • Visual Studio, Windows SDK or Microsoft DirectX SDK
  • optional (if you want to create an installer) POSIX shell utilities MSYS for example.
  • optional any OpenSSL binaries to include them in the setup. If you just want to build, you can skip them in build-vars.prf (this will render the update check ineffective).
  • optional BASS and BASSWASAPI for the Sound Visualizer. You can skip them in build-vars.prf.

Build Process:

  1. Go to <repo>/Software
  2. Copy and edit build-vars.prf according to your machine
  3. Optional: if locales changed: run update_locales.bat or ./update_locales.sh (slow on Windows)
  4. Run scripts/win32/generate_sln.bat (from the Visual Studio Developer prompt / vcvarsall.bat)
  5. Build Lightpack.sln with MSBuild / VisualStudio

Building an Installer:

  1. Run scripts/win32/prepare_installer.sh. (This builds the autoupdater (UpdateElevate), needs the submodule checked out and currently works only with VS2015).
  2. Build dist_windows/script.iss (64bit) or script32.iss (32bit) with ISCC (the InnoSetup compiler)

Build Instructions for Linux

Prerequisites:

You will need the following packages, usually all of them are in distro's repository:

  • qt5-default
  • qttools5-dev-tools
  • libqt5serialport5-dev
  • build-essential
  • pkg-config
  • libusb-1.0-0-dev
  • libudev-dev
  • if you are using Unity DE: libappindicator-dev libnotify-dev libgtk2.0-dev
  • if you are using gnome you'll need gnome-shell-extension-appindicator for a working tray icon
  • not required, but the update checker uses SSL sockets: openssl
  • for sound visualizer: libpulse-dev, libfftw3-dev (edit build-vars.prf(.default) and comment out PULSEAUDIO_SUPPORT to disable the feature)

(this is a Debian based example, see Software/dist_linux/*/Dockerfile for your particular package backend if available)

Build Process:

  1. Go to <repo>/Software
  2. Optional: if locales changed: run ./update_locales.sh
  3. Run qmake -r
  4. Run make
  5. Resulting binary will be in <repo>/Software/bin

Building a Package:

If you target your current system / package backend:

  1. cd Software/dist_linux
  2. Run ./build-natively.sh to list available backends (dpkg, pacman, flatpak, ...)
  3. Run ./build-natively.sh <package-backend>
  4. Resulting package should be in <package-backend>/ folder

You can also target a different distribution / backend combination via docker (this assumes docker is up and running on your system):

  1. cd Software/dist_linux
  2. Run ./build-in-docker.sh to list backends
  3. Run ./build-in-docker.sh <package-backend> <os-image-name> <os-image-tag>:
    • ./build-in-docker.sh dpkg debian 10.6
    • ./build-in-docker.sh dpkg ubuntu 18.04
    • ./build-in-docker.sh pacman archlinux latest
  4. Resulting package should be in <package-backend>/ folder

(os-iamge-name/os-image-tag should be available on hub.docker.com or existing on your system, they will be used as a base for the Prismatik builder image)

Manual Deployment:

Instead of building a deb package, you can:

  1. Add a rule for UDEV. See comments from <repo>/Software/dist_linux/deb/etc/udev/rules.d/93-lightpack.rules for how to do it.
  2. Make sure <repo>/Software/qtserialport/libQt5SerialPort.so.5 is available for loading by Prismatik (place it in appropriate dir or use LD_LIBRARY_PATH variable)

Build Instructions for OS X

Prerequisites:

  • Qt SDK (5.0+)
  • MacOSX 10.9.sdk
Whole Dependencies List for Prismatik 5.10.1:
  • QtCore.framework
  • QtGui.framework
  • QtNetwork.framework
  • QtOpenGL.framework

Build Process:

  1. Download and unpack 5.0+ Qt SDK from www.qt-project.org
  2. Go to <repo>/Software
  3. Optional: if locales changed: run ./update_locales.sh
  4. CLI
    1. Run qmake -r
    2. Run make
  5. or Xcode
    1. Run ./scripts/macos/generate_xcode_project.sh
    2. Open Lightpack.xcodeproj

Building a dmg package:

  1. Run macdeployqt bin/Prismatik.app -dmg

Firmware Build Instructions

Updating Firmware on Windows: If you don't want to build the firmware yourself, you can follow the documentation for flashing the latest firmware on Windows.

Please note that these instructions are for Debian based systems.

Compiling Firmware Only:

  1. Install AVR GCC Toolchain: sudo apt-get install gcc-avr binutils-avr avr-libc
  2. Compile the firmware:
  • cd Firmware
  • make LIGHTPACK_HW=7 (or any other hardware version 4-7)
  • Alternatively, you can do ./build_batch.sh to build the firmware for all hardware versions
  1. The firmware can be found in the same directory (individual build) or Firmware/hex (batch build).

Compiling and Uploading Firmware to Device:

  1. Install AVR GCC Toolchain and dfu-programmer: sudo apt-get install gcc-avr binutils-avr avr-libc avrdude dfu-programmer
  2. Reboot device to bootloader (via the secret button on the device)
  3. Compile and upload the firmware:
  • cd Firmware
  • make LIGHTPACK_HW=7 && make dfu LIGHTPACK_HW=7 (or any other hardware version 4-7)

Please let us know if you find mistakes, bugs or errors. Contributions are welcome.
Post new issue : https://github.com/psieg/Lightpack/issues

lightpack's People

Contributors

brunql avatar psieg avatar timsat avatar zomfg avatar atarity avatar e-yes avatar anisan avatar dreamer-dead avatar archomeda avatar tom-archer avatar dmadison avatar vasilyfomin avatar joshhh avatar jackun avatar asgardc3r avatar yuandongli avatar tj-91 avatar womifa avatar drakmor avatar hashworks avatar alexmorbo avatar andreasd avatar danielcompton avatar kdsx avatar mickdekkers avatar pdecat avatar luckygerbils avatar

Watchers

James Cloos avatar

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.