A simple .qoi image file viewer on top of the sokol headers.
WASM version (see below for build instructions)
> git clone https://github.com/floooh/qoiview > cd qoiview
> mkdir build > cd build > cmake .. > cmake --build .
To build a Release version on Linux and Mac:
> cmake -DCMAKE_BUILD_TYPE=MinSizeRel .. > cmake --build .
To build a Release version on Windows with the VisualStudio toolchain:
> cmake .. > cmake --build . --config MinSizeRel
NOTE: on Linux you'll also need to install the 'usual' dev-packages needed for X11+GL development.
On Linux and macOS:
> ./qoiview file=../images/dice.qoi
On Windows with the Visual Studio toolchain the exe is in a subdirectory:
> Debug\qoiview.exe file=../images/dice.qoi > MinSizeRel\qoiview.exe file=../images/dice.qoi
Build and Run WASM/HTML version via Emscripten (Linux, macOS)
Setup the emscripten SDK as described here:
Don't forget to run
source ./emsdk_env.sh after activating the SDK.
And then in the
mkdir build cd build emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel .. cmake --build .
To run the compilation result in the system web browser:
> emrun qoiview.html
...which should look like this.
(this procedure should also work on Windows with
make in the path, but is currently untested)
Visual Studio (Windows)
On Windows, cmake will automatically create a Visual Studio solution file in the build directory, which can be opened with:
> start qoiview.sln
cmake .. with
cmake -GXcode .. and open the generated Xcode project:
> cmake -GXcode .. > open qoiview.xcodeproj
Visual Studio Code (Windows, Linux, macOS)
Use the MS C/C++ extension together with the MS CMake Tools extension and start Visual Studio code from the project's root directory. The CMake extension will detect the CMakeLists.txt file and take over from there.