Skip to content
Open
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ea5fe49
Add automatic download and installation for PAGViewer
YyZz-wy Jul 23, 2025
2a834cf
codeformat
YyZz-wy Jul 23, 2025
6929fb0
Update code based on review comments
YyZz-wy Jul 25, 2025
ce750e2
Update code based on review comments
YyZz-wy Jul 28, 2025
1287b4e
Resolve comment
YyZz-wy Aug 4, 2025
c87d96d
fix function name
YyZz-wy Aug 5, 2025
44b6157
merge main
YyZz-wy Aug 15, 2025
49908d3
Add plugin installer functionality and related scripts for managing Q…
YyZz-wy Aug 19, 2025
02dcaf8
Add plugin installer functionality and related scripts for managing Q…
YyZz-wy Aug 19, 2025
56cbc37
Add plugin installer functionality and related scripts for managing Q…
YyZz-wy Aug 20, 2025
c0c5b29
Add plugin installer functionality and related scripts for managing Q…
YyZz-wy Aug 20, 2025
6478202
Enhance PluginInstaller to check Windows Registry for Adobe After Eff…
YyZz-wy Aug 20, 2025
73cc4bd
Refactor PluginInstaller by removing redundant comments and improving…
YyZz-wy Aug 21, 2025
ff29a97
Merge remote-tracking branch 'origin/main' into feature/codywwang_ins…
YyZz-wy Sep 25, 2025
678ab29
Add year range configuration and special version detection for Adobe …
YyZz-wy Sep 25, 2025
785b9e8
Add year range configuration and special version detection for Adobe …
YyZz-wy Sep 25, 2025
193d0fb
Disable test builds and improve version configuration in CMake
YyZz-wy Sep 26, 2025
4c95acd
Refactor PluginInstaller by removing redundant debug logs and improvi…
YyZz-wy Sep 26, 2025
96a63b3
Refactor PluginInstaller by removing redundant debug logs and improvi…
YyZz-wy Sep 26, 2025
61c0deb
Revert commits 96a63b30 and 4c95acd4
YyZz-wy Sep 26, 2025
de811a9
Refactor PluginInstaller by removing redundant debug logs and improvi…
YyZz-wy Sep 26, 2025
9942c56
codeformat
YyZz-wy Sep 28, 2025
27ecda6
codeformat
YyZz-wy Sep 28, 2025
9244c7b
Merge remote-tracking branch 'origin/main' into feature/codywwang_ins…
YyZz-wy Sep 28, 2025
c5576b2
fix the comment and codeformat
YyZz-wy Sep 28, 2025
9064693
merge main
YyZz-wy Sep 30, 2025
ec47821
codeformat
YyZz-wy Oct 9, 2025
f587511
codeformat
YyZz-wy Oct 11, 2025
4d31922
merge main
YyZz-wy Oct 15, 2025
e6cf642
merge main
YyZz-wy Oct 15, 2025
f406ee4
merge main
YyZz-wy Oct 20, 2025
06dc187
merge main
YyZz-wy Oct 20, 2025
1d73165
merge main
YyZz-wy Oct 20, 2025
a07e479
Refactor plugin installation methods for clarity and consistency
YyZz-wy Oct 22, 2025
c709a8e
Add scripts for managing Qt resources in Adobe plugins
YyZz-wy Dec 2, 2025
3307583
merge main
YyZz-wy Dec 2, 2025
3fbe7ea
Enhance Qt resource management in installer scripts and improve logging
YyZz-wy Dec 2, 2025
83ad702
Implement H264EncoderTools installation with retry logic and enhance …
YyZz-wy Dec 2, 2025
5097caa
merge main
YyZz-wy Dec 2, 2025
83e5762
codeformat
YyZz-wy Dec 2, 2025
be44716
fix error
YyZz-wy Dec 2, 2025
bf6a16d
merge main
YyZz-wy Dec 3, 2025
c35e14e
code format
YyZz-wy Dec 3, 2025
9d05241
merge main
YyZz-wy Dec 3, 2025
0606e8e
fix windows error
YyZz-wy Dec 3, 2025
3934dff
Enhance PluginInstaller with improved path handling and resource mana…
YyZz-wy Dec 3, 2025
e917bfe
merge main
YyZz-wy Dec 3, 2025
57d327d
Refactor PluginInstaller to improve resource handling and exclude spe…
YyZz-wy Dec 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ else ()
set(UpdateChannel "beta")
endif ()
configure_file(${CMAKE_SOURCE_DIR}/package/templates/version.h.in
${CMAKE_SOURCE_DIR}/src/version.h
@ONLY
${CMAKE_SOURCE_DIR}/src/version.h
@ONLY
)

message(STATUS "Build Version: ${MajorVersion}.${MinorVersion}.${BuildNumber}")
Expand Down Expand Up @@ -121,13 +121,15 @@ endif ()
set(PAG_USE_QT ON)
set(PAG_USE_RTTR ON)
set(PAG_USE_LIBAVC OFF)
set(PAG_BUILD_TESTS OFF)
set(PAG_BUILD_SHARED OFF)
set(PAG_BUILD_FRAMEWORK OFF)

set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
list(APPEND PAG_OPTIONS "-DPAG_USE_QT=${PAG_USE_QT}")
list(APPEND PAG_OPTIONS "-DPAG_USE_RTTR=${PAG_USE_RTTR}")
list(APPEND PAG_OPTIONS "-DPAG_USE_LIBAVC=${PAG_USE_LIBAVC}")
list(APPEND PAG_OPTIONS "-DPAG_BUILD_TESTS=${PAG_BUILD_TESTS}")
list(APPEND PAG_OPTIONS "-DPAG_BUILD_SHARED=${PAG_BUILD_SHARED}")
list(APPEND PAG_OPTIONS "-DPAG_BUILD_FRAMEWORK=${PAG_BUILD_FRAMEWORK}")
list(APPEND PAG_OPTIONS "-DCMAKE_PREFIX_PATH=\"${CMAKE_PREFIX_PATH}\"")
Expand Down
11 changes: 11 additions & 0 deletions viewer/assets/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ PAGWindow {
objectName: "taskFactory"
}

PluginInstallerModel {
id: pluginInstaller
objectName: "pluginInstaller"
}

FileDialog {
id: openFileDialog

Expand Down Expand Up @@ -494,6 +499,12 @@ PAGWindow {
case "open-commerce-page":
Qt.openUrlExternally("https://pag.io/product.html#pag-enterprise-edition");
break;
case "install-plugin":
pluginInstaller.installPlugins(true);
break;
case "uninstall-plugin":
pluginInstaller.uninstallPlugins();
break;
case "minimize-window":
viewWindow.showMinimized();
break;
Expand Down
28 changes: 28 additions & 0 deletions viewer/assets/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,18 @@ Item {
root.command("open-commerce-page");
}
}
Action {
text: qsTr("Install Plugin")
onTriggered: {
root.command("install-plugin");
}
}
Action {
text: qsTr("Uninstall Plugin")
onTriggered: {
root.command("uninstall-plugin");
}
}
}
}
}
Expand Down Expand Up @@ -216,6 +228,22 @@ Item {
root.command("check-for-updates");
}
}
Platform.MenuItem {
visible: windowActive
text: qsTr("Install Plugin")
role: "ApplicationSpecificRole"
onTriggered: {
root.command("install-plugin");
}
}
Platform.MenuItem {
visible: windowActive
text: qsTr("Uninstall Plugin")
role: "ApplicationSpecificRole"
onTriggered: {
root.command("uninstall-plugin");
}
}
Platform.MenuItem {
visible: windowActive
text: qsTr("Preference Settings")
Expand Down
3 changes: 3 additions & 0 deletions viewer/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <QSGRendererInterface>
#include "PAGUpdater.h"
#include "PAGViewer.h"
#include "maintenance/PluginInstallerModel.h"
#include "profiling/PAGRunTimeDataModel.h"
#include "rendering/PAGView.h"
#include "task/PAGTaskFactory.h"
#include "version.h"
Expand Down Expand Up @@ -64,6 +66,7 @@ int main(int argc, char* argv[]) {
QApplication::setWindowIcon(QIcon(":/images/window-icon.png"));
qmlRegisterType<pag::PAGView>("PAG", 1, 0, "PAGView");
qmlRegisterType<pag::PAGTaskFactory>("PAG", 1, 0, "PAGTaskFactory");
qmlRegisterType<pag::PluginInstallerModel>("PAG", 1, 0, "PluginInstallerModel");
app.openFile(filePath.data());

pag::InitUpdater();
Expand Down
3 changes: 2 additions & 1 deletion viewer/src/maintenance/PAGCheckUpdateModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ void PAGCheckUpdateModel::getAppcast(const QByteArray& data) {

for (const auto& url : availableUpdateUrls) {
auto* task = new PAGUpdateVersionFetcherTask(url);
task->setAutoDelete(false);
connect(task, &PAGUpdateVersionFetcherTask::versionFound, this,
&PAGCheckUpdateModel::getUpdateVersion);
task->setAutoDelete(true);
connect(task, &PAGUpdateVersionFetcherTask::finished, task, &QObject::deleteLater);
threadPool->start(task);
}
}
Expand Down
57 changes: 57 additions & 0 deletions viewer/src/maintenance/PluginInstallerModel.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/////////////////////////////////////////////////////////////////////////////////////////////////
//
// Tencent is pleased to support the open source community by making libpag available.
//
// Copyright (C) 2025 Tencent. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// unless required by applicable law or agreed to in writing, software distributed under the
// license is distributed on an "as is" basis, without warranties or conditions of any kind,
// either express or implied. see the license for the specific language governing permissions
// and limitations under the license.
//
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "PluginInstallerModel.h"
#include "platform/PluginInstaller.h"

namespace pag {

PluginInstallerModel::PluginInstallerModel(QObject* parent)
: QObject(parent), installer(std::make_unique<PluginInstaller>(this)) {

connect(installer.get(), &PluginInstaller::updateChecked, this,
&PluginInstallerModel::updateCheckCompleted);
connect(installer.get(), &PluginInstaller::installCompleted, this,
&PluginInstallerModel::installationCompleted);
connect(installer.get(), &PluginInstaller::uninstallCompleted, this,
&PluginInstallerModel::uninstallationCompleted);
}

PluginInstallerModel::~PluginInstallerModel() = default;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没有任何实现的析构函数可以不写

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改


bool PluginInstallerModel::hasUpdate() const {
return installer->hasUpdate();
}

InstallResult PluginInstallerModel::installPlugins(bool force) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该只有一个插件要安装卸载吧,用单数,去掉s

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return installer->installPlugins(force);
}

InstallResult PluginInstallerModel::uninstallPlugins() {
return installer->uninstallPlugins();
}

QString PluginInstallerModel::getInstalledVersion() const {
return installer->getInstalledVersion();
}

bool PluginInstallerModel::isPluginInstalled() const {
return installer->isPluginInstalled();
}

} // namespace pag
54 changes: 54 additions & 0 deletions viewer/src/maintenance/PluginInstallerModel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/////////////////////////////////////////////////////////////////////////////////////////////////
//
// Tencent is pleased to support the open source community by making libpag available.
//
// Copyright (C) 2025 Tencent. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// unless required by applicable law or agreed to in writing, software distributed under the
// license is distributed on an "as is" basis, without warranties or conditions of any kind,
// either express or implied. see the license for the specific language governing permissions
// and limitations under the license.
//
/////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once
#include <QObject>
#include <memory>
#include "platform/PluginInstaller.h"

namespace pag {

class PluginInstaller;

class PluginInstallerModel : public QObject {
Q_OBJECT

public:
explicit PluginInstallerModel(QObject* parent = nullptr);
~PluginInstallerModel() override;

Q_INVOKABLE bool hasUpdate() const;

Q_INVOKABLE InstallResult installPlugins(bool force = false);

Q_INVOKABLE InstallResult uninstallPlugins();

Q_INVOKABLE QString getInstalledVersion() const;

Q_INVOKABLE bool isPluginInstalled() const;

Q_SIGNALS:
void updateCheckCompleted(bool hasUpdate);
void installationCompleted(InstallResult result, const QString& message);
void uninstallationCompleted(InstallResult result, const QString& message);

private:
std::unique_ptr<PluginInstaller> installer;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初始化下

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

};

} // namespace pag
Loading
Loading