From 1cdc57aae87f06c58ae259f7d0b66e37bcf70743 Mon Sep 17 00:00:00 2001 From: Phillip Thomas Date: Wed, 26 Dec 2018 23:36:04 +0100 Subject: [PATCH 1/6] Added VCPKG Added VCPKG with x64 buils on Windows --- dependencies.pri | 47 +++++++++++++++++++++++++++++++++++++++++++++++ olive.pro | 24 +++++------------------- setup_win64.bat | 9 +++++++++ 3 files changed, 61 insertions(+), 19 deletions(-) create mode 100644 dependencies.pri create mode 100644 setup_win64.bat diff --git a/dependencies.pri b/dependencies.pri new file mode 100644 index 000000000..a93b619a7 --- /dev/null +++ b/dependencies.pri @@ -0,0 +1,47 @@ + +win32 { + RC_FILE = icons/resources.rc + + INCLUDEPATH += $$PWD/vcpkg/installed/x64-windows/include + DEPENDPATH += $$PWD/vcpkg/installed/x64-windows/include + + win32:CONFIG(release, debug|release): LIBS += -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavcodec \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavdevice \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavfilter \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavformat \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavutil \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lswscale \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lswresample \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lpostproc \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lOpenCL \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -lopengl32 \ + -L$$PWD/vcpkg/installed/x64-windows/lib/ -llibx264 + + win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavcodec \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavdevice \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavfilter \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavformat \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavutil \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lswscale \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lswresample \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lpostproc \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lOpenCL \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lopengl32 \ + -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -llibx264 + + + + + +} + +mac { + LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample + ICON = icons/olive.icns + INCLUDEPATH = /usr/local/include +} + +unix:!mac { + CONFIG += link_pkgconfig + PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample +} diff --git a/olive.pro b/olive.pro index 650aedb28..1f17c9a7d 100644 --- a/olive.pro +++ b/olive.pro @@ -27,10 +27,11 @@ DEFINES += QT_DEPRECATED_WARNINGS # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 +include(dependencies.pri) SOURCES += \ - main.cpp \ - mainwindow.cpp \ + main.cpp \ + mainwindow.cpp \ panels/project.cpp \ panels/effectcontrols.cpp \ panels/viewer.cpp \ @@ -108,7 +109,7 @@ SOURCES += \ ui/keyframenavigator.cpp HEADERS += \ - mainwindow.h \ + mainwindow.h \ panels/project.h \ panels/effectcontrols.h \ panels/viewer.h \ @@ -188,7 +189,7 @@ HEADERS += \ ui/keyframenavigator.h FORMS += \ - mainwindow.ui \ + mainwindow.ui \ panels/effectcontrols.ui \ panels/viewer.ui \ panels/timeline.ui \ @@ -198,21 +199,6 @@ FORMS += \ dialogs/preferencesdialog.ui \ dialogs/demonotice.ui -win32 { - RC_FILE = icons/resources.rc - LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 -} - -mac { - LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample - ICON = icons/olive.icns - INCLUDEPATH = /usr/local/include -} - -unix:!mac { - CONFIG += link_pkgconfig - PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample -} RESOURCES += \ icons/icons.qrc diff --git a/setup_win64.bat b/setup_win64.bat new file mode 100644 index 000000000..638e6a2a4 --- /dev/null +++ b/setup_win64.bat @@ -0,0 +1,9 @@ +@echo off + +if not exist vcpkg ( + git clone https://github.com/Microsoft/vcpkg.git + + cd vcpkg + call .\bootstrap-vcpkg.bat + cmd /K vcpkg install ffmpeg[x264,opencl] --triplet x64-windows +) \ No newline at end of file From 3fbba90ad1d294407f199a0a76c4a8cccc5e2e51 Mon Sep 17 00:00:00 2001 From: Phillip Thomas Date: Wed, 26 Dec 2018 23:36:43 +0100 Subject: [PATCH 2/6] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0c3654b81..e897843cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pro.user* Makefile .qmake.stash +vcpkg \ No newline at end of file From e16fc35253a335f23d5b783f497b1bdddc06e151 Mon Sep 17 00:00:00 2001 From: Peter Eszlari Date: Thu, 27 Dec 2018 08:37:17 +0100 Subject: [PATCH 3/6] support make install for Linux --- olive.pro | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/olive.pro b/olive.pro index 650aedb28..79b08f99f 100644 --- a/olive.pro +++ b/olive.pro @@ -217,6 +217,17 @@ unix:!mac { RESOURCES += \ icons/icons.qrc +unix:!mac:isEmpty(PREFIX) { + PREFIX = /usr/local +} + +unix:!mac:target.path = $$PREFIX/bin + +effects.files = $$PWD/effects/*.frag $$PWD/effects/*.xml $$PWD/effects/*.vert +unix:!mac:effects.path = $$PREFIX/share/olive-editor/effects + +INSTALLS += target effects + unix:!mac { metainfo.files = $$PWD/packaging/linux/org.olivevideoeditor.Olive.appdata.xml metainfo.path = $$PREFIX/share/metainfo From 06137cb860f15d680b25b4d21f6f13fcdf981b3b Mon Sep 17 00:00:00 2001 From: Phillip Thomas Date: Thu, 27 Dec 2018 12:25:32 +0100 Subject: [PATCH 4/6] Refactoring names of ui components Changed names of ui componentes in effectcontrols --- panels/effectcontrols.cpp | 14 +++++++------- panels/effectcontrols.h | 11 ++++++----- panels/effectcontrols.ui | 22 +++++++++++----------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/panels/effectcontrols.cpp b/panels/effectcontrols.cpp index 4809aa482..eb5a4e20a 100644 --- a/panels/effectcontrols.cpp +++ b/panels/effectcontrols.cpp @@ -40,7 +40,7 @@ EffectControls::EffectControls(QWidget *parent) : ui->effects_area->header = ui->headers; ui->keyframeView->header = ui->headers; - ui->label_2->setVisible(false); + ui->lblMultipleClipsSelected->setVisible(false); connect(ui->horizontalScrollBar, SIGNAL(valueChanged(int)), ui->headers, SLOT(set_scroll(int))); connect(ui->horizontalScrollBar, SIGNAL(resize_move(double)), ui->keyframeView, SLOT(resize_move(double))); @@ -215,7 +215,7 @@ void EffectControls::clear_effects(bool clear_cache) { item->widget()->setParent(NULL); disconnect(static_cast(item->widget()), SIGNAL(deselect_others(QWidget*)), this, SLOT(deselect_all_effects(QWidget*))); } - ui->label_2->setVisible(false); + ui->lblMultipleClipsSelected->setVisible(false); ui->vcontainer->setVisible(false); ui->acontainer->setVisible(false); ui->headers->setVisible(false); @@ -243,7 +243,7 @@ void EffectControls::open_effect(QVBoxLayout* layout, Effect* e) { } void EffectControls::load_effects() { - ui->label_2->setVisible(multiple); + ui->lblMultipleClipsSelected->setVisible(multiple); if (!multiple) { // load in new clips @@ -315,19 +315,19 @@ void EffectControls::set_clips(QVector& clips, int m) { load_effects(); } -void EffectControls::on_add_video_effect_button_clicked() { +void EffectControls::on_btnAddVideoEffect_clicked() { show_effect_menu(EFFECT_TYPE_EFFECT, EFFECT_TYPE_VIDEO); } -void EffectControls::on_add_audio_effect_button_clicked() { +void EffectControls::on_btnAddAudioEffect_clicked() { show_effect_menu(EFFECT_TYPE_EFFECT, EFFECT_TYPE_AUDIO); } -void EffectControls::on_add_video_transition_button_clicked() { +void EffectControls::on_btnAddVideoTransition_clicked() { show_effect_menu(EFFECT_TYPE_TRANSITION, EFFECT_TYPE_VIDEO); } -void EffectControls::on_add_audio_transition_button_clicked() { +void EffectControls::on_btnAddAudioTransition_clicked() { show_effect_menu(EFFECT_TYPE_TRANSITION, EFFECT_TYPE_AUDIO); } diff --git a/panels/effectcontrols.h b/panels/effectcontrols.h index 6e2bdb807..68d3e6861 100644 --- a/panels/effectcontrols.h +++ b/panels/effectcontrols.h @@ -52,12 +52,13 @@ public slots: void update_keyframes(); private slots: void menu_select(QAction* q); - void on_add_video_effect_button_clicked(); - void on_add_audio_effect_button_clicked(); - void deselect_all_effects(QWidget*); - void on_add_video_transition_button_clicked(); - void on_add_audio_transition_button_clicked(); + void on_btnAddVideoEffect_clicked(); + void on_btnAddAudioEffect_clicked(); + void on_btnAddVideoTransition_clicked(); + void on_btnAddAudioTransition_clicked(); + + void deselect_all_effects(QWidget*); protected: void resizeEvent(QResizeEvent *event); private: diff --git a/panels/effectcontrols.ui b/panels/effectcontrols.ui index 587946d5a..934fc26ef 100644 --- a/panels/effectcontrols.ui +++ b/panels/effectcontrols.ui @@ -151,7 +151,7 @@ 0 - + Add Video Effect @@ -166,7 +166,7 @@ - + Qt::Horizontal @@ -179,7 +179,7 @@ - + 0 @@ -200,7 +200,7 @@ - + Qt::Horizontal @@ -213,7 +213,7 @@ - + Add Video Transition @@ -296,7 +296,7 @@ 0 - + Add Audio Effect @@ -311,7 +311,7 @@ - + Qt::Horizontal @@ -324,7 +324,7 @@ - + 0 @@ -345,7 +345,7 @@ - + Qt::Horizontal @@ -358,7 +358,7 @@ - + Add Audio Transition @@ -400,7 +400,7 @@ - + (Multiple clips selected) From 230fc5a135b8ef9de49cb77d777359b4b697eae0 Mon Sep 17 00:00:00 2001 From: Phillip Thomas Date: Thu, 27 Dec 2018 12:27:39 +0100 Subject: [PATCH 5/6] Deleted files --- dependencies.pri | 47 ----------------------------------------------- olive.pro | 26 ++++++++++++++++++++------ setup_win64.bat | 9 --------- 3 files changed, 20 insertions(+), 62 deletions(-) delete mode 100644 dependencies.pri delete mode 100644 setup_win64.bat diff --git a/dependencies.pri b/dependencies.pri deleted file mode 100644 index a93b619a7..000000000 --- a/dependencies.pri +++ /dev/null @@ -1,47 +0,0 @@ - -win32 { - RC_FILE = icons/resources.rc - - INCLUDEPATH += $$PWD/vcpkg/installed/x64-windows/include - DEPENDPATH += $$PWD/vcpkg/installed/x64-windows/include - - win32:CONFIG(release, debug|release): LIBS += -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavcodec \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavdevice \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavfilter \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavformat \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lavutil \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lswscale \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lswresample \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lpostproc \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lOpenCL \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -lopengl32 \ - -L$$PWD/vcpkg/installed/x64-windows/lib/ -llibx264 - - win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavcodec \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavdevice \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavfilter \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavformat \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lavutil \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lswscale \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lswresample \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lpostproc \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lOpenCL \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -lopengl32 \ - -L$$PWD/vcpkg/installed/x64-windows/debug/lib/ -llibx264 - - - - - -} - -mac { - LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample - ICON = icons/olive.icns - INCLUDEPATH = /usr/local/include -} - -unix:!mac { - CONFIG += link_pkgconfig - PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample -} diff --git a/olive.pro b/olive.pro index 1f17c9a7d..820d249bd 100644 --- a/olive.pro +++ b/olive.pro @@ -27,11 +27,10 @@ DEFINES += QT_DEPRECATED_WARNINGS # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 -include(dependencies.pri) SOURCES += \ - main.cpp \ - mainwindow.cpp \ + main.cpp \ + mainwindow.cpp \ panels/project.cpp \ panels/effectcontrols.cpp \ panels/viewer.cpp \ @@ -109,7 +108,7 @@ SOURCES += \ ui/keyframenavigator.cpp HEADERS += \ - mainwindow.h \ + mainwindow.h \ panels/project.h \ panels/effectcontrols.h \ panels/viewer.h \ @@ -189,7 +188,7 @@ HEADERS += \ ui/keyframenavigator.h FORMS += \ - mainwindow.ui \ + mainwindow.ui \ panels/effectcontrols.ui \ panels/viewer.ui \ panels/timeline.ui \ @@ -199,6 +198,21 @@ FORMS += \ dialogs/preferencesdialog.ui \ dialogs/demonotice.ui +win32 { + RC_FILE = icons/resources.rc + LIBS += -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample -lopengl32 +} + +mac { + LIBS += -L/usr/local/lib -lavutil -lavformat -lavcodec -lavfilter -lswscale -lswresample + ICON = icons/olive.icns + INCLUDEPATH = /usr/local/include +} + +unix:!mac { + CONFIG += link_pkgconfig + PKGCONFIG += libavutil libavformat libavcodec libavfilter libswscale libswresample +} RESOURCES += \ icons/icons.qrc @@ -227,4 +241,4 @@ unix:!mac { icon1024.files = $$PWD/packaging/linux/icons/1024x1024/org.olivevideoeditor.Olive.png icon1024.path = $$PREFIX/share/icons/hicolor/1024x1024/apps INSTALLS += metainfo desktop mime icon16 icon32 icon48 icon64 icon128 icon256 icon512 icon1024 -} +} \ No newline at end of file diff --git a/setup_win64.bat b/setup_win64.bat deleted file mode 100644 index 638e6a2a4..000000000 --- a/setup_win64.bat +++ /dev/null @@ -1,9 +0,0 @@ -@echo off - -if not exist vcpkg ( - git clone https://github.com/Microsoft/vcpkg.git - - cd vcpkg - call .\bootstrap-vcpkg.bat - cmd /K vcpkg install ffmpeg[x264,opencl] --triplet x64-windows -) \ No newline at end of file From a3b458729d534d588c2ca70832bc26d6871e7ad3 Mon Sep 17 00:00:00 2001 From: Cambloid Date: Thu, 27 Dec 2018 12:34:54 +0100 Subject: [PATCH 6/6] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index e897843cc..0c3654b81 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *.pro.user* Makefile .qmake.stash -vcpkg \ No newline at end of file