Browse Source

Initial commit

master
David Ludwig 4 years ago
commit
bffe12462b
10 changed files with 169 additions and 0 deletions
  1. +0
    -0
      .env
  2. +74
    -0
      .gitignore
  3. +27
    -0
      Dockerfile
  4. +3
    -0
      README.md
  5. +6
    -0
      build_debug.sh
  6. +6
    -0
      build_release.sh
  7. +7
    -0
      src/application.cpp
  8. +17
    -0
      src/application.h
  9. +8
    -0
      src/main.cpp
  10. +21
    -0
      torrent-client-v2.pro

+ 0
- 0
.env View File


+ 74
- 0
.gitignore View File

@ -0,0 +1,74 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
build
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe

+ 27
- 0
Dockerfile View File

@ -0,0 +1,27 @@
FROM qt-libtorrent-alpine AS base
# Environment variables
ENV GID=1000
ENV UID=1000
# Create a group and user and chown the workdir
RUN addgroup --gid ${GID} -S app && \
adduser --uid ${UID} -S app -G app
RUN mkdir /var/autoplex && chown app:app -R /var/autoplex
USER app
WORKDIR /app
# Dev environment
FROM base AS base-dev
USER root
RUN apk add build-base boost-dev
USER app
# Build the application
FROM base-dev as builder
# Copy the compiled application
FROM base AS prod
COPY --from=builder /app/build/release /app

+ 3
- 0
README.md View File

@ -0,0 +1,3 @@
# Autoplex Torrent Client v2
A new torrent client powered by Qt and Libtorrent to provide better reliability.

+ 6
- 0
build_debug.sh View File

@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p build/debug && \
cd build/debug && \
qmake ../../torrent-client-v2.pro -spec linux-g++ CONFIG+=debug && \
make

+ 6
- 0
build_release.sh View File

@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p build/release && \
cd build/release && \
qmake ../../torrent-client-v2.pro -spec linux-g++ && \
make

+ 7
- 0
src/application.cpp View File

@ -0,0 +1,7 @@
#include "application.h"
Application::Application(int argc, char *argv[])
: QCoreApplication(argc, argv)
{
}

+ 17
- 0
src/application.h View File

@ -0,0 +1,17 @@
#ifndef APPLICATION_H
#define APPLICATION_H
#include <QCoreApplication>
#include <QObject>
class Application : public QCoreApplication
{
Q_OBJECT
public:
Application(int argc, char *argv[]);
signals:
};
#endif // APPLICATION_H

+ 8
- 0
src/main.cpp View File

@ -0,0 +1,8 @@
#include "application.h"
int main(int argc, char *argv[])
{
Application a(argc, argv);
return a.exec();
}

+ 21
- 0
torrent-client-v2.pro View File

@ -0,0 +1,21 @@
QT -= gui
QT += network
CONFIG += c++11 console
CONFIG -= app_bundle
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
src/application.cpp \
src/main.cpp
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
HEADERS += \
src/application.h

Loading…
Cancel
Save