Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Apr 20, 2024
1 parent 7568677 commit 47b43ef
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 176 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on: [push, pull_request]

jobs:
mac:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Setup Qt
run: curl -L https://github.com/rodlie/NatronPluginManager/releases/download/continuous/qtbase-5.15-static-macos.tar.bz2 --output qt.tar.bz2 && sudo tar xf qt.tar.bz2 -C /opt
- name: Setup libzip
run: curl -L https://github.com/rodlie/NatronPluginManager/releases/download/continuous/libzip-HighSierra.tar.gz --output libzip.tar.gz && sudo tar xf libzip.tar.gz -C /opt
- name: Setup local
run: sudo mkdir -p /opt/local/lib && sudo cp -a /opt/libzip/lib/* /opt/local/lib/
- name: Build
run: CMAKE=cmake sh share/macos.sh
- name: Artifact
run: sudo cp -a build/NatronPluginManager.dmg /opt/
- uses: actions/upload-artifact@v2
with:
name: NatronPluginManager-${{github.sha}}-macOS-Intel
path: /opt/NatronPluginManager.dmg
windows:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup
run: sudo mkdir -p /opt/mxe-NatronPluginManager && sudo chmod 777 /opt/mxe-NatronPluginManager
- name: Setup SDK
run: wget https://github.com/rodlie/NatronPluginManager/releases/download/continuous/mxe-NatronPluginManager-20211230.tar.xz && tar xvf mxe-NatronPluginManager-20211230.tar.xz -C /opt/mxe-NatronPluginManager/
- name: Build
run: bash share/mingw.sh
- name: Artifact
run: sudo cp -a build/NatronPluginManager.exe /opt/
- uses: actions/upload-artifact@v2
with:
name: NatronPluginManager-${{github.sha}}-Windows-x64
path: /opt/NatronPluginManager.exe
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: apt install
run: sudo apt-get update && sudo apt-get install cmake qtbase5-dev libzip-dev
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
21 changes: 0 additions & 21 deletions .github/workflows/cmake.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/macos.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/mingw.yml

This file was deleted.

40 changes: 14 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,17 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "NatronPluginManager")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/rodlie/NatronPluginManager")
#set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
set(CPACK_DEBIAN_FILE_NAME "${PROJECT_NAME}.deb")

set(COMPANY "Natron")
set(COPYRIGHT "Copyright (c) Ole-Andre Rodlie")
set(IDENTIFIER "org.natronvfx.plugins")

option(USE_PKGCONF "Use pkg-config" ON)

add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00)
add_definitions(-DQT_DEPRECATED_WARNINGS)
add_definitions(-DAPP_NAME="${PROJECT_NAME}")
add_definitions(-DAPP_VERSION="${PROJECT_VERSION}")
add_definitions(-DAPP_ORG="Natron")
add_definitions(-DAPP_DOMAIN="natronvfx.org")
add_definitions(-DAPP_URL="https://plugins.natronvfx.org")

add_compile_options(-Wall -Wextra)
if(CMAKE_BUILD_TYPE MATCHES "^(release|Release|RELEASE)$")
Expand All @@ -59,7 +47,7 @@ else()
endif()

find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.10 COMPONENTS Concurrent Network Widgets REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} 5.14 COMPONENTS Concurrent Network Widgets REQUIRED)

if(${USE_PKGCONF})
find_package(PkgConfig REQUIRED)
Expand Down Expand Up @@ -125,20 +113,19 @@ set(SRC
share/assets.qrc
)

add_executable(${PROJECT_NAME}
${ICON_FILE}
${WINDOWS_ICON_FILE}
${WINDOWS_RESOURCE_FILE}
${SRC}
)

if(APPLE)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE)
endif()

if(WIN32)
add_executable(${PROJECT_NAME}
WIN32
${WINDOWS_ICON_FILE}
${WINDOWS_RESOURCE_FILE}
${SRC}
)
elseif(APPLE)
add_executable(${PROJECT_NAME}
MACOSX_BUNDLE
${ICON_FILE}
${SRC})
else()
add_executable(${PROJECT_NAME} ${SRC})
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE)
endif()

target_link_libraries(${PROJECT_NAME}
Expand All @@ -165,6 +152,7 @@ if(UNIX AND NOT APPLE)
install(FILES
LICENSE
README.md
docs/repo.md
DESTINATION
${CMAKE_INSTALL_DOCDIR}-${PROJECT_VERSION}
)
Expand Down
29 changes: 9 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,23 @@

A plug-in manager for [Natron](https://github.com/NatronGitHub/Natron).

![screenshot](docs/screenshot-plugins.png)
![screenshot](docs/screenshot-plugin.png)

<p align="center">
<a href="https://github.com/rodlie/NatronPluginManager/releases/latest" target="_blank"><img src="docs/download.png"></a>
</p>
![screenshot of available plug-ins](docs/screenshot-plugins.png)
![screenshot of plug-in page](docs/screenshot-plugin.png)

## Build

This application requires CMake 3.5+, Qt 5.10+ (Concurrent/Network/Widgets) and libzip to build.

***Note**: Qt 5.14+ is required for markdown support, recommended.*
This application requires Qt 5.14+ *(Concurrent/Network/Widgets)* and libzip.

```
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. && make
git clone https://github.com/rodlie/NatronPluginManager
cd NatronPluginManager
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
make
```

## Documentation

* [Natron Plug-in Repository Standard v1.0](docs/repo.md)

## License

Copyright Ole-André Rodlie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>
7 changes: 0 additions & 7 deletions share/mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,3 @@ $TOOL-cmake -DCMAKE_BUILD_TYPE=Release ..
make

$TOOL-strip -s NatronPluginManager.exe

mkdir -p NatronPluginManager/third-party
cp $CWD/LICENSE NatronPluginManager/
cp $CWD/README.md NatronPluginManager/
cp -a $MXE/licenses/* NatronPluginManager/third-party/
mv NatronPluginManager.exe NatronPluginManager/
zip -9 -r NatronPluginManager.zip NatronPluginManager
12 changes: 6 additions & 6 deletions src/addrepodialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ AddRepoDialog::AddRepoDialog(QWidget *parent,
setObjectName("AddRepoDialog");
setWindowTitle(tr("Add repository"));

QVBoxLayout *mainLayout = new QVBoxLayout(this);
const auto mainLayout = new QVBoxLayout(this);

QWidget *urlEditWidget = new QWidget(this);
QHBoxLayout *urlEditLayout = new QHBoxLayout(urlEditWidget);
const auto urlEditWidget = new QWidget(this);
const auto urlEditLayout = new QHBoxLayout(urlEditWidget);

QLabel *urlEditLabel = new QLabel(tr("Manifest URL"), this);
const auto urlEditLabel = new QLabel(tr("Manifest URL"), this);
_urlEdit = new QLineEdit(this);
_urlEdit->setPlaceholderText("https://");

urlEditLayout->addWidget(urlEditLabel);
urlEditLayout->addWidget(_urlEdit);

QWidget *buttonsWidget = new QWidget(this);
QHBoxLayout *buttonsLayout = new QHBoxLayout(buttonsWidget);
const auto buttonsWidget = new QWidget(this);
const auto buttonsLayout = new QHBoxLayout(buttonsWidget);

_applyButton = new QPushButton(tr("Add"), this);
_applyButton->setProperty("InstallButton", true);
Expand Down
38 changes: 19 additions & 19 deletions src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,27 @@ NatronPluginManager::NatronPluginManager(QWidget *parent)
setupPluginList();
setupStatus();

QWidget *mainWidget = new QWidget(this);
const auto mainWidget = new QWidget(this);
mainWidget->setObjectName("MainWidget");
mainWidget->setContentsMargins(0, 0, 0, 0);
QHBoxLayout *mainLayout = new QHBoxLayout(mainWidget);
const auto mainLayout = new QHBoxLayout(mainWidget);
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->setSpacing(0);

setCentralWidget(mainWidget);

QWidget *pluginsWidget = new QWidget(this);
const auto pluginsWidget = new QWidget(this);
pluginsWidget->setObjectName("PluginsWidget");
QVBoxLayout *pluginsWidgetLayout = new QVBoxLayout(pluginsWidget);
const auto pluginsWidgetLayout = new QVBoxLayout(pluginsWidget);

QWidget *pluginsComboWidget = new QWidget(this);
const auto pluginsComboWidget = new QWidget(this);
pluginsComboWidget->setObjectName("PluginsComboWidget");
QHBoxLayout *pluginsComboWidgetLayout = new QHBoxLayout(pluginsComboWidget);
const auto pluginsComboWidgetLayout = new QHBoxLayout(pluginsComboWidget);

QLabel *comboStatusLabel = new QLabel(tr("Status"), this);
const auto comboStatusLabel = new QLabel(tr("Status"), this);
comboStatusLabel->setObjectName("ComboStatusLabel");

QLabel *comboGroupLabel = new QLabel(tr("Groups"), this);
const auto comboGroupLabel = new QLabel(tr("Groups"), this);
comboGroupLabel->setObjectName("ComboGroupLabel");

pluginsComboWidgetLayout->addWidget(comboStatusLabel);
Expand Down Expand Up @@ -280,10 +280,10 @@ void NatronPluginManager::setupMenu()
_menuBar->setObjectName("MenuBar");
setMenuWidget(_menuBar);

QMenu *fileMenu = new QMenu(tr("File"), this);
const auto fileMenu = new QMenu(tr("File"), this);
_menuBar->addMenu(fileMenu);

QAction *addRepoAction = new QAction(tr("Add repository"), this);
const auto addRepoAction = new QAction(tr("Add repository"), this);
addRepoAction->setShortcut(QKeySequence(tr("Ctrl+A")));
fileMenu->addAction(addRepoAction);
connect(addRepoAction,
Expand All @@ -293,7 +293,7 @@ void NatronPluginManager::setupMenu()

fileMenu->addSeparator();

QAction *settingsAction = new QAction(tr("Settings"), this);
const auto settingsAction = new QAction(tr("Settings"), this);
settingsAction->setShortcut(QKeySequence(tr("Ctrl+S")));
fileMenu->addAction(settingsAction);
connect(settingsAction,
Expand All @@ -303,25 +303,25 @@ void NatronPluginManager::setupMenu()

fileMenu->addSeparator();

QAction *fileQuitAction = new QAction(tr("Quit"), this);
const auto fileQuitAction = new QAction(tr("Quit"), this);
fileQuitAction->setShortcut(QKeySequence(tr("Ctrl+Q")));
fileMenu->addAction(fileQuitAction);
connect(fileQuitAction,
SIGNAL(triggered()),
this,
SLOT(close()));

QMenu *helpMenu = new QMenu(tr("Help"), this);
const auto helpMenu = new QMenu(tr("Help"), this);
_menuBar->addMenu(helpMenu);

QAction *helpAboutAction = new QAction(tr("About"), this);
const auto helpAboutAction = new QAction(tr("About"), this);
helpMenu->addAction(helpAboutAction);
connect(helpAboutAction,
SIGNAL(triggered()),
this,
SLOT(handleAboutActionTriggered()));

QAction *helpAboutQtAction = new QAction(tr("About Qt"), this);
const auto helpAboutQtAction = new QAction(tr("About Qt"), this);
helpMenu->addAction(helpAboutQtAction);
connect(helpAboutQtAction,
SIGNAL(triggered()),
Expand Down Expand Up @@ -415,19 +415,19 @@ void NatronPluginManager::setupStatus()
_cacheLabel = new QLabel(this);
_cacheLabel->setText("0");

QLabel *statusAvailableLabel = new QLabel(this);
const auto statusAvailableLabel = new QLabel(this);
statusAvailableLabel->setObjectName("StatusAvailableLabel");
statusAvailableLabel->setText(tr("Available"));

QLabel *statusInstalledLabel = new QLabel(this);
const auto statusInstalledLabel = new QLabel(this);
statusInstalledLabel->setObjectName("StatusInstalledLabel");
statusInstalledLabel->setText(tr("Installed"));

QLabel *statusCacheLabel = new QLabel(this);
const auto statusCacheLabel = new QLabel(this);
statusCacheLabel->setObjectName("StatusCacheLabel");
statusCacheLabel->setText(tr("Cache"));

QLabel *statusUpdatesLabel = new QLabel(this);
const auto statusUpdatesLabel = new QLabel(this);
statusUpdatesLabel->setObjectName("StatusUpdatesLabel");
statusUpdatesLabel->setText(tr("Updates"));

Expand Down
Loading

0 comments on commit 47b43ef

Please sign in to comment.