-
-
Notifications
You must be signed in to change notification settings - Fork 855
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NOISSUE further changes towards system installed layout
- Loading branch information
Showing
9 changed files
with
155 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
macro(fix_project_version) | ||
if (NOT PROJECT_VERSION_PATCH) | ||
set(PROJECT_VERSION_PATCH 0) | ||
endif() | ||
|
||
if (NOT PROJECT_VERSION_TWEAK) | ||
set(PROJECT_VERSION_TWEAK 0) | ||
endif() | ||
endmacro() | ||
|
||
macro(add_project_meta FILES_TO_INCLUDE) | ||
if (NOT RESOURCE_FOLDER) | ||
set(RESOURCE_FOLDER branding) | ||
endif() | ||
|
||
if (NOT ICON_NAME) | ||
set(ICON_NAME ${PROJECT_NAME}) | ||
endif() | ||
|
||
if (APPLE) | ||
set(ICON_FILE branding/${ICON_NAME}.icns) | ||
elseif (WIN32) | ||
set(ICON_FILE branding/${ICON_NAME}.ico) | ||
endif() | ||
|
||
if (WIN32) | ||
set(WIN_MANIFEST_IDENTIFIER ${IDENTIFIER}) | ||
configure_file("${PROJECT_SOURCE_DIR}/cmake/windows_metafile.rc.in" | ||
"windows_metafile.rc" | ||
) | ||
configure_file("${PROJECT_SOURCE_DIR}/cmake/windows.manifest.in" | ||
"windows.manifest" | ||
) | ||
set(RES_FILES "windows_metafile.rc") | ||
set(CMAKE_RC_COMPILER_INIT windres) | ||
ENABLE_LANGUAGE(RC) | ||
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>") | ||
endif() | ||
|
||
if (APPLE) | ||
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) | ||
|
||
# Identify MacOS bundle | ||
set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) | ||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}) | ||
set(MACOSX_BUNDLE_LONG_VERSION_STRING ${PROJECT_VERSION}) | ||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") | ||
set(MACOSX_BUNDLE_COPYRIGHT ${COPYRIGHT}) | ||
set(MACOSX_BUNDLE_GUI_IDENTIFIER ${IDENTIFIER}) | ||
set(MACOSX_BUNDLE_ICON_FILE ${ICON_NAME}) | ||
endif() | ||
|
||
if (APPLE) | ||
set(${FILES_TO_INCLUDE} ${ICON_FILE}) | ||
elseif (WIN32) | ||
set(${FILES_TO_INCLUDE} ${RES_FILES}) | ||
endif() | ||
endmacro() | ||
|
||
macro(init_os_bundle) | ||
if (APPLE) | ||
set(OS_BUNDLE MACOSX_BUNDLE) | ||
elseif (WIN32) | ||
set(OS_BUNDLE WIN32) | ||
endif() | ||
endmacro() | ||
|
||
init_os_bundle() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> | ||
<assemblyIdentity name="@WIN_MANIFEST_IDENTIFIER@" type="amd64" version="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.@PROJECT_VERSION_TWEAK@" /> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<security> | ||
<requestedPrivileges> | ||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
<dependency> | ||
<dependentAssembly> | ||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df" language="*"/> | ||
</dependentAssembly> | ||
</dependency> | ||
<description>Custom Minecraft launcher for managing multiple installs.</description> | ||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
<application> | ||
<!--The ID below indicates app support for Windows Vista --> | ||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> | ||
<!--The ID below indicates app support for Windows 7 --> | ||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> | ||
<!--The ID below indicates app support for Windows 8 --> | ||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> | ||
<!--The ID below indicates app support for Windows 8.1 --> | ||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> | ||
<!--The ID below indicates app support for Windows 10, 11 --> | ||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> | ||
</application> | ||
</compatibility> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef WIN32_LEAN_AND_MEAN | ||
#define WIN32_LEAN_AND_MEAN | ||
#endif | ||
#include <windows.h> | ||
|
||
IDI_ICON1 ICON DISCARDABLE "@ICON_FILE@" | ||
1 RT_MANIFEST "windows.manifest" | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@ | ||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PROJECT_VERSION_TWEAK@ | ||
FILEFLAGS 0x0L | ||
FILEFLAGSMASK 0x3fL | ||
FILEOS 0x00040004L | ||
FILETYPE 0x1L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "000004b0" | ||
BEGIN | ||
VALUE "CompanyName", "@COMPANY@" | ||
VALUE "FileDescription", "@DESCRIPTION@" | ||
VALUE "FileVersion", "@PROJECT_VERSION@" | ||
VALUE "LegalCopyright", "@COPYRIGHT@" | ||
VALUE "InternalName", "@PROJECT_NAME@" | ||
VALUE "OriginalFilename", "@PROJECT_NAME@.exe" | ||
VALUE "ProductName", "@PROJECT_NAME@" | ||
VALUE "ProductVersion", "@PROJECT_VERSION@" | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x0000, 0x04b0 // Unicode | ||
END | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters