Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Jylhis committed Apr 30, 2018
0 parents commit ce65cce
Showing 20 changed files with 2,499 additions and 0 deletions.
115 changes: 115 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
*.pdf
mxe/

build/
# Created by https://www.gitignore.io/api/qt,c++,linux,qtcreator

### C++ ###
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Qt ###
# C++ objects and libs


# Qt-es

/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
Makefile*
*build-*

# QtCreator

*.autosave

# QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCtreator CMake
CMakeLists.txt.user*


### QtCreator ###
# gitignore for Qt Creator like IDE for pure C/C++ project without Qt
#
# Reference: http://doc.qt.io/qtcreator/creator-project-generic.html



# Qt Creator autogenerated files


# A listing of all the files included in the project
*.files

# Include directories
*.includes

# Project configuration settings like predefined Macros
*.config

# Qt Creator settings
*.creator

# User project settings
*.creator.user*

# Qt Creator backups

# End of https://www.gitignore.io/api/qt,c++,linux,qtcreator
73 changes: 73 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
image: theshadowx/qt5

stages:
- build
- deploy

linux:
stage: build
# instead of calling g++ directly you can also use some build toolkit like make
# install the necessary build tools when needed
# before_script:
# - apt update && apt -y install make autoconf
script:
- qmake -config release
- make
- ls
artifacts:
paths:
- Lappbill
cache:
paths:
- "*.o"
- "moc_*.*"
- "ui_*.h"

windowsBuild:
stage: build
# instead of calling g++ directly you can also use some build toolkit like make
# install the necessary build tools when needed
# before_script:
# - apt update && apt -y install make autoconf
script:
- ./cross-compile-to-windows.sh
artifacts:
paths:
- ./release/
cache:
paths:
- "*.o"
- "moc_*.*"
- "ui_*.h"
- "mxe/"

# run tests using the binary built before
#test:
# stage: test
# script:
# - echo "None"

ubuntu:
stage: deploy
before_script:
- apt update && apt -y install dh-make
script:
- cd ..
- mv Lappbill lappbill-$CI_COMMIT_TAG
- cd lappbill-$CI_COMMIT_TAG
- qmake -config release
- dh_make -s -e [email protected] --createorig -y
- dpkg-buildpackage
- ls
only:
- tags

windows:
stage: deploy
image: msrd0/win-cross-qt5
script:
- i686-w64-mingw32-qmake-qt5 -config release
- make
- ls
only:
- tags
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
sudo: required
language: cpp

compiler:
- clang

os:
- osx
- linux

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository --yes ppa:beineri/opt-qt594-trusty; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install qt59-meta-full g++; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then QT_ENV_SCRIPT=$(find /opt -name 'qt*-env.sh'); fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source $QT_ENV_SCRIPT; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install [email protected]; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="$(brew --prefix [email protected])/bin:$PATH"; fi

script:
- mkdir build
- cd build
- qmake ../Lappbill.pro -config release
- make

#deploy:
# skip_cleanup: true
# file_glob: true
# provider: releases
# api_key:
# secure: qtq8gV+G5BkA4GhlGLquifv0UIV8lxiF/RpL/olQKLFg6PB/sju5p2+8K3oQm2FYhUsNPQrWwxvdDsZ3Q9BdPmlljZu2zDnt/m5IXN0kVeYOM8i+c0Ud8S91xPacTwAm3ugcY3J64POM/aDs91Jt4Ti8mjHmfdUJxcMIDioox+Zb2bXyiwOxqJXsKi9Vn1Z56Ibyg/eQU3gD0Uv603YpE+5FVMNlE7qB0Ts31sv5wb5u6Fs7J/qruYgT6y9pJjKKFZX7x7PlSwOiKwCzVbrC/7HUUIyd8fhvA39k3F459K0ix5LL79CwyMACDIkaZU36O6o/Od1BekTv7C8BcBZIZu2lyHeZfuRZR7p0z1ufk8CJUKm/XZtNRIckhem5VFnM7lLq93TxuA2oDOhqQTqpHwP4WStPqERGxEfHrOkl2yyRaYiLgOtFKjyIfm7MCELkc4uZ7AoUsE9nmzOAReOYatIH3tdbChoh+itcGy4HZ2SnwEmqwe8d90rU5ui6/DFrDp8n2jMLYq83SsqO+Jo2VR3YDg5WrkzMLhH7zfHGTLcTjtJyyaXItaVBiZ9jcrCIxuli8+jz8hbGdtXzXoJt+B6QzHoIYIpIh/bmsZpqZwTvwVdGd7xJtM4GOG3OMp9tDloD952uT5Mr/UvmCbubY9skXKG+y7qMF/7BNEfsl+I=
# file: build/*
# on:
# repo: Jylhis/Lappbill
# branch: master
# tags: true
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BSD 2-Clause License

Copyright (c) 2018, Markus Jylhänkangas
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 changes: 39 additions & 0 deletions Lappbill.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#-------------------------------------------------
#
# Project created by QtCreator 2017-07-19T18:13:17
#
#-------------------------------------------------

QT += core gui # KConfigCore KConfigGui KI18n webengine webenginewidgets printsupport

INCLUDEPATH += $$PWD/libharu/include
DEPENDPATH += $$PWD/libharu/include

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11
#QMAKE_CXXFLAGS += -std=c++11

TARGET = Lappbill
TEMPLATE = app


SOURCES += main.cpp\
mainwindow.cpp \
database.cpp \
settingsdialog.cpp

HEADERS += \
database.hpp \
mainwindow.hpp \
invoicetemplate.hpp \
settingsdialog.hpp

FORMS += mainwindow.ui \
settingsdialog.ui

DISTFILES += \
invoice.html \
invoice.css \
new.html \
README.md
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Lappbill [![Build Status](https://travis-ci.com/Jylhis/Lappbill.svg?token=WMq8GV2SFxTMEmE7xpWe&branch=master)](https://travis-ci.com/Jylhis/Lappbill)
Lisenssi: [BSD-2-Clause](LICENSE)

Simppeli ohjelma tilisiirtolomakkeiden tekemiseen.
![Screenshot](screenshots/mainwindow.png)


# Käyttöohje
Ohjelman ensimmäisen kerran käynistyessä aukeaa asetusikkuna joka pitää täyttää.
Muista myös valita tallennus kansio minne tehdyt laskut tallentuvat.

![settings](screenshots/settings.png)

57 changes: 57 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y qtdeclarative5-dev
SHELL
end
28 changes: 28 additions & 0 deletions cross-compile-to-windows.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# https://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target

# Tässä kestää kauan

apt-get install \
autoconf automake autopoint bash bison bzip2 flex gettext\
git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \
libtool-bin libltdl-dev libssl-dev libxml-parser-perl make \
openssl p7zip-full patch perl pkg-config python ruby scons \
sed unzip wget xz-utils g++-multilib libc6-dev-i386 git

if [! -d mxe]; then
git clone https://github.com/mxe/mxe.git
fi

cd mxe && make qt5

$MXEROOT = $PWD

cd ..
export PATH=$MXEROOT/usr/bin:$PATH
export PATH=$MXEROOT/usr/i686-w64-mingw32.static/qt5/bin:$PATH

mxe/usr/i686-pc-mingw32.static/qt5/bin/qmake && make

# file in ./relese/ folder

export PATH=/home/markus/Documents/Lappbill/mxe/usr/i686-w64-mingw32.static/bin/
Loading
Oops, something went wrong.

0 comments on commit ce65cce

Please sign in to comment.