Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #47 from juliagoda/testing
Browse files Browse the repository at this point in the history
Testing
  • Loading branch information
juliagoda authored Dec 12, 2018
2 parents 7359767 + b8609a1 commit d18b1d6
Show file tree
Hide file tree
Showing 19 changed files with 369 additions and 113 deletions.
34 changes: 30 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,32 @@ env:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "Hz0hyZv6IxfQGvv+E82BoP4vpRm5iq74bg4I0HLvXRnJjnZxsd3aD2iS+bYYgWD/clGVYttaW8hQoDCe36Pz/QgKDwmJLKcdoWryPpNhaPb1cQhf54vaF6yG1/QsPZMZxvtAvDKGgSHm5fbfi9gU5QXRgV3y1zc8i6g2GyadCfLPAka29gwTB6T0Vg13mjVbSqgYTOwreM+u7thEjzo67jgv7AGjTFMxqrqu33zqa3YDnr31SNnve9BFNTfg3jgQKZ7FyX2gpqSHzrXcFDXQbe6zwNYYDi9ilR7a0RkmqrASMI6ekohMxxP/BJVV68OMDiMjupm48Lk8nNmZ2UeOThdM/C1EpN7NrGEhMtBVloyDnFpDEXJyyY7Fni5dxgNLgH0Q+ojOsKh6nhJkpOwIIw5N99VDa4WXZXEGLHpkJeRc6ADhX0EW07lLLLftkT90jaqt2IKxfvkpPU/HU5UxDjQdZZOX+RYNEIrSe0XIpvkMWPsh16rX/wV/mcgks9BGszRCkLcPSJoVrsbtaVJBbohsbSZS1l1HNcG+CYX12iV+vLmGQ//44Rmcn99yFu46altnWlIG2Mcs3EU1589zodIjWLkLhT3au6ucsqLqsp2hwqiG1dQkkKcoYsx+obgV1mrbcjspJOgKJGJOMAyQwIdPo0V6wrKg74JvJILZlyI="
matrix:
- QT=5 PPA=ubuntu-sdk-team/ppa
- QT=51 PPA=beineri/opt-qt511-trusty
- QT=52 PPA=beineri/opt-qt521-trusty
- QT=53 PPA=beineri/opt-qt532-trusty
- QT=54 PPA=beineri/opt-qt542-trusty
- QT=55 PPA=beineri/opt-qt551-trusty
- QT=56 PPA=beineri/opt-qt562-trusty
- QT=56 PPA=beineri/opt-qt563-trusty
- QT=57 PPA=beineri/opt-qt571-trusty
- QT=58 PPA=beineri/opt-qt58-trusty
- QT=59 PPA=beineri/opt-qt591-trusty
- QT=510 PPA=beineri/opt-qt-5.10.1-trusty

matrix:
exclude:
- { os: linux, env: QT=5 PPA=ubuntu-sdk-team/ppa }
- { os: linux, env: QT=51 PPA=beineri/opt-qt511-trusty }
- { os: linux, env: QT=52 PPA=beineri/opt-qt521-trusty }
- { os: linux, env: QT=53 PPA=beineri/opt-qt532-trusty }
- { os: linux, env: QT=54 PPA=beineri/opt-qt542-trusty }
- { os: linux, env: QT=55 PPA=beineri/opt-qt551-trusty }
- { os: linux, env: QT=56 PPA=beineri/opt-qt562-trusty }
- { os: linux, env: QT=56 PPA=beineri/opt-qt563-trusty }
- { os: linux, env: QT=57 PPA=beineri/opt-qt571-trusty }

addons:
apt:
update: true
Expand All @@ -39,10 +65,10 @@ addons:

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository -y ppa:beineri/opt-qt-5.10.1-trusty;
sudo add-apt-repository -y ppa:${PPA};
sudo apt-get update;
sudo apt-get install --yes qt510tools build-essential;
sudo ln -s /opt/qt510/lib/* /usr/lib/x86_64-linux-gnu/;
sudo apt-get install --yes qt${QT}tools build-essential;
sudo ln -s /opt/qt${QT}/lib/* /usr/lib/x86_64-linux-gnu/;
git clone git://anongit.kde.org/extra-cmake-modules;
cd extra-cmake-modules;
mkdir extra-cmake-modules-build;
Expand All @@ -54,4 +80,4 @@ before_install:
cd ..;
fi;

script: cmake .. -DCMAKE_PREFIX_PATH="/opt/qt510/" && make
script: cmake .. -DCMAKE_PREFIX_PATH="/opt/qt${QT}/" && make
13 changes: 12 additions & 1 deletion BuildOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,27 @@ There are a few application specific options that can be used when running
cmake to build antimicro. The following file will attempt to list some of those
options and describe their use in the project.


## Universal Options

-DUPDATE_TRANSLATIONS

Default: OFF. Set updateqm target to call lupdate in order to update
translation files from source.

-DTRANS_KEEP_OBSOLETE

Default: OFF. Do not specify -noobsolete option when calling lupdate
command for qm files. -noobsolete is a method for getting rid of obsolete text entries

-DWITH_TESTS

Default: OFF. Allows for the launch of test sources with unit tests

-DUSE_SDL_2

Default: ON. Compile the program with SDL 2 instead of SDL 1.2.
Default: ON. Compile the program with SDL 2.


## Linux Options

Expand Down
83 changes: 41 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ endif(WITH_TESTS)

if(UNIX)
option(WITH_X11 "Compile with support for X11." ON)
option(WITH_UINPUT "Compile with support for uinput. uinput will be usable to simulate events." OFF)
option(WITH_UINPUT "Compile with support for uinput. uinput will be usable to simulate events." ON)
option(WITH_XTEST "Compile with support for XTest. XTest will be usable to simulate events." ON)
option(APPDATA "Build project with AppData file support." ON)
endif(UNIX)

option(UPDATE_TRANSLATIONS "Call lupdate to update translation files from source." OFF)
option(TRANS_KEEP_OBSOLETE "Do not specify -no-obsolete when calling lupdate." OFF)
option(TRANS_KEEP_OBSOLETE "Add -noobsolete option to lupdate command to get rid of old text entries" OFF)


if(WIN32)
Expand Down Expand Up @@ -551,7 +551,7 @@ if(UNIX)
endif(USE_SDL_2)
elseif (WIN32)
if(USE_SDL_2)

if(SDL2_LIBRARY_DIR AND SDL2_INCLUDE_DIR)
list(APPEND LIBS ${SDL2_LIBRARY})
include_directories(${SDL2_INCLUDE_DIR})
Expand Down Expand Up @@ -617,11 +617,11 @@ endif(UNIX)

# Specify out directory for final executable.
if(UNIX)
install(TARGETS antimicro RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS antimicro RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS antilib DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(FILES ${antimicro_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/antimicro")
elseif(WIN32)
install(TARGETS antimicro RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
install(TARGETS antimicro RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX})
install(TARGETS antilib
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT runtime
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT devel
Expand All @@ -630,47 +630,46 @@ elseif(WIN32)
endif(UNIX)

if(UNIX)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-application_exit.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-archive_insert.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-dialog_cancel.png DESTINATION share/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-dialog_close.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-dialog_ok.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_close.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-application_exit.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-archive_insert.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-dialog_cancel.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_open.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_open_folder.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_revert.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-dialog_close.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-dialog_ok.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_close.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_revert_small.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_save.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_save_as.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_open.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_open_folder.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_revert.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_clear.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_clear_list.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_delete.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_revert_small.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_save.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-document_save_as.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_select.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_table_delete_row.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_table_insert_row_below.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_clear.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_clear_list.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_delete.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-games_config_custom.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-games_config_options.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-help_about.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_select.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_table_delete_row.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-edit_table_insert_row_below.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-text_field.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-view_fullscreen.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-view_refresh.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-view_restore.png DESTINATION share/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-games_config_custom.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-games_config_options.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-help_about.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-text_field.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-view_fullscreen.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-view_refresh.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)
ecm_install_icons(ICONS src/icons/icons/16x16/actions/16-actions-view_restore.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons)

ecm_install_icons(ICONS src/icons/application/16x16/apps/16-apps-com.github.juliagoda.antimicro.png DESTINATION share/icons)
ecm_install_icons(ICONS src/icons/application/24x24/apps/24-apps-com.github.juliagoda.antimicro.png DESTINATION share/icons)
ecm_install_icons(ICONS src/icons/application/32x32/apps/32-apps-com.github.juliagoda.antimicro.png DESTINATION share/icons)
ecm_install_icons(ICONS src/icons/application/48x48/apps/48-apps-com.github.juliagoda.antimicro.png DESTINATION share/icons)
ecm_install_icons(ICONS src/icons/application/64x64/apps/64-apps-com.github.juliagoda.antimicro.png DESTINATION share/icons)
ecm_install_icons(ICONS src/icons/application/16x16/apps/16-apps-com.github.juliagoda.antimicro.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons)
ecm_install_icons(ICONS src/icons/application/24x24/apps/24-apps-com.github.juliagoda.antimicro.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons)
ecm_install_icons(ICONS src/icons/application/32x32/apps/32-apps-com.github.juliagoda.antimicro.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons)
ecm_install_icons(ICONS src/icons/application/48x48/apps/48-apps-com.github.juliagoda.antimicro.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons)
ecm_install_icons(ICONS src/icons/application/64x64/apps/64-apps-com.github.juliagoda.antimicro.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons)

install(FILES src/images/profile.jpg src/images/antimicro.png src/images/antimicro_trayicon.png src/images/axis.png src/images/button.png src/images/controllermap.png DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/antimicro/images")
install(FILES src/images/antimicro.png src/images/antimicro_trayicon.png src/images/axis.png src/images/button.png src/images/controllermap.png DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/antimicro/images")

install(FILES src/icons/index.theme DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/antimicro/icons/hicolor")
install(FILES other/com.github.juliagoda.antimicro.desktop DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
Expand Down Expand Up @@ -748,24 +747,24 @@ if(WIN32)
${ICU_IN_DLL}
${ICU_UC_DLL}
)

# Copy relevant DLL files depending on the chosen architecture.
if(TARGET_ARCH STREQUAL "x86_64")
find_library( GCC_DLL "libgcc_s_seh-1.dll" )

list(APPEND EXTRA_DLL_FILES
${GCC_DLL}
"${SDL2_BASE_DIR}/x86_64-w64-mingw32/bin/SDL2.dll"
)
else()
find_library( GCC_DLL "libgcc_s_dw2-1.dll" )

list(APPEND EXTRA_DLL_FILES
${GCC_DLL}
${GCC_DLL}
"${SDL2_BASE_DIR}/i686-w64-mingw32/bin/SDIRDL2.dll"
)
endif(TARGET_ARCH STREQUAL "x86_64")

# Not a DLL file, but needs to travel with SDL2.DLL
list(APPEND EXTRA_DLL_FILES "${SDL2_BASE_DIR}/README-SDL.txt")

Expand Down
81 changes: 79 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
4. [Build Dependencies](#build-dependencies)
a. [Building Under Linux](#building-under-linux)
b. [Building Under Windows](#building-under-windows)
c. [Building with Flatpak](#building-with-flatpak)
5. [Testing Under Linux](#testing-under-linux)
6. [Support](#support)
7. [Bugs](#bugs)
Expand Down Expand Up @@ -180,7 +181,7 @@ when bundling the Window version for other users.
* Run "Build All" to have the application and required DLLs installed
into the final location that will be ready for distribution.

#### 64-bit Build
##### 64-bit Build

* Some additional steps are required in order to compile a 64-bit version of
antimicro. The first step is to download a packaged version of Qt, MSYS shell environment,
Expand Down Expand Up @@ -208,7 +209,7 @@ and have it point to the 64 bit compiled version Qt. Also, make sure to add
building the program and copy the proper Qt and SDL DLLs if you perform an
**install_dlls**.

#### Building The Windows Installer Package (MSI)
##### Building The Windows Installer Package (MSI)

*These instructions have been tested with WiX 3.8*

Expand Down Expand Up @@ -238,6 +239,82 @@ Notes about the WXS file and the building process:

* Built MSI package will be placed in /windows .


### Building with Flatpak

#### Additional Dependencies

* flatpak
* flatbak-builder


#### Compilation & Installation

This tutorial is about installing antimicro with flatpak locally. As first you need a com.github.juliagoda.antimicro.json file, that is placed in main folder. You can for example copy and paste content to local file. Link to raw content of json file is [here](https://raw.githubusercontent.com/juliagoda/antimicro/master/com.github.juliagoda.antimicro.json).


1. Download and install Flatpak repo:

`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`

2. Add a runtime with Qt and all KDE Frameworks 5

`flatpak install flathub org.kde.Platform//5.11 org.kde.Sdk//5.11`

3. Create new directories for building and creating repo

```
mkdir build-dir
mkdir repo
```

4. Build antimicro

`flatpak-builder build-dir com.github.juliagoda.antimicro.json`

5. Test the build of application

`flatpak-builder --run build-dir com.github.juliagoda.antimicro.json antimicro`

6. Create repository for application

`flatpak-builder --repo=repo --force-clean build-dir com.github.juliagoda.antimicro.json`

7. Add the repository to flatpak locally

`flatpak --user remote-add --no-gpg-verify antimicro repo`

8. Install application

`flatpak --user install antimicro com.github.juliagoda.antimicro`


#### Run antimicro

If you have installed antimicro locally with success, you can run application:

`flatpak run com.github.juliagoda.antimicro`


#### Updating

To update all your installed applications and runtimes to the latest version, execute:

`flatpak update`


#### Uninstall antimicro

1. Delete a remote repository

`flatpak --user remote-delete antimicro`

2. Delete application

`flatpak uninstall com.github.juliagoda.antimicro`



## Testing Under Linux

If you are having problems with antimicro detecting a controller or
Expand Down
Loading

0 comments on commit d18b1d6

Please sign in to comment.