Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions apps/arstack_studio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ qt_add_executable(arstack_studio
${ARSTACK_STUDIO_CORE_SOURCES}
)

# Studio-only branding: never use the root assets/ (Workbench) icons.
set(ARSTACK_STUDIO_BRAND_DIR "${CMAKE_CURRENT_LIST_DIR}/../../assets/studio_icon")
qt_add_resources(arstack_studio "studio_brand_icon"
PREFIX "/studio-brand"
BASE "${ARSTACK_STUDIO_BRAND_DIR}"
FILES
"${ARSTACK_STUDIO_BRAND_DIR}/android-chrome-192x192.png"
"${ARSTACK_STUDIO_BRAND_DIR}/android-chrome-512x512.png"
)

# S8 is intentionally a separate, headless executable. It links the same
# production controller/worker sources as Studio but exposes no test command in
# the release application. Friend-only seams let the harness inject deterministic
Expand Down Expand Up @@ -171,5 +181,14 @@ target_compile_definitions(arstack_session_harness PRIVATE
)

if(WIN32)
# PE resource gives ARStackStudio.exe its Explorer, shortcut and taskbar icon.
enable_language(RC)
set(ARSTACK_STUDIO_ICON_ICO "${ARSTACK_STUDIO_BRAND_DIR}/ARStackStudio.ico")
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/packaging/ARStackStudioIcon.rc.in"
"${CMAKE_CURRENT_BINARY_DIR}/ARStackStudioIcon.rc"
@ONLY
)
target_sources(arstack_studio PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/ARStackStudioIcon.rc")
set_target_properties(arstack_studio PROPERTIES WIN32_EXECUTABLE TRUE)
endif()
5 changes: 5 additions & 0 deletions apps/arstack_studio/packaging/ARStackStudio.iss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
#define ProductRegistry "Software\ARStack61850\ARStack Studio"
#endif

; Resolve relative to this .iss file, independent of the compiler working dir.
#define StudioIconFile AddBackslash(SourcePath) + "..\..\..\assets\studio_icon\ARStackStudio.ico"

[Setup]
AppId={#ProductId}
AppName={#ProductName}
Expand All @@ -33,6 +36,8 @@ AppPublisherURL=https://github.com/masarray/arstack61850
AppSupportURL=https://github.com/masarray/arstack61850/issues
AppUpdatesURL=https://github.com/masarray/arstack61850/releases
UninstallDisplayName={#ProductName}
UninstallDisplayIcon={app}\ARStackStudio.exe
SetupIconFile={#StudioIconFile}
DefaultDirName={localappdata}\Programs\{#ProductFolder}
DefaultGroupName={#ProductName}
OutputBaseFilename={#ProductOutput}
Expand Down
2 changes: 2 additions & 0 deletions apps/arstack_studio/packaging/ARStackStudioIcon.rc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Studio-only Windows PE icon. CMake expands the absolute ICO path.
1 ICON "@ARSTACK_STUDIO_ICON_ICO@"
5 changes: 5 additions & 0 deletions apps/arstack_studio/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <QEventLoop>
#include <QFile>
#include <QGuiApplication>
#include <QIcon>
#include <QPointer>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
Expand Down Expand Up @@ -446,6 +447,10 @@ int main(int argc, char* argv[]) {
QCoreApplication::setApplicationName(QStringLiteral("ARStack Studio"));
QCoreApplication::setApplicationVersion(QStringLiteral(ARSTACK_STUDIO_VERSION));
#endif
QIcon studioIcon;
studioIcon.addFile(QStringLiteral(":/studio-brand/android-chrome-192x192.png"));
studioIcon.addFile(QStringLiteral(":/studio-brand/android-chrome-512x512.png"));
app.setWindowIcon(studioIcon);

// S6 ownership starts before any firmware process, QML object, or serial
// worker exists. A second Studio process therefore cannot race for the
Expand Down
Binary file added assets/studio_icon/ARStackStudio.ico
Binary file not shown.
Loading