diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a798e4b..454b937 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: TerminalImageViewer CI +name: Build and run on: push: @@ -8,15 +8,24 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: sudo apt-get install -qy imagemagick + - name: Validate gcc version + run: | + if [[ $(gcc --version | awk '/gcc/ && ($3+0)>13{print "gcc-13+"}') != "gcc-13+" ]]; then + # Script courtesy of https://stackoverflow.com/a/67791068/16134571 + sudo apt install gcc-13 g++-13 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13 + sudo update-alternatives --set gcc /usr/bin/gcc-13 + fi - name: Build run: make -C src - name: Test - run: ./src/tiv -w 80 -h 24 /usr/share/pixmaps/debian-logo.png + run: | + images=('/usr/local/share/icons/hicolor/128x128/apps/microsoft-edge.png' '/usr/local/share/icons/hicolor/128x128/apps/CMakeSetup.png' '/usr/local/doc/cmake/html/_static/file.png' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/tagmanager/cuteanimals/res/drawable/cat_1.jpg' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/wallet/res/drawable-ldpi/icon.png' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/wallet/res/drawable-hdpi/icon.png' '/usr/share/plymouth/themes/spinner/watermark.png' '/usr/share/apache2/icons/apache_pb.png' '/usr/share/doc/libpng-dev/examples/pngtest.png') + ./src/tiv -w 160 -h 48 ${images[ $RANDOM % ${#images[@]} ]} # Get random image + ./src/tiv -w 160 -h 48 /usr/share/pixmaps # Dir mode diff --git a/.gitignore b/.gitignore index af5d7fa..566b567 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,10 @@ x64/ *.vcxproj.* +###Visual Studio Code### +.vscode/ + + ###Java### # Compiled class file diff --git a/README.md b/README.md index 3cc331a..4a96490 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ The shell will expand wildcards. By default, thumbnails and file names will be d - 2021-05-22: We now support Apple Clang, thanks to the C++ filesystem library being no longer experimental. Issue forms have also been added to the GitHub repository. - 2023-09-29: Today marks the 40th anniversary of the GNU project. If you haven't learned the news concerning it and Stallman, please do. In project news, @aaronliu0130 will probably be developing this project from now on as the original author has moved on to better things to do. Support for MSVC has been added and the repository is now under an Apache 2.0 or GPL3 dual license. CI building for each release will hopefully be setup soon. The main program has also adopted a mostly Google code-style because I (aaron) think it simply makes sense. `SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later` +- 2024-02-01: We are currently working on splitting the source code into library-agnostic library files and a client that uses CImg. ## Installation @@ -103,3 +104,7 @@ If multiple images match the filename spec, thumbnails are shown. For the example below, the top image was generated with the character optimization disabled via the `-0` option. ![Comparison](https://i.imgur.com/OzdCeh6.png) + +## Licensing + +You are free to use this code under either the GPL (3 or later) or the Apache 2.0. We also use the CImg library, which is licensed under either [CeCILL 2.0](https://spdx.org/licenses/CECILL-2.0.html) (close to GPL and compatible with it) or [CeCILL-C](https://spdx.org/licenses/CECILL-C) (close to LGPL and compatible with Apache). diff --git a/src/tiv.cpp b/src/tiv.cpp index 4782d50..7fc9223 100644 --- a/src/tiv.cpp +++ b/src/tiv.cpp @@ -40,7 +40,6 @@ #include #include #include -#include // This #define tells CImg that we use the library without any display options -- // just for loading images.