Commit 96f4bbf1 authored by Shu's avatar Shu 🍠
Browse files

Add icon

parent b6bd32eb
......@@ -32,12 +32,16 @@ deploy:package:
script:
- mkdir out # package
- cd build
- mkdir -p applications
- cp ../resource/config/*.desktop applications
- mkdir -p icons/hicolor/256x256/apps
- cp ../univerxel.png icons/hicolor/256x256/apps
- cp ../resource/config/full.toml config.toml
- tar cfz ../out/full-nux64.tar.gz univerxel config.toml content
- tar cfz ../out/full-nux64.tar.gz univerxel applications/fr.wadza.univerxel.desktop config.toml icons content
- cp ../resource/config/client.toml config.toml
- tar cfz ../out/client-nux64.tar.gz univerxel-client config.toml content/shaders content/textures
- tar cfz ../out/client-nux64.tar.gz univerxel-client applications/fr.wadza.univerxel.client.desktop config.toml icons content/shaders content/textures
- cp ../resource/config/server.toml config.toml
- tar cfz ../out/server-nux64.tar.gz univerxel-server config.toml content/cert.pem content/key.pem content/zstd.dict
- tar cfz ../out/server-nux64.tar.gz univerxel-server applications/fr.wadza.univerxel.server.desktop config.toml icons content/cert.pem content/key.pem content/zstd.dict
- cd ../out # deploy
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file full-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel/$CI_COMMIT_TAG/Univerxel-$CI_COMMIT_TAG-nux64.tar.gz'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file client-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel-client/$CI_COMMIT_TAG/Univerxel-client-$CI_COMMIT_TAG-nux64.tar.gz'
......
......@@ -76,20 +76,26 @@ else()
set(CORE_LIBS ${CORE_LIBS} picoquic-core pthread dl)
endif()
if (WIN32)
set(ICON univerxel.rc)
elseif (APPLE)
set(ICON univerxel.icns)
endif()
# All in one exec
add_executable(univerxel "src/main.cpp" ${CORE_SOURCES} ${CLIENT_SOURCES} ${SERVER_SOURCES})
add_executable(univerxel "src/main.cpp" ${ICON} ${CORE_SOURCES} ${CLIENT_SOURCES} ${SERVER_SOURCES})
target_compile_features(univerxel PUBLIC cxx_std_17)
target_link_libraries(univerxel ${CORE_LIBS} ${CLIENT_LIBS} ${SERVER_LIBS})
target_include_directories(univerxel PRIVATE ${CORE_HEADERS} ${CLIENT_HEADERS} ${SERVER_HEADERS})
# Standalone server
add_executable(univerxel-server EXCLUDE_FROM_ALL "src/server.cpp" ${CORE_SOURCES} ${SERVER_SOURCES})
add_executable(univerxel-server EXCLUDE_FROM_ALL "src/server.cpp" ${ICON} ${CORE_SOURCES} ${SERVER_SOURCES})
target_compile_features(univerxel-server PUBLIC cxx_std_17)
target_link_libraries(univerxel-server ${CORE_LIBS} ${SERVER_LIBS})
target_include_directories(univerxel-server PRIVATE ${CORE_HEADERS} ${SERVER_HEADERS})
# Dumb client
add_executable(univerxel-client EXCLUDE_FROM_ALL "src/client.cpp" ${CORE_SOURCES} ${CLIENT_SOURCES})
add_executable(univerxel-client EXCLUDE_FROM_ALL "src/client.cpp" ${ICON} ${CORE_SOURCES} ${CLIENT_SOURCES})
target_compile_features(univerxel-client PUBLIC cxx_std_17)
target_link_libraries(univerxel-client ${CORE_LIBS} ${CLIENT_LIBS})
target_include_directories(univerxel-client PRIVATE ${CORE_HEADERS} ${CLIENT_HEADERS})
......@@ -110,3 +116,15 @@ add_custom_target(docs
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Build doc."
)
if (APPLE)
set_target_properties(univerxel PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Univerxel")
set_target_properties(univerxel-client PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Univerxel Client")
set_target_properties(univerxel-server PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Univerxel Server")
set_source_files_properties(univerxel.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set_target_properties(univerxel univerxel-client PROPERTIES
MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION}
MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION}
MACOSX_BUNDLE_ICON_FILE univerxel.icns
MACOSX_BUNDLE_INFO_PLIST "resource/config/Info.plist.in")
endif()
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSRequiresCarbon</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
[Desktop Entry]
Name=Univerxel Client
TryExec=univerxel-client
Exec=univerxel-client %u
Terminal=true
Type=Application
Icon=univerxel
Categories=Game;Network;
Keywords=game;online;
StartupNotify=true
Actions=Composer;
[Desktop Entry]
Name=Univerxel
TryExec=univerxel
Exec=univerxel %u
Terminal=true
Type=Application
Icon=univerxel
Categories=Game;Network;
Keywords=game;online;
StartupNotify=true
Actions=Composer;
[Desktop Entry]
Name=Univerxel Server
TryExec=univerxel-server
Exec=univerxel-server %u
Terminal=true
Type=Application
Icon=univerxel
Categories=Game;Network;
Keywords=game;online;
StartupNotify=true
Actions=Composer;
......@@ -6,6 +6,7 @@
#include <thread>
#include <chrono>
#include "../core/utils/logger.hpp"
#include "logo.cxx"
/// Default floating window width
constexpr auto DEFAULT_WIDTH = 1280;
......@@ -84,6 +85,7 @@ bool Window::create(const CreateInfo &opt) {
glfwSetFramebufferSizeCallback(ptr, opt.pfnResize);
glfwSetWindowTitle(ptr, APP_NAME);
glfwSetWindowIcon(ptr, 1, &LOGO);
glfwSetWindowAttrib(ptr, GLFW_RESIZABLE, true);
setTargetFPS(opt.fps);
......
This diff is collapsed.
File added
univerxel.png

130 Bytes

UNIVERXEL ICON "univerxel.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,1,0
PRODUCTVERSION 0,0,1,0
EGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */
BEGIN
VALUE "CompanyName", "Shu"
VALUE "FileVersion", "0,0,1,0"
VALUE "LegalCopyright", "MIT"
VALUE "ProductName", "Univerxel"
VALUE "ProductVersion", "0,0,1,0"
VER_SPECIAL_BUILD_LINE
VER_PRIVATE_BUILD_LINE
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment