-
Notifications
You must be signed in to change notification settings - Fork 0
Building the Source
Two different ways to build the entire project
- Easy: Must be on Windows, you can run the python script to build everything
- Harder: Build each part individually
- Install Visual Studio 2015 Community Edition
- Install Git bash
- Install Node.js (5.10+)
- Install Python 2.7.3
- Install nw-gyp (nw-0.12.2+) if you plan to build the interface
- Install Inno Setup installer if you plan to build setup.exe
Download the source recursively
Download Git and clone the repo
git clone --recursive https://github.com/matthewn4444/Lightpack-Filter-and-API.git
- this will also clone dlib thirdparty library
- this will also clone directshow-sdk library
You can only do this on Windows.
- You must open any *.sln file in Visual Studio or the next step will fail
- Then run the build.py script. It will fail if above didn't run. If it fails try to reboot pc and do step 1 again
- The setup.exe and lightpack.zip should be in the Release folder
To build one of the following, you must do everything above it since it will be dependent on it.
- Build Lightpack C++ API
- Build Lightpack Directshow filter
- Build Lightpack Node.js extension
- Build Application mutex Node.js extension
- Build the Lightpack filter interface
- Build the installer file
Alternatively, if the file has a build.py script, you can run it in that folder and it should build the solution. Note that you must open a *sln project in Visual Studio before running the python script.
- Go to the folder of the repo
- Run Lightpack.sln inside Visual Studio
- Build project LightpackAPI
- [Optional] you can build the Test project to test that Lightpack works (after plugging the USB in)
To use this in your project follow instructions here
There isn't a make file but I assume since the libraries are cross-platform, this project should compile to Linux and Mac.
- Change folders to nodejs/lightpack
- Install nw-gyp (with node), also needs Python 2.7.3 (read their instructions)
- Install Git-bash
- Run configure-win.sh (only works if you have bash installed)
- Change folders to vs/
- Open lightpack.sln in Visual Studio
- Change the build to Release (debug will NOT work)
- Build the project and lightpack.node will be inside /Release folder
- Change folders to nodejs/lightpack
- Install nw-gyp, also needs Python 2.7.3 (read their instructions)
- Run
$ nw-gyp configure --target=0.13.0
(change target with other versions of Node-webkit) - You should have a MakeFile, you will need to add dependencies to Lightpack C++ API (TODO)
- Run
nw-gyp build
to build the extension
To use this in your project follow instructions here
- You must build directshow first. You must have init all submodules to have directshow sdk downloaded in directshow/directshow-sdk. Go there and open baseclasses/baseclasses.sln in Visual Studio
- Compile all 4 permutations of Debug + x86, Debug + x64, Release + x86 and Release + x64
- Open Lightpack.sln in Visual Studio from root folder of repo
- Change build to Release
- Build Lightpack-filter project and the lightpack.ax file should be in /Release
- Build Lightpack-filter project for x64 by selecting the platform from visual studio and the lightpack64.ax file should be in /Release
To use this in your project follow instructions here
This uses CreateMutex("Name")
(documentation here) for Node.js so that other applications can tell if a Node-webkit application is running by checking the global mutex. This only works on Windows because the API is for Windows.
- Open folder /nodejs/app-mutex/
- Install nw-gyp, also needs Python 2.7.3 (read their instructions)
- Run
configure-win.sh
- Change folder to /vs
- Run app-mutex.sln
- Change the Build to Release
- Build the project and app-mutex.node will be in /Release
To use this in your project follow instructions here
Assuming all of the above is built correctly, you can now build the interface.
- Download the Node-webkit prebuild libraries here for Windows 32bit (I used version 0.13.0)
- Create a folder in /nodejs/ called nw-binaries and extract all the items from step 1 to this folder
- Make sure Node.js is installed
- Change folder /directshow/Lightpack-filter-gui/
- Run build_all.bat
- You can run run.bat instead to run the application
- Change folders to /Release to find all the files and lightpack-filter.zip file
You can run the GUI by running nw.exe.
- Run build_all.bat and setup.exe will be in the /Release folder