chore: add license to headers
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
275351e19c
commit
4b65315cdc
@ -1,17 +1,55 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prism Launcher - Minecraft Launcher
|
||||||
|
* Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
*
|
||||||
|
* 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, version 3.
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include "GitHubRelease.h"
|
#include "GitHubRelease.h"
|
||||||
|
|
||||||
QDebug operator<<(QDebug debug, const GitHubReleaseAsset& asset)
|
QDebug operator<<(QDebug debug, const GitHubReleaseAsset& asset)
|
||||||
{
|
{
|
||||||
QDebugStateSaver saver(debug);
|
QDebugStateSaver saver(debug);
|
||||||
debug.nospace() << "GitHubReleaseAsset( "
|
debug.nospace() << "GitHubReleaseAsset( "
|
||||||
"id: " << asset.id << ", "
|
"id: "
|
||||||
"name " << asset.name << ", "
|
<< asset.id
|
||||||
"label: " << asset.label << ", "
|
<< ", "
|
||||||
"content_type: " << asset.content_type << ", "
|
"name "
|
||||||
"size: " << asset.size << ", "
|
<< asset.name
|
||||||
"created_at: " << asset.created_at << ", "
|
<< ", "
|
||||||
"updated_at: " << asset.updated_at << ", "
|
"label: "
|
||||||
"browser_download_url: " << asset.browser_download_url << " "
|
<< asset.label
|
||||||
|
<< ", "
|
||||||
|
"content_type: "
|
||||||
|
<< asset.content_type
|
||||||
|
<< ", "
|
||||||
|
"size: "
|
||||||
|
<< asset.size
|
||||||
|
<< ", "
|
||||||
|
"created_at: "
|
||||||
|
<< asset.created_at
|
||||||
|
<< ", "
|
||||||
|
"updated_at: "
|
||||||
|
<< asset.updated_at
|
||||||
|
<< ", "
|
||||||
|
"browser_download_url: "
|
||||||
|
<< asset.browser_download_url
|
||||||
|
<< " "
|
||||||
")";
|
")";
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
||||||
@ -20,17 +58,36 @@ QDebug operator<<(QDebug debug, const GitHubRelease& rls)
|
|||||||
{
|
{
|
||||||
QDebugStateSaver saver(debug);
|
QDebugStateSaver saver(debug);
|
||||||
debug.nospace() << "GitHubRelease( "
|
debug.nospace() << "GitHubRelease( "
|
||||||
"id: " << rls.id << ", "
|
"id: "
|
||||||
"name " << rls.name << ", "
|
<< rls.id
|
||||||
"tag_name: " << rls.tag_name << ", "
|
<< ", "
|
||||||
"created_at: " << rls.created_at << ", "
|
"name "
|
||||||
"published_at: " << rls.published_at << ", "
|
<< rls.name
|
||||||
"prerelease: " << rls.prerelease << ", "
|
<< ", "
|
||||||
"draft: " << rls.draft << ", "
|
"tag_name: "
|
||||||
"version" << rls.version << ", "
|
<< rls.tag_name
|
||||||
"body: " << rls.body << ", "
|
<< ", "
|
||||||
"assets: " << rls.assets << " "
|
"created_at: "
|
||||||
|
<< rls.created_at
|
||||||
|
<< ", "
|
||||||
|
"published_at: "
|
||||||
|
<< rls.published_at
|
||||||
|
<< ", "
|
||||||
|
"prerelease: "
|
||||||
|
<< rls.prerelease
|
||||||
|
<< ", "
|
||||||
|
"draft: "
|
||||||
|
<< rls.draft
|
||||||
|
<< ", "
|
||||||
|
"version"
|
||||||
|
<< rls.version
|
||||||
|
<< ", "
|
||||||
|
"body: "
|
||||||
|
<< rls.body
|
||||||
|
<< ", "
|
||||||
|
"assets: "
|
||||||
|
<< rls.assets
|
||||||
|
<< " "
|
||||||
")";
|
")";
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prism Launcher - Minecraft Launcher
|
||||||
|
* Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
*
|
||||||
|
* 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, version 3.
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
@ -37,4 +59,3 @@ struct GitHubRelease {
|
|||||||
|
|
||||||
QDebug operator<<(QDebug debug, const GitHubReleaseAsset& rls);
|
QDebug operator<<(QDebug debug, const GitHubReleaseAsset& rls);
|
||||||
QDebug operator<<(QDebug debug, const GitHubRelease& rls);
|
QDebug operator<<(QDebug debug, const GitHubRelease& rls);
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#define PRISM_EXTERNAL_EXE
|
#define PRISM_EXTERNAL_EXE
|
||||||
#include "FileSystem.h"
|
#include "FileSystem.h"
|
||||||
|
|
||||||
#include "updater/prismupdater/GitHubRelease.h"
|
#include "GitHubRelease.h"
|
||||||
|
|
||||||
class PrismUpdaterApp : public QApplication {
|
class PrismUpdaterApp : public QApplication {
|
||||||
// friends for the purpose of limiting access to deprecated stuff
|
// friends for the purpose of limiting access to deprecated stuff
|
||||||
|
@ -1,3 +1,25 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prism Launcher - Minecraft Launcher
|
||||||
|
* Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
*
|
||||||
|
* 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, version 3.
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#include "UpdaterDialogs.h"
|
#include "UpdaterDialogs.h"
|
||||||
|
|
||||||
#include "ui_SelectReleaseDialog.h"
|
#include "ui_SelectReleaseDialog.h"
|
||||||
@ -57,7 +79,8 @@ void SelectReleaseDialog::appendRelease(GitHubRelease const& release)
|
|||||||
ui->versionsTree->addTopLevelItem(rls_item);
|
ui->versionsTree->addTopLevelItem(rls_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
GitHubRelease SelectReleaseDialog::getRelease(QTreeWidgetItem* item) {
|
GitHubRelease SelectReleaseDialog::getRelease(QTreeWidgetItem* item)
|
||||||
|
{
|
||||||
int id = item->data(0, Qt::UserRole).toInt();
|
int id = item->data(0, Qt::UserRole).toInt();
|
||||||
GitHubRelease release;
|
GitHubRelease release;
|
||||||
for (auto rls : m_releases) {
|
for (auto rls : m_releases) {
|
||||||
@ -76,8 +99,6 @@ void SelectReleaseDialog::selectionChanged(QTreeWidgetItem* current, QTreeWidget
|
|||||||
ui->changelogTextBrowser->setHtml(body);
|
ui->changelogTextBrowser->setHtml(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SelectReleaseAssetDialog::SelectReleaseAssetDialog(const QList<GitHubReleaseAsset>& assets, QWidget* parent)
|
SelectReleaseAssetDialog::SelectReleaseAssetDialog(const QList<GitHubReleaseAsset>& assets, QWidget* parent)
|
||||||
: QDialog(parent), m_assets(assets), ui(new Ui::SelectReleaseDialog)
|
: QDialog(parent), m_assets(assets), ui(new Ui::SelectReleaseDialog)
|
||||||
{
|
{
|
||||||
@ -129,7 +150,8 @@ void SelectReleaseAssetDialog::appendAsset(GitHubReleaseAsset const& asset)
|
|||||||
ui->versionsTree->addTopLevelItem(rls_item);
|
ui->versionsTree->addTopLevelItem(rls_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
GitHubReleaseAsset SelectReleaseAssetDialog::getAsset(QTreeWidgetItem* item) {
|
GitHubReleaseAsset SelectReleaseAssetDialog::getAsset(QTreeWidgetItem* item)
|
||||||
|
{
|
||||||
int id = item->data(0, Qt::UserRole).toInt();
|
int id = item->data(0, Qt::UserRole).toInt();
|
||||||
GitHubReleaseAsset selected_asset;
|
GitHubReleaseAsset selected_asset;
|
||||||
for (auto asset : m_assets) {
|
for (auto asset : m_assets) {
|
||||||
|
@ -1,10 +1,32 @@
|
|||||||
|
// SPDX-FileCopyrightText: 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
//
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prism Launcher - Minecraft Launcher
|
||||||
|
* Copyright (C) 2023 Rachel Powers <508861+Ryex@users.noreply.github.com>
|
||||||
|
*
|
||||||
|
* 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, version 3.
|
||||||
|
*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
|
|
||||||
#include "Version.h"
|
#include "Version.h"
|
||||||
#include "updater/prismupdater/GitHubRelease.h"
|
#include "GitHubRelease.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class SelectReleaseDialog;
|
class SelectReleaseDialog;
|
||||||
|
@ -20,17 +20,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "PrismUpdater.h"
|
||||||
|
|
||||||
#include "updater/prismupdater/PrismUpdater.h"
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
PrismUpdaterApp wUpApp(argc, argv);
|
PrismUpdaterApp wUpApp(argc, argv);
|
||||||
|
|
||||||
switch (wUpApp.status()) {
|
switch (wUpApp.status()) {
|
||||||
case PrismUpdaterApp::Starting:
|
case PrismUpdaterApp::Starting:
|
||||||
case PrismUpdaterApp::Initialized:
|
case PrismUpdaterApp::Initialized: {
|
||||||
{
|
|
||||||
return wUpApp.exec();
|
return wUpApp.exec();
|
||||||
}
|
}
|
||||||
case PrismUpdaterApp::Failed:
|
case PrismUpdaterApp::Failed:
|
||||||
@ -40,5 +37,4 @@ int main(int argc, char* argv[])
|
|||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user