Some Fixes
This commit is contained in:
parent
955c2b9b3d
commit
723d5160c8
@ -38,81 +38,20 @@ target_compile_definitions(launcher PRIVATE _FILE_OFFSET_BITS=64)
|
|||||||
install(TARGETS launcher DESTINATION "${MCPI_INSTALL_DIR}")
|
install(TARGETS launcher DESTINATION "${MCPI_INSTALL_DIR}")
|
||||||
install_symlink("../${MCPI_INSTALL_DIR}/launcher" "bin/${MCPI_APP_NAME}")
|
install_symlink("../${MCPI_INSTALL_DIR}/launcher" "bin/${MCPI_APP_NAME}")
|
||||||
|
|
||||||
# Install Desktop Entry
|
# Data
|
||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop"
|
set(DATA_DIR "data")
|
||||||
"[Desktop Entry]\n"
|
set_and_mkdir(CONFIGURED_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/${DATA_DIR}")
|
||||||
"Name=${MCPI_APP_TITLE}\n"
|
function(configure_and_install_data input_name output_path output_name)
|
||||||
"Comment=Fun with Blocks\n"
|
set(configured_path "${CONFIGURED_DATA_DIR}/${input_name}")
|
||||||
"Icon=${MCPI_APP_ID}\n"
|
configure_file("${DATA_DIR}/${input_name}" "${configured_path}" ESCAPE_QUOTES)
|
||||||
"Exec=${MCPI_APP_NAME}\n"
|
install(
|
||||||
"Type=Application\n"
|
FILES "${configured_path}"
|
||||||
"Categories=Game;\n"
|
DESTINATION "${MCPI_SHARE_DIR}/${output_path}"
|
||||||
"Terminal=false\n"
|
RENAME "${output_name}"
|
||||||
"StartupNotify=false\n"
|
)
|
||||||
"StartupWMClass=${MCPI_APP_ID}\n"
|
endfunction()
|
||||||
)
|
configure_and_install_data(launcher.desktop applications "${MCPI_APP_ID}.desktop")
|
||||||
install(
|
configure_and_install_data(appstream.xml metainfo "${MCPI_APP_ID}.appdata.xml")
|
||||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/launcher.desktop"
|
|
||||||
DESTINATION "${MCPI_SHARE_DIR}/applications"
|
|
||||||
RENAME "${MCPI_APP_ID}.desktop"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Install AppStream Metadata
|
|
||||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml"
|
|
||||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
|
||||||
"<component type=\"desktop\">\n"
|
|
||||||
" <id>${MCPI_APP_ID}</id>\n"
|
|
||||||
" <name>${MCPI_APP_TITLE}</name>\n"
|
|
||||||
" <metadata_license>CC0-1.0</metadata_license>\n"
|
|
||||||
" <summary>Fun with Blocks</summary>\n"
|
|
||||||
" <description>\n"
|
|
||||||
" <p>Minecraft: Pi Edition Modding Project.</p>\n"
|
|
||||||
" <p>NOTE: This is not verified by, affiliated with, or supported by Mojang or Microsoft.</p>\n"
|
|
||||||
" </description>\n"
|
|
||||||
" <url type=\"homepage\">${MCPI_REPO}</url>\n"
|
|
||||||
" <launchable type=\"desktop-id\">${MCPI_APP_ID}.desktop</launchable>\n"
|
|
||||||
" <provides>\n"
|
|
||||||
" <id>${MCPI_APP_ID}.desktop</id>\n"
|
|
||||||
" </provides>\n"
|
|
||||||
" <project_license>LicenseRef-proprietary</project_license>\n"
|
|
||||||
" <developer_name>${MCPI_AUTHOR} & Mojang AB</developer_name>\n"
|
|
||||||
" <content_rating type=\"oars-1.0\">\n"
|
|
||||||
" <content_attribute id=\"violence-cartoon\">moderate</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"violence-fantasy\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"violence-realistic\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"violence-bloodshed\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"violence-sexual\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"drugs-alcohol\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"drugs-narcotics\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"drugs-tobacco\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"sex-nudity\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"sex-themes\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"language-profanity\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"language-humor\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"language-discrimination\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"social-chat\">intense</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"social-info\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"social-audio\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"social-location\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"social-contacts\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"money-purchasing\">none</content_attribute>\n"
|
|
||||||
" <content_attribute id=\"money-gambling\">none</content_attribute>\n"
|
|
||||||
" </content_rating>\n"
|
|
||||||
" <releases>\n"
|
|
||||||
" <release version=\"${MCPI_VERSION}\" date=\"${MCPI_VERSION_DATE}\"></release>\n"
|
|
||||||
" </releases>\n"
|
|
||||||
" <screenshots>\n"
|
|
||||||
" <screenshot type=\"default\">\n"
|
|
||||||
" <image>${MCPI_REPO}/raw/branch/master/images/start.png</image>\n"
|
|
||||||
" </screenshot>\n"
|
|
||||||
" </screenshots>\n"
|
|
||||||
"</component>\n"
|
|
||||||
)
|
|
||||||
install(
|
|
||||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/appstream.xml"
|
|
||||||
DESTINATION "${MCPI_SHARE_DIR}/metainfo"
|
|
||||||
RENAME "${MCPI_APP_ID}.appdata.xml"
|
|
||||||
)
|
|
||||||
|
|
||||||
# AppImage
|
# AppImage
|
||||||
if(MCPI_IS_APPIMAGE_BUILD)
|
if(MCPI_IS_APPIMAGE_BUILD)
|
||||||
|
48
launcher/data/appstream.xml
Normal file
48
launcher/data/appstream.xml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop">
|
||||||
|
<id>${MCPI_APP_ID}</id>
|
||||||
|
<name>${MCPI_APP_TITLE}</name>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<summary>Fun with Blocks</summary>
|
||||||
|
<description>
|
||||||
|
<p>Minecraft: Pi Edition Modding Project.</p>
|
||||||
|
<p>NOTE: This is not verified by, affiliated with, or supported by Mojang or Microsoft.</p>
|
||||||
|
</description>
|
||||||
|
<url type="homepage">${MCPI_REPO}</url>
|
||||||
|
<launchable type="desktop-id">${MCPI_APP_ID}.desktop</launchable>
|
||||||
|
<provides>
|
||||||
|
<id>${MCPI_APP_ID}.desktop</id>
|
||||||
|
</provides>
|
||||||
|
<project_license>LicenseRef-proprietary</project_license>
|
||||||
|
<developer_name>${MCPI_AUTHOR} & Mojang AB</developer_name>
|
||||||
|
<content_rating type="oars-1.0">
|
||||||
|
<content_attribute id="violence-cartoon">moderate</content_attribute>
|
||||||
|
<content_attribute id="violence-fantasy">none</content_attribute>
|
||||||
|
<content_attribute id="violence-realistic">none</content_attribute>
|
||||||
|
<content_attribute id="violence-bloodshed">none</content_attribute>
|
||||||
|
<content_attribute id="violence-sexual">none</content_attribute>
|
||||||
|
<content_attribute id="drugs-alcohol">none</content_attribute>
|
||||||
|
<content_attribute id="drugs-narcotics">none</content_attribute>
|
||||||
|
<content_attribute id="drugs-tobacco">none</content_attribute>
|
||||||
|
<content_attribute id="sex-nudity">none</content_attribute>
|
||||||
|
<content_attribute id="sex-themes">none</content_attribute>
|
||||||
|
<content_attribute id="language-profanity">none</content_attribute>
|
||||||
|
<content_attribute id="language-humor">none</content_attribute>
|
||||||
|
<content_attribute id="language-discrimination">none</content_attribute>
|
||||||
|
<content_attribute id="social-chat">intense</content_attribute>
|
||||||
|
<content_attribute id="social-info">none</content_attribute>
|
||||||
|
<content_attribute id="social-audio">none</content_attribute>
|
||||||
|
<content_attribute id="social-location">none</content_attribute>
|
||||||
|
<content_attribute id="social-contacts">none</content_attribute>
|
||||||
|
<content_attribute id="money-purchasing">none</content_attribute>
|
||||||
|
<content_attribute id="money-gambling">none</content_attribute>
|
||||||
|
</content_rating>
|
||||||
|
<releases>
|
||||||
|
<release version="${MCPI_VERSION}" date="${MCPI_VERSION_DATE}" />
|
||||||
|
</releases>
|
||||||
|
<screenshots>
|
||||||
|
<screenshot type="default">
|
||||||
|
<image>${MCPI_REPO}/raw/branch/master/images/start.png</image>
|
||||||
|
</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
</component>
|
10
launcher/data/launcher.desktop
Normal file
10
launcher/data/launcher.desktop
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=${MCPI_APP_TITLE}
|
||||||
|
Comment=Fun with Blocks
|
||||||
|
Icon=${MCPI_APP_ID}
|
||||||
|
Exec=${MCPI_APP_NAME}
|
||||||
|
Type=Application
|
||||||
|
Categories=Game;
|
||||||
|
Terminal=false
|
||||||
|
StartupNotify=false
|
||||||
|
StartupWMClass=${MCPI_APP_ID}
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
import * as path from 'node:path';
|
import * as path from 'node:path';
|
||||||
import * as fs from 'node:fs';
|
import * as fs from 'node:fs';
|
||||||
import { err, run, makeExecutable, getDebianVersion, getScriptsDir, info } from './lib/util.mjs';
|
import { err, run, makeExecutable, getDebianVersion, getScriptsDir, info, doesPackageExist } from './lib/util.mjs';
|
||||||
import { parseOptions, Enum, Architectures } from './lib/options.mjs';
|
import { parseOptions, Enum, Architectures } from './lib/options.mjs';
|
||||||
|
|
||||||
// Check System
|
// Check System
|
||||||
@ -125,11 +125,16 @@ handlers.set(Modes.Build, function () {
|
|||||||
|
|
||||||
// Testing Dependencies
|
// Testing Dependencies
|
||||||
handlers.set(Modes.Test, function () {
|
handlers.set(Modes.Test, function () {
|
||||||
|
let glib = 'libglib2.0-0';
|
||||||
|
const newerGlib = glib + 't64';
|
||||||
|
if (doesPackageExist(newerGlib)) {
|
||||||
|
glib = newerGlib;
|
||||||
|
}
|
||||||
addPackageForHost(
|
addPackageForHost(
|
||||||
'libc6',
|
'libc6',
|
||||||
'libstdc++6',
|
'libstdc++6',
|
||||||
'libopenal1',
|
'libopenal1',
|
||||||
'libglib2.0-0'
|
glib
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -25,6 +25,15 @@ export function run(command) {
|
|||||||
err(e);
|
err(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export function doesPackageExist(name) {
|
||||||
|
try {
|
||||||
|
info('Checking If Package Exists: ' + name);
|
||||||
|
child_process.execFileSync('apt-cache', ['show', name], {stdio: 'ignore'});
|
||||||
|
return true;
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Create Directory
|
// Create Directory
|
||||||
export function createDir(dir, clean) {
|
export function createDir(dir, clean) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user