1# nomacs - Image Lounge 2 3nomacs is a free, open source image viewer, which supports multiple platforms. You can use it for viewing all common image formats including RAW and psd images. nomacs is licensed under the GNU General Public License v3 and available for Windows, Linux, FreeBSD, Mac, and OS/2. 4 5[![Build Status](https://travis-ci.org/nomacs/nomacs.svg?branch=master)](https://travis-ci.org/nomacs/nomacs) 6[![Build status](https://ci.appveyor.com/api/projects/status/0lw27jchw3ymaqd4?svg=true)](https://ci.appveyor.com/project/diemmarkus/nomacs) 7[![Downloads](https://img.shields.io/github/downloads/nomacs/nomacs/total.svg)](https://github.com/nomacs/nomacs/releases/latest) 8[![Crowdin](https://badges.crowdin.net/nomacs/localized.svg)](http://translate.nomacs.org/project/nomacs) 9 10## Build nomacs (Windows) 11 12We assume you have an IDE (i.e. Visual Studio), python, git, and [Qt](https://www.qt.io/download-open-source) installed. 13 14Get all dependencies: 15```bash 16git submodule init 17git submodule update 18``` 19Project folders in ``3rd-party`` will not be empty anymore. Now call: 20```bash 21python scripts/make.py "qtpath/bin" 22``` 23 24This will build nomacs into `build/nomacs`. If you are using Visual Studio, you can then double-click `build/nomacs/nomacs.sln`. Right-click the nomacs project and choose `Set as StartUp Project`. 25 26Build individual projects using: 27```bash 28python scripts/make.py "qt/bin" --project quazip,libraw --force 29``` 30 31### Developer Build 32I like having a separate developer build (without submodules) that uses 3rd party libs already compiled. To do so you need to: 33```bash 34git submodule update --init --remote scripts 35 36# python scripts/make.py "C:\Qt\Qt-5.14.1-installer\5.14.2\msvc2017_64\bin" --lib-path C:\coding\nomacs\nomacs\3rd-party\build 37python scripts/make.py "qt/bin" --lib-path "nomacs/3rd-party/build" 38``` 39 40### If anything did not work 41 42- check if you have setup opencv (otherwise uncheck ENABLE_OPENCV) 43- check if your Qt is set correctly (otherwise set the path to `qt_install_dir/qtbase/bin/qmake.exe`) 44- check if your builds proceeded correctly 45 46## Build nomacs (Ubuntu) 47 48Get the required packages: 49 50``` console 51sudo apt-get install debhelper cdbs qt5-qmake qttools5-dev-tools qt5-default qttools5-dev libqt5svg5-dev qt5-image-formats-plugins libexiv2-dev libraw-dev libopencv-dev cmake libtiff-dev libquazip5-dev libwebp-dev git build-essential lcov libzip-dev 52``` 53 54Get the nomacs sources from github: 55``` console 56git clone https://github.com/nomacs/nomacs.git 57``` 58 59This will by default place the source into ~/nomacs 60Go to the nomacs/ImageLounge directory and run `cmake` to get the Makefiles: 61``` console 62mkdir build 63cd build 64cmake -DUSE_SYSTEM_QUAZIP=ON ../ImageLounge/. 65``` 66 67Compile nomacs: 68``` console 69make 70``` 71 72You will now have a binary (~/nomacs/build/nomacs), which you can test (or use directly). To install it to /usr/local/bin, use: 73``` console 74sudo make install 75``` 76 77note that you have to execute 78``` console 79sudo ldconfig 80``` 81after a successfully install. 82 83Install the [heif plugin](https://github.com/jakar/qt-heif-image-plugin) for HEIF support. 84 85### For Package Maintainers 86 87- Set `ENABLE_TRANSLATIONS` to `true` (default: `false`) 88- Build all officially supported [plugins](https://github.com/nomacs/nomacs-plugins/) 89 90## Build nomacs (MacOS) 91 92Install [Homebrew](http://brew.sh/) for easier installation of dependencies. 93Install required dependencies: 94 95``` console 96$ brew install qt5 exiv2 opencv libraw quazip cmake pkg-config 97``` 98 99Go to the `nomacs` directory and run cmake to get the Makefiles: 100 101``` console 102$ mkdir build 103$ cd build 104$ Qt5_DIR=/usr/local/opt/qt5/ cmake -DQT_QMAKE_EXECUTABLE=/usr/local/opt/qt5/bin ../ImageLounge/. 105``` 106 107Run make: 108 109```console 110$ make 111``` 112 113You will now have a binary (`nomacs.app`), which you can test (or use directly). To install it to `/usr/local/bin`, use 114 115```console 116$ sudo make install 117``` 118 119## Build in Docker 120We have created a docker image that best simulates the travis system (currently it's ubuntu xenial 16.04). To build nomacs in a docker, you have to create the image: 121````bash 122docker build --rm -f "Dockerfile" -t nomacs:latest empty-docker-dir 123````` 124To deploy nomacs in a docker on your system, you can mount this directory using: 125````bash 126docker run --rm -it -v C:\\coding\\nomacs:/usr/nomacs nomacs:latest 127```` 128If needed, you can upload the image: 129````bash 130docker login 131docker tag nomacs diemmarkus/nomacs 132docker push diemmarkus/nomacs:latest 133```` 134 135## Links 136 137- [nomacs.org](https://nomacs.org) 138- [GitHub](https://github.com/nomacs) 139 140[![nomacs-icon](https://nomacs.org/startpage/nomacs.svg)](https://nomacs.org) 141