-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from muttleyxd/rewrite
Launcher rewrite with Qt5
- Loading branch information
Showing
123 changed files
with
10,399 additions
and
4,656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
kind: pipeline | ||
name: arch-g++ | ||
|
||
steps: | ||
- name: build-and-test | ||
image: muttleyxd/a3ul_archlinux_build:latest | ||
commands: | ||
- mkdir /tmp/build && cd /tmp/build | ||
- cmake /drone/src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Werror" -DRUN_TESTS=ON -DDEVELOPER_MODE=ON | ||
- make -j$(nproc) | ||
- ctest -V | ||
|
||
--- | ||
kind: pipeline | ||
name: ubuntu-18.04-g++-8 | ||
|
||
steps: | ||
- name: build-and-test | ||
image: muttleyxd/a3ul_ubuntu-18.04_build:latest | ||
commands: | ||
- mkdir /tmp/build && cd /tmp/build | ||
- cmake /drone/src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_CXX_COMPILER=g++-8 -DRUN_TESTS=ON -DDEVELOPER_MODE=ON | ||
- make -j$(nproc) | ||
- ctest -V | ||
|
||
--- | ||
kind: pipeline | ||
name: arch-g++-package | ||
|
||
clone: | ||
disable: true | ||
|
||
steps: | ||
- name: clone | ||
image: alpine/git | ||
commands: | ||
- git clone $DRONE_GIT_HTTP_URL . | ||
- git checkout $DRONE_COMMIT | ||
- chmod 777 /tmp/build | ||
volumes: | ||
- name: package | ||
path: /tmp/build | ||
- name: build-test-makepkg | ||
image: muttleyxd/a3ul_archlinux_build:latest | ||
volumes: | ||
- name: package | ||
path: /tmp/build | ||
commands: | ||
- cp -r /drone/src /tmp/arma3-unix-launcher | ||
- mkdir -p /tmp/build && cd /tmp/build | ||
- cp /tmp/arma3-unix-launcher/tools/ci/packaging/archlinux/PKGBUILD ./ | ||
- sed -i 's|/arma3-unix-launcher|/tmp/arma3-unix-launcher|g' PKGBUILD | ||
- makepkg | ||
- name: publish_release | ||
image: muttleyxd/github-release | ||
environment: | ||
GITHUB_PUBLISH_TOKEN: | ||
from_secret: github_publish_key | ||
commands: | ||
- cd /tmp/build | ||
- mv $(echo *.tar.xz) $(echo *.tar.xz | sed 's/x86_64.pkg.tar.xz/archlinux-x86_64.pkg.tar.xz/g') | ||
- github-release --token $GITHUB_PUBLISH_TOKEN --repository muttleyxd/arma3-unix-launcher --file-glob "/tmp/build/*.tar.xz" | ||
when: | ||
event: [push, tag, deployment] | ||
branch: | ||
- master | ||
volumes: | ||
- name: package | ||
path: /tmp/build | ||
|
||
volumes: | ||
- name: package | ||
temp: {} | ||
|
||
--- | ||
kind: pipeline | ||
name: ubuntu-g++-8-package | ||
|
||
clone: | ||
disable: true | ||
|
||
steps: | ||
- name: clone | ||
image: alpine/git | ||
commands: | ||
- git clone $DRONE_GIT_HTTP_URL . | ||
- git checkout $DRONE_COMMIT | ||
- chmod 777 /tmp/build | ||
volumes: | ||
- name: package | ||
path: /tmp/build | ||
- name: build-test-makepkg | ||
image: muttleyxd/a3ul_ubuntu-18.04_build:latest | ||
volumes: | ||
- name: package | ||
path: /tmp/build | ||
commands: | ||
- . /etc/lsb-release | ||
- . /etc/os-release | ||
- export SHORT_HASH=`git rev-parse --verify HEAD | cut -c -7` | ||
- export COMMIT_COUNT=`git rev-list HEAD --count` | ||
- export TMP_BUILD="/tmp/build_deb" | ||
- export PKG_DIR="$TMP_BUILD/arma3-unix-launcher-$COMMIT_COUNT.$SHORT_HASH-$ID-$VERSION_ID-amd64" | ||
- mkdir -p $PKG_DIR/DEBIAN | ||
- cd $PKG_DIR | ||
- sed 's/VERSION/$COMMIT_COUNT-$SHORT_HASH/g' /drone/src/tools/ci/packaging/ubuntu-18.04/control >./DEBIAN/control | ||
- mkdir $TMP_BUILD/cmake_build && cd $TMP_BUILD/cmake_build | ||
- cmake /drone/src -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_INSTALL_PREFIX=/usr -DRUN_TESTS=ON | ||
- make -j$(nproc) | ||
- ctest --output-on-failure | ||
- make install DESTDIR=$PKG_DIR | ||
- cd $TMP_BUILD | ||
- dpkg-deb --build $PKG_DIR | ||
- ls -alh | ||
- cp *.deb /tmp/build | ||
- name: publish_release | ||
image: muttleyxd/github-release | ||
when: | ||
event: [push, tag, deployment] | ||
branch: | ||
- master | ||
environment: | ||
GITHUB_PUBLISH_TOKEN: | ||
from_secret: github_publish_key | ||
commands: | ||
- cd /tmp/build | ||
- github-release --token $GITHUB_PUBLISH_TOKEN --repository muttleyxd/arma3-unix-launcher --file-glob "/tmp/build/*.deb" | ||
volumes: | ||
- name: package | ||
path: /tmp/build | ||
|
||
volumes: | ||
- name: package | ||
temp: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,12 @@ | ||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
/build* | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
#Qt Creator | ||
CMakeLists.txt.* | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
#Executable | ||
arma3-unix-launcher | ||
|
||
#Eclipse project files | ||
.settings/* | ||
.cproject | ||
.project | ||
/MainForm.glade~ | ||
/#MainForm.glade# | ||
|
||
#CLion project files | ||
#CLion | ||
.idea/* | ||
cmake-build*/ | ||
|
||
#build dir | ||
build/* | ||
cmake-build-debug/* | ||
cmake-build-release/* | ||
CMakeLists.txt.user | ||
#Packages | ||
*.tar.xz | ||
*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
git: | ||
depth: false #($COMMIT_COUNT would fail otherwise) | ||
os: | ||
- osx | ||
language: cpp | ||
script: | ||
- mkdir build && cd build | ||
- cmake .. -DCPACK_GENERATOR=DragNDrop -DCMAKE_PREFIX_PATH='/usr/local;/usr/local/opt/qt' | ||
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_CXX_COMPILER=g++-9 | ||
-DRUN_TESTS=ON -DDEVELOPER_MODE=ON | ||
- set -e | ||
- make -j$(sysctl -n hw.ncpu) | ||
- ctest | ||
- make package | ||
- export COMMIT_COUNT=`git rev-list --count HEAD` | ||
- export COMMIT_HASH=`git rev-parse --verify HEAD | cut -c -7` | ||
- mv arma3-unix-launcher-*.dmg arma3-unix-launcher-$COMMIT_COUNT-$COMMIT_HASH-mac_os_x-x86_64.dmg | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: il+wwZH4DkB2kXPp4vgGmtWUKh4y6O+Jt415mcbHHTZLx0a6HaoJnVRLXMXEkJ9lqw9wlME2phlAcDNprSZrkTAH7lnz9ZgCklcIMIgPkvKJMleH1rUBy5YwBrYsld1XhjEbbxWzBGSJr0AXlAUKhB5ApwME0c8GW1awe4Job48cmhY/wUqm7PXv8opx4L871bhyXRzW1xxnB0HMw8Ru/VZ/c/tuo7zvy5m2ilia9+C+XW1xTI3nn6TNyEk1w3DD5dMWbu6ZBIKJZFuoZFe/Ysjps15ihJVpRjJ8ZAPJYu5FChRnBSYbdmeB5gOw1B5x+PJXCxnNbjUAfQ3NOCO+2Y+v/37QC9EYZ5FELKEuMTA2nbF1D6gC1bk9uA+V5PbEhFsMkSyrpY8xsWCKCwFJlI6AEJHKSJ+zDPanuNGSsJJbwKFI846z8bEFPY8ORj6wFzcMiiY0a1pFoOKmOLIUedvEX176MEOwyyjZbWqQF/5HA70XBuPbS0f9idVNBX5PkRUIEU02z2+K/hGZI35zHXJY1bmk5FNkrQYHmhSS/5AibIKEFBZlJ5bIHntP0V5wgE9VIO87xFFQyq4j6Xc95r3EfMilkOqOnWQrVLDYT1BB59a4rkWimc83FBNvT/RlrvBmRskg8g/ZvIlSHnBpwpBngEDBEqiztQlRWKva+n0= | ||
draft: true | ||
file_glob: true | ||
file: "/Users/travis/build/muttleyxd/arma3-unix-launcher/build/*.dmg" | ||
skip_cleanup: true | ||
on: | ||
repo: muttleyxd/arma3-unix-launcher | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
cmake_minimum_required (VERSION 2.8.12) | ||
project (arma3-unix-launcher) | ||
|
||
set (CMAKE_CXX_STANDARD 11) | ||
|
||
# GTKMM | ||
find_package (PkgConfig REQUIRED) | ||
pkg_check_modules (GTKMM REQUIRED gtkmm-3.0) | ||
include_directories(SYSTEM ${GTKMM_INCLUDE_DIRS}) | ||
link_directories (${GTKMM_LIBRARY_DIRS}) | ||
|
||
#build executable | ||
add_executable (arma3-unix-launcher main.cpp Filesystem.cpp Logger.cpp MainWindow.cpp Mod.cpp Settings.cpp Utils.cpp VDF.cpp VDFKey.cpp) | ||
target_link_libraries (arma3-unix-launcher ${GTKMM_LIBRARIES} pthread) | ||
set (CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}") | ||
|
||
if(APPLE) | ||
add_custom_command (TARGET arma3-unix-launcher POST_BUILD COMMAND mkdir arma3-unix-launcher.app && cd arma3-unix-launcher.app && mkdir Contents && cd Contents && mkdir MacOS) | ||
add_custom_command (TARGET arma3-unix-launcher POST_BUILD COMMAND cp arma3-unix-launcher ${CMAKE_CURRENT_BINARY_DIR}/arma3-unix-launcher.app/Contents/MacOS) | ||
add_custom_command (TARGET arma3-unix-launcher POST_BUILD COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/arma3-unix-launcher.app/Contents) | ||
add_custom_command (TARGET arma3-unix-launcher POST_BUILD COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/MainForm.glade ${CMAKE_CURRENT_BINARY_DIR}/arma3-unix-launcher.app/Contents/MacOS) | ||
else(APPLE) | ||
add_custom_command (TARGET arma3-unix-launcher POST_BUILD COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/MainForm.glade ${CMAKE_CURRENT_BINARY_DIR}/MainForm.glade) | ||
endif(APPLE) | ||
|
||
# Installation | ||
if(APPLE) | ||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/arma3-unix-launcher.app DESTINATION /Applications USE_SOURCE_PERMISSIONS) | ||
else(APPLE) | ||
install (TARGETS arma3-unix-launcher DESTINATION /usr/bin) | ||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.desktop DESTINATION /usr/share/applications) | ||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/MainForm.glade DESTINATION /usr/share/arma3-unix-launcher) | ||
endif(APPLE) | ||
cmake_minimum_required(VERSION 3.11) | ||
project(arma3-unix-launcher) | ||
|
||
include(cmake/external_dependencies.cmake) | ||
include(cmake/functions.cmake) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") | ||
add_libraries_to_linker(COMPILER_ID GNU | ||
LIBS stdc++fs | ||
WHEN ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 9 | ||
WARNING_MESSAGE "Applying workaround for GCC 8 and lower - linking stdc++fs") | ||
|
||
option(DEVELOPER_MODE "Enable developer checks" OFF) | ||
option(RUN_TESTS "Run tests with DocTest" OFF) | ||
|
||
if (DEVELOPER_MODE) | ||
add_definitions(-DSTATIC_TODO_ENABLED) | ||
endif () | ||
|
||
include_directories(external/static-todo) | ||
setup_argparse() | ||
setup_fmt() | ||
setup_nlohmann_json() | ||
|
||
add_subdirectory(src) | ||
|
||
if (RUN_TESTS) | ||
setup_doctest() | ||
setup_trompeloeil() | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif () | ||
|
||
include(external/use-backward-cpp.cmake) |
Oops, something went wrong.