mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-12-08 13:52:08 -06:00
Compare commits
9 Commits
ddutchie/u
...
ddutchie/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73c2c78990 | ||
|
|
47ae788afd | ||
|
|
2f2fbed1db | ||
|
|
4009a72299 | ||
|
|
07f19b0bbc | ||
|
|
cb9e613a7c | ||
|
|
c5045ff036 | ||
|
|
abda93ce0f | ||
|
|
148fd75d6c |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,7 +4,6 @@
|
||||
# Build directory
|
||||
[Bb]uild*/
|
||||
doc-build/
|
||||
cmake-build*/
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
@@ -15,7 +14,6 @@ dist/english_plurals/generated_en.ts
|
||||
.idea/
|
||||
.vs/
|
||||
.vscode/
|
||||
.cache/
|
||||
CMakeLists.txt.user*
|
||||
|
||||
# *nix related
|
||||
|
||||
@@ -16,6 +16,7 @@ clang-format:
|
||||
# - Windows
|
||||
- Parallelized
|
||||
- Format
|
||||
|
||||
#LINUX BUILD - BUILDS LINUX APPIMAGE
|
||||
build-linux:
|
||||
stage: build
|
||||
@@ -34,6 +35,7 @@ build-linux:
|
||||
tags:
|
||||
- Linux
|
||||
- Parallelized
|
||||
|
||||
#ANDROID BUILD - BUILDS APK
|
||||
android:
|
||||
stage: build
|
||||
@@ -52,5 +54,6 @@ android:
|
||||
paths:
|
||||
- artifacts/*
|
||||
tags:
|
||||
- Android
|
||||
- Linux
|
||||
- Parallelized
|
||||
|
||||
|
||||
84
dist/icns_generator.sh
vendored
84
dist/icns_generator.sh
vendored
@@ -1,72 +1,14 @@
|
||||
#!/bin/bash
|
||||
# icns_generator.sh GNU GPLv3 License
|
||||
# Run this script when a new logo is made and the svg file inside.
|
||||
# You should install Imagemagick to make the conversions: $brew install imagemagick
|
||||
mkdir suyu.iconset
|
||||
convert -background none -resize 16x16 suyu.svg suyu.iconset/icon_16x16.png;
|
||||
convert -background none -resize 32x32 suyu.svg suyu.iconset/icon_16x16@2x.png;
|
||||
convert -background none -resize 32x32 suyu.svg suyu.iconset/icon_32x32.png;
|
||||
convert -background none -resize 64x64 suyu.svg suyu.iconset/icon_32x32@2x.png;
|
||||
convert -background none -resize 128x128 suyu.svg suyu.iconset/icon_128x128.png;
|
||||
convert -background none -resize 256x256 suyu.svg suyu.iconset/icon_256x256.png;
|
||||
convert -background none -resize 256x256 suyu.svg suyu.iconset/icon_128x128@2x.png;
|
||||
convert -background none -resize 512x512 suyu.svg suyu.iconset/icon_256x256@2x.png;
|
||||
convert -background none -resize 512x512 suyu.svg suyu.iconset/icon_512x512.png;
|
||||
convert -background none -resize 1024x1024 suyu.svg suyu.iconset/icon_512x512@2x.png;
|
||||
|
||||
# Change working dir to where this script is located.
|
||||
cd "${0%/*}"
|
||||
|
||||
if [ -z $1 ]; then
|
||||
echo "icns_generator.sh GNU GPLv3 License"
|
||||
echo "Run this script when a new logo is made and the svg file inside."
|
||||
echo ""
|
||||
echo "Syntax: ./icns_generator <input.svg>"
|
||||
echo ""
|
||||
echo "Don't forget to install imagemagick: "
|
||||
echo "$ brew install imagemagick"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Error Handling Stuff:
|
||||
## Check command availability
|
||||
check_command() {
|
||||
if ! command -v "$1" &> /dev/null; then
|
||||
read -s -n 1 -p "Error: '$1' command not found. Please install $2."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
## Convert image with error handling
|
||||
convert_image() {
|
||||
convert -background none -resize "$2" "$1" "$3" || {
|
||||
read -s -n 1 -p "Error: Conversion failed for $1"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Check required commands
|
||||
check_command "convert" "ImageMagick"
|
||||
check_command "iconutil" "macOS"
|
||||
|
||||
# Create the iconset directory
|
||||
mkdir suyu.iconset || {
|
||||
read -s -n 1 -p "Error: Unable to create suyu.iconset directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Convert images
|
||||
convert_image "$1" 16x16 suyu.iconset/icon_16x16.png
|
||||
convert_image "$1" 32x32 suyu.iconset/icon_16x16@2x.png
|
||||
convert_image "$1" 32x32 suyu.iconset/icon_32x32.png
|
||||
convert_image "$1" 64x64 suyu.iconset/icon_32x32@2x.png
|
||||
convert_image "$1" 128x128 suyu.iconset/icon_128x128.png
|
||||
convert_image "$1" 256x256 suyu.iconset/icon_256x256.png
|
||||
convert_image "$1" 256x256 suyu.iconset/icon_128x128@2x.png
|
||||
convert_image "$1" 512x512 suyu.iconset/icon_256x256@2x.png
|
||||
convert_image "$1" 512x512 suyu.iconset/icon_512x512.png
|
||||
convert_image "$1" 1024x1024 suyu.iconset/icon_512x512@2x.png
|
||||
|
||||
# Create the ICNS file
|
||||
iconutil -c icns suyu.iconset || {
|
||||
read -s -n 1 -p "Error: Failed to create ICNS file."
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Remove the temporary iconset directory
|
||||
rm -rf suyu.iconset || {
|
||||
read -s -n 1 -p "Error: Unable to remove suyu.iconset directory."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo -s -n 1 -p "Icon generation completed successfully."
|
||||
echo ""
|
||||
iconutil -c icns suyu.iconset
|
||||
rm -rf suyu.iconset
|
||||
|
||||
@@ -611,7 +611,7 @@ struct Values {
|
||||
Category::Network};
|
||||
|
||||
// WebService
|
||||
Setting<std::string> web_api_url{linkage, "https://suyu.dev", "web_api_url",
|
||||
Setting<std::string> web_api_url{linkage, "http://74.113.97.71:3000", "web_api_url",
|
||||
Category::WebService};
|
||||
Setting<std::string> suyu_username{linkage, std::string(), "suyu_username",
|
||||
Category::WebService};
|
||||
|
||||
@@ -63,11 +63,11 @@ void ConfigureWeb::RetranslateUI() {
|
||||
ui->retranslateUi(this);
|
||||
|
||||
ui->web_signup_link->setText(
|
||||
tr("<a href='https://suyu.dev/signup'><span style=\"text-decoration: underline; "
|
||||
tr("<a href='https://profile.suyu.dev/'><span style=\"text-decoration: underline; "
|
||||
"color:#039be5;\">Sign up</span></a>"));
|
||||
|
||||
ui->web_token_info_link->setText(
|
||||
tr("<a href='https://suyu.dev/account'><span style=\"text-decoration: "
|
||||
tr("<a href='https://suyu.dev/wiki/suyu-web-service/'><span style=\"text-decoration: "
|
||||
"underline; color:#039be5;\">What is my token?</span></a>"));
|
||||
}
|
||||
|
||||
|
||||
@@ -31,22 +31,23 @@ constexpr char PROGRESSBAR_STYLE_BUILD[] = R"(
|
||||
QProgressBar {
|
||||
background-color: black;
|
||||
border: 2px solid white;
|
||||
border-radius: 10px;
|
||||
border-radius: 4px;
|
||||
padding: 2px;
|
||||
}
|
||||
QProgressBar::chunk {
|
||||
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(98, 160, 234, 255), stop:1 rgba(237, 51, 59, 255));
|
||||
border-radius: 6px;
|
||||
background-color: #ff3c28;
|
||||
width: 1px;
|
||||
})";
|
||||
|
||||
constexpr char PROGRESSBAR_STYLE_COMPLETE[] = R"(
|
||||
QProgressBar {
|
||||
background-color: black;
|
||||
background-color: #0ab9e6;
|
||||
border: 2px solid white;
|
||||
border-radius: 10px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
padding: 2px;
|
||||
}
|
||||
QProgressBar::chunk {
|
||||
background-color: #ff3c28;
|
||||
})";
|
||||
|
||||
LoadingScreen::LoadingScreen(QWidget* parent)
|
||||
@@ -98,7 +99,7 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
|
||||
#ifdef SUYU_QT_MOVIE_MISSING
|
||||
QPixmap map;
|
||||
map.loadFromData(buffer.data(), buffer.size());
|
||||
setPixmap(map);
|
||||
ui->banner->setPixmap(map);
|
||||
#else
|
||||
backing_mem = std::make_unique<QByteArray>(reinterpret_cast<char*>(buffer.data()),
|
||||
static_cast<int>(buffer.size()));
|
||||
@@ -115,8 +116,6 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) {
|
||||
map.loadFromData(buffer.data(), static_cast<uint>(buffer.size()));
|
||||
ui->logo->setPixmap(map);
|
||||
}
|
||||
ui->logo->setVisible(false);
|
||||
ui->banner->setVisible(false);
|
||||
|
||||
slow_shader_compile_start = false;
|
||||
OnLoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
|
||||
|
||||
@@ -49,9 +49,6 @@
|
||||
</property>
|
||||
<item alignment="Qt::AlignLeft|Qt::AlignTop">
|
||||
<widget class="QLabel" name="logo">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -81,7 +78,7 @@
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: black; color: white;
|
||||
font: 500 20pt "Ubuntu";</string>
|
||||
font: 75 20pt "Arial";</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Loading Shaders 387 / 1628</string>
|
||||
@@ -99,25 +96,19 @@ font: 500 20pt "Ubuntu";</string>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar {
|
||||
background-color: black;
|
||||
color: white;
|
||||
border: 2px solid white;
|
||||
border-radius: 10px;
|
||||
padding: 2px;
|
||||
outline-color: black;
|
||||
border-radius: 20px;
|
||||
}
|
||||
QProgressBar::chunk {
|
||||
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(98, 160, 234, 255), stop:1 rgba(237, 51, 59, 255));
|
||||
border-radius: 6px;
|
||||
background-color: white;
|
||||
border-radius: 15px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
@@ -138,7 +129,7 @@ border-radius: 6px;
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: black; color: white;
|
||||
font: 500 15pt "Ubuntu";</string>
|
||||
font: 75 15pt "Arial";</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Estimated Time 5m 4s</string>
|
||||
@@ -149,9 +140,6 @@ font: 500 15pt "Ubuntu";</string>
|
||||
</item>
|
||||
<item alignment="Qt::AlignRight|Qt::AlignBottom">
|
||||
<widget class="QLabel" name="banner">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: black;</string>
|
||||
</property>
|
||||
|
||||
@@ -1535,12 +1535,11 @@ void GMainWindow::ConnectMenuEvents() {
|
||||
connect_menu(ui->action_Show_Folders_In_List, &GMainWindow::OnToggleFoldersInList);
|
||||
|
||||
connect_menu(ui->action_Reset_Window_Size_720, &GMainWindow::ResetWindowSize720);
|
||||
connect_menu(ui->action_Reset_Window_Size_800, &GMainWindow::ResetWindowSize800);
|
||||
connect_menu(ui->action_Reset_Window_Size_900, &GMainWindow::ResetWindowSize900);
|
||||
connect_menu(ui->action_Reset_Window_Size_1080, &GMainWindow::ResetWindowSize1080);
|
||||
ui->menu_Reset_Window_Size->addActions(
|
||||
{ui->action_Reset_Window_Size_720, ui->action_Reset_Window_Size_800,
|
||||
ui->action_Reset_Window_Size_900, ui->action_Reset_Window_Size_1080});
|
||||
ui->menu_Reset_Window_Size->addActions({ui->action_Reset_Window_Size_720,
|
||||
ui->action_Reset_Window_Size_900,
|
||||
ui->action_Reset_Window_Size_1080});
|
||||
|
||||
// Multiplayer
|
||||
connect(ui->action_View_Lobby, &QAction::triggered, multiplayer_state,
|
||||
@@ -3531,14 +3530,6 @@ void GMainWindow::ResetWindowSize720() {
|
||||
ResetWindowSize(Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height);
|
||||
}
|
||||
|
||||
void GMainWindow::ResetWindowSize800() {
|
||||
if (!ui->action_Single_Window_Mode->isChecked()) {
|
||||
render_window->resize(1280, 800);
|
||||
} else {
|
||||
resize(1280, 800);
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::ResetWindowSize900() {
|
||||
ResetWindowSize(1600U, 900U);
|
||||
}
|
||||
|
||||
@@ -393,7 +393,6 @@ private slots:
|
||||
void ToggleWindowMode();
|
||||
void ResetWindowSize(u32 width, u32 height);
|
||||
void ResetWindowSize720();
|
||||
void ResetWindowSize800();
|
||||
void ResetWindowSize900();
|
||||
void ResetWindowSize1080();
|
||||
void OnAlbum();
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1280</width>
|
||||
<height>22</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_File">
|
||||
@@ -102,14 +102,6 @@
|
||||
<property name="iconText">
|
||||
<string>Reset Window Size to 720p</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Reset_Window_Size_800">
|
||||
<property name="text">
|
||||
<string>Reset Window Size to &800p</string>
|
||||
</property>
|
||||
<property name="iconText">
|
||||
<string>Reset Window Size to 800p</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_Reset_Window_Size_900">
|
||||
<property name="text">
|
||||
@@ -132,7 +124,7 @@
|
||||
<addaction name="action_Display_Dock_Widget_Headers"/>
|
||||
<addaction name="action_Show_Filter_Bar"/>
|
||||
<addaction name="action_Show_Status_Bar"/>
|
||||
<addaction name="action_Show_Folders_In_List"/>
|
||||
<addaction name="action_Show_Folders_In_List" />
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menu_Reset_Window_Size"/>
|
||||
<addaction name="menu_View_Debugging"/>
|
||||
|
||||
Reference in New Issue
Block a user