diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1c00de1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,51 @@ +# First Level Heading + +Paragraph. + +## Second Level Heading + +Paragraph. + +- bullet ++ other bullet +* another bullet + * child bullet + +1. ordered +2. next ordered + +### Third Level Heading + +Some *italic* and **bold** text and `inline code`. + +An empty line starts a new paragraph. + +Use two spaces at the end +to force a line break. + +A horizontal ruler follows: + +--- + +Add links inline like [this link to the Qt homepage](https://www.qt.io), +or with a reference like [this other link to the Qt homepage][1]. + + Add code blocks with + four spaces at the front. + +> A blockquote +> starts with > +> +> and has the same paragraph rules as normal text. + +First Level Heading in Alternate Style +====================================== + +Paragraph. + +Second Level Heading in Alternate Style +--------------------------------------- + +Paragraph. + +[1]: https://www.qt.io diff --git a/CMakeLists.txt b/CMakeLists.txt index c3b24e4..cfae8af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,9 @@ qt_standard_project_setup(REQUIRES 6.8) set(LAUNCHER_ICON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/icons") if(WIN32) - set(LAUNCHER_APP_ICON "${LAUNCHER_ICON_DIR}/icon.rc") + configure_file("${LAUNCHER_ICON_DIR}/icon.rc.in" + "${CMAKE_CURRENT_BINARY_DIR}/icon.rc" @ONLY) + set(LAUNCHER_APP_ICON "${CMAKE_CURRENT_BINARY_DIR}/icon.rc") elseif(APPLE) set(LAUNCHER_APP_ICON "${LAUNCHER_ICON_DIR}/icon.icns") set_source_files_properties(${LAUNCHER_APP_ICON} PROPERTIES @@ -126,6 +128,11 @@ qt_add_qml_module(BiLauncher RESOURCES images/Folder/Folder_Active.svg images/Folder/Folder_Idle.svg images/Folder/Folder_Pressed.svg images/Options/Options_active.svg images/Options/Options_Idle.svg images/Options/Options_Pressed.svg images/Play_Button/Play_Active.svg images/Play_Button/Play_Idle.svg images/Play_Button/Play_pressed.svg images/Profile_Box/Asset_23.jpg images/Profile_Box/Asset_23.svg images/Profile_Box/Asset_24.jpg images/Profile_Box/Asset_24.svg images/Profile_Box/Kishka_Profile_Active.svg images/Profile_Box/Kishka_Profile_Idle.svg images/Profile_Box/Kishka_Profile_open.svg images/Scroll/Scroll_Lever.svg images/Scroll/Scroll_palka.svg images/Version_box/Kishka_Profile_Open.svg images/Version_box/Kishka_Ver_Active.svg images/Version_box/Kishka_Ver_idle.svg images/Trash.svg images/Pencil.svg images/GovuztTW8AAHqBf.jpeg images/photo_2025-12-16_15-04-17.jpg images/photo_2025-12-21_02-30-09.jpg i18n/translations.json RESOURCES images/launcherBackground.png RESOURCES images/launcherBackground2.mp4 images/launcherBackground2static.jpg + RESOURCES CHANGELOG.md + RESOURCES LICENSE + RESOURCES icons/icon.rc + RESOURCES icons/icon.rc.in + RESOURCES icons/icon.rc ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e69de29 diff --git a/icons/generate_icons.sh b/icons/generate_icons.sh new file mode 100755 index 0000000..2d2fb9a --- /dev/null +++ b/icons/generate_icons.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +# +# Пересборка всех иконок лаунчера из одного исходника master/icon_master.png +# (квадрат 1024x1024, арт нарисован «в край» холста). +# +# Размеры у систем разные не по прихоти: macOS сама не масштабирует иконку в +# доке, поэтому поля закладываются в сам файл — по сетке Apple арт занимает +# 824x824 внутри 1024x1024, а углы скруглены радиусом 185.4. Windows и Linux, +# наоборот, ждут картинку на весь холст и добавляют отступы сами, так что для +# них тот же арт идёт без полей. +# +# Нужны ImageMagick (magick) и iconutil из состава macOS. +# +set -euo pipefail + +cd "$(dirname "$0")" + +MASTER="master/icon_master.png" +[ -f "$MASTER" ] || { echo "нет исходника $MASTER" >&2; exit 1; } + +command -v magick >/dev/null || { echo "нужен ImageMagick: brew install imagemagick" >&2; exit 1; } + +# Сетка Apple для иконки-«скруглённого квадрата», доли от холста 1024. +readonly APPLE_ART=824 +readonly APPLE_RADIUS=185.4 +readonly CANVAS=1024 + +echo "==> растры без полей (Windows, Linux, иконка окна Qt)" +# 24 и 48 нужны панели задач Windows и темам значков Linux, 64 — HiDPI-вариант 32. +for size in 16 24 32 48 64 128 256 512; do + magick "$MASTER" -filter Lanczos -resize "${size}x${size}" -strip "PNG32:icon_${size}x${size}.png" +done +# Те же кадры под именами @2x: Qt по такому имени берёт растр для HiDPI-экрана. +for base in 16 32 128 256 512; do + magick "$MASTER" -filter Lanczos -resize "$((base * 2))x$((base * 2))" -strip "PNG32:icon_${base}x${base}@2x.png" +done + +echo "==> icon.ico (Windows 10/11)" +# Кадры от 16 до 256: проводник, панель задач и Alt+Tab берут свой размер сами, +# промежуточные 20, 40 и 96 нужны масштабам 125%, 150% и 200%. Без явного списка +# ImageMagick кладёт в .ico только исходные 1024x1024, и система их мылит. +magick "$MASTER" -filter Lanczos \ + -define icon:auto-resize=256,128,96,64,48,40,32,24,20,16 \ + -strip icon.ico + +echo "==> icon.icns (macOS)" +# Маска рисуется в четыре раза крупнее и ужимается — так края скругления +# получаются сглаженными, а не ступенькой. +SS=4 +MASK="$(mktemp -t icnsmask).png" +PADDED="$(mktemp -t icnspad).png" +trap 'rm -f "$MASK" "$PADDED"' EXIT + +mask_px=$((APPLE_ART * SS)) +mask_radius=$(awk -v r="$APPLE_RADIUS" -v ss="$SS" 'BEGIN { printf "%d", r * ss }') +# Префикс PNG32: обязателен: без него ImageMagick сохранит белое-на-прозрачном +# как серую картинку без альфы, и маска вырежет вообще всё. +magick -size "${mask_px}x${mask_px}" xc:none -fill white -antialias \ + -draw "roundrectangle 0,0,$((mask_px - 1)),$((mask_px - 1)),${mask_radius},${mask_radius}" \ + -filter Lanczos -resize "${APPLE_ART}x${APPLE_ART}" "PNG32:$MASK" + +# DstIn оставляет картинку только там, где непрозрачна маска: арт ужимается до +# 824 и обрезается по «яблочному» скруглению. Дальше -compose Copy обязателен: +# -extent кладёт результат на прозрачный холст 1024 текущим оператором, а с +# оставшимся DstIn холст вычистил бы всю картинку. +magick "$MASTER" -filter Lanczos -resize "${APPLE_ART}x${APPLE_ART}" \ + "$MASK" -compose DstIn -composite \ + -compose Copy -background none -gravity center -extent "${CANVAS}x${CANVAS}" \ + -strip "PNG32:$PADDED" + +rm -rf icon.iconset +mkdir icon.iconset +for base in 16 32 128 256 512; do + magick "$PADDED" -filter Lanczos -resize "${base}x${base}" -strip "PNG32:icon.iconset/icon_${base}x${base}.png" + magick "$PADDED" -filter Lanczos -resize "$((base * 2))x$((base * 2))" -strip "PNG32:icon.iconset/icon_${base}x${base}@2x.png" +done +iconutil -c icns icon.iconset -o icon.icns +# Промежуточный .iconset больше не нужен: всё его содержимое лежит в .icns. +rm -rf icon.iconset + +echo "готово" diff --git a/icons/icon.icns b/icons/icon.icns index aa36736..65a4f77 100644 Binary files a/icons/icon.icns and b/icons/icon.icns differ diff --git a/icons/icon.ico b/icons/icon.ico index 39c97a5..c5b9e80 100644 Binary files a/icons/icon.ico and b/icons/icon.ico differ diff --git a/icons/icon.rc b/icons/icon.rc index a841e99..14d43bd 100644 --- a/icons/icon.rc +++ b/icons/icon.rc @@ -1 +1 @@ -IDI_ICON1 ICON "icon.ico" +IDI_ICON1 ICON "icon.ico" \ No newline at end of file diff --git a/icons/icon.rc.in b/icons/icon.rc.in new file mode 100644 index 0000000..90f857a --- /dev/null +++ b/icons/icon.rc.in @@ -0,0 +1,31 @@ +#include + +IDI_ICON1 ICON "@LAUNCHER_ICON_DIR@/icon.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 + PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 + FILEFLAGSMASK 0x3fL + FILEFLAGS 0x0L + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "041904b0" + BEGIN + VALUE "CompanyName", "GaleonDev\0" + VALUE "FileDescription", "BiLauncher\0" + VALUE "FileVersion", "@PROJECT_VERSION@\0" + VALUE "InternalName", "BiLauncher\0" + VALUE "OriginalFilename", "BiLauncher.exe\0" + VALUE "ProductName", "BiLauncher\0" + VALUE "ProductVersion", "@PROJECT_VERSION@\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x419, 1200 + END +END \ No newline at end of file diff --git a/icons/icon_128x128.png b/icons/icon_128x128.png index 87a1fae..9d5949b 100644 Binary files a/icons/icon_128x128.png and b/icons/icon_128x128.png differ diff --git a/icons/icon_128x128@2x.png b/icons/icon_128x128@2x.png index 73118ad..c5bda7a 100644 Binary files a/icons/icon_128x128@2x.png and b/icons/icon_128x128@2x.png differ diff --git a/icons/icon_16x16.png b/icons/icon_16x16.png index 29d783e..a9c7921 100644 Binary files a/icons/icon_16x16.png and b/icons/icon_16x16.png differ diff --git a/icons/icon_16x16@2x.png b/icons/icon_16x16@2x.png index ec867f2..19e0129 100644 Binary files a/icons/icon_16x16@2x.png and b/icons/icon_16x16@2x.png differ diff --git a/icons/icon_24x24.png b/icons/icon_24x24.png index d968943..1db0691 100644 Binary files a/icons/icon_24x24.png and b/icons/icon_24x24.png differ diff --git a/icons/icon_256x256.png b/icons/icon_256x256.png index 73118ad..c5bda7a 100644 Binary files a/icons/icon_256x256.png and b/icons/icon_256x256.png differ diff --git a/icons/icon_256x256@2x.png b/icons/icon_256x256@2x.png index 7f1e278..e6562fb 100644 Binary files a/icons/icon_256x256@2x.png and b/icons/icon_256x256@2x.png differ diff --git a/icons/icon_32x32.png b/icons/icon_32x32.png index ec867f2..19e0129 100644 Binary files a/icons/icon_32x32.png and b/icons/icon_32x32.png differ diff --git a/icons/icon_32x32@2x.png b/icons/icon_32x32@2x.png index f458828..73bdf9e 100644 Binary files a/icons/icon_32x32@2x.png and b/icons/icon_32x32@2x.png differ diff --git a/icons/icon_48x48.png b/icons/icon_48x48.png index d9c4f1b..201613a 100644 Binary files a/icons/icon_48x48.png and b/icons/icon_48x48.png differ diff --git a/icons/icon_512x512.png b/icons/icon_512x512.png index 7f1e278..e6562fb 100644 Binary files a/icons/icon_512x512.png and b/icons/icon_512x512.png differ diff --git a/icons/icon_512x512@2x.png b/icons/icon_512x512@2x.png index c82b68b..4f3f081 100644 Binary files a/icons/icon_512x512@2x.png and b/icons/icon_512x512@2x.png differ diff --git a/icons/icon_64x64.png b/icons/icon_64x64.png index f458828..73bdf9e 100644 Binary files a/icons/icon_64x64.png and b/icons/icon_64x64.png differ diff --git a/icons/master/icon_master.png b/icons/master/icon_master.png index 2ef651c..f06bd3f 100644 Binary files a/icons/master/icon_master.png and b/icons/master/icon_master.png differ diff --git a/main.cpp b/main.cpp index 2393608..33e836c 100644 --- a/main.cpp +++ b/main.cpp @@ -15,12 +15,12 @@ int main(int argc, char *argv[]) QtWebEngineQuick::initialize(); #endif -QGuiApplication app(argc, argv); + QGuiApplication app(argc, argv); -QCoreApplication::setApplicationName(QStringLiteral("BiLauncher")); -QCoreApplication::setApplicationVersion(QStringLiteral(LAUNCHER_VERSION)); -QCoreApplication::setOrganizationName(QStringLiteral("GaleonDev")); -QCoreApplication::setOrganizationDomain(QStringLiteral("galeonworx.com")); + QCoreApplication::setApplicationName(QStringLiteral("BiLauncher")); + QCoreApplication::setApplicationVersion(QStringLiteral(LAUNCHER_VERSION)); + QCoreApplication::setOrganizationName(QStringLiteral("GaleonDev")); + QCoreApplication::setOrganizationDomain(QStringLiteral("galeonworx.com")); #ifndef Q_OS_MACOS QIcon appIcon;