forked from len0rd/rockbox
Fix Sim for newer distros
__builtin found fix for rbendian.h tools/configure defines SIM_USE_BYTESWAP_H if byteswap.h is found in /usr/include/ maybe there is a better mechanism for this genshortcut.sh is a simple script to make .desktop shortcut files several newer distros don't allow you to run the simulator from the file manager, this or perhaps a different method can probably be included while building a sim at a later date. for now it can be run manually like so: similar to ../tools/configure run from your simulator folder ../tools/genshortcut.sh exepath shortname icon ex. ../tools/genshortcut.sh ./rockboxui clip+sim music-app Change-Id: Ia05d3a9349b27c5968a4a7a68b2eb480e60faec3
This commit is contained in:
parent
4e8ef17a8b
commit
9450689483
3 changed files with 52 additions and 0 deletions
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef SIM_USE_BYTESWAP_H
|
||||||
|
#include <byteswap.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __MINGW32__
|
#ifndef __MINGW32__
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
7
tools/configure
vendored
7
tools/configure
vendored
|
@ -10,6 +10,9 @@
|
||||||
# global CC options for all platforms
|
# global CC options for all platforms
|
||||||
CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
|
CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes -pipe -std=gnu99"
|
||||||
|
|
||||||
|
#newer versions GLIBC use byteswap.h
|
||||||
|
BYTESWP="/usr/include/byteswap.h"
|
||||||
|
|
||||||
# LD options for the core
|
# LD options for the core
|
||||||
LDOPTS=""
|
LDOPTS=""
|
||||||
# LD options for the core + plugins
|
# LD options for the core + plugins
|
||||||
|
@ -4471,6 +4474,10 @@ fi
|
||||||
if [ "yes" = "$simulator" ]; then
|
if [ "yes" = "$simulator" ]; then
|
||||||
echo Unsetting APPLICATION define for SIMULATOR build
|
echo Unsetting APPLICATION define for SIMULATOR build
|
||||||
unset application
|
unset application
|
||||||
|
if test -f "$BYTESWP"; then
|
||||||
|
echo Using "$BYTESWP"
|
||||||
|
extradefines="$extradefines -DSIM_USE_BYTESWAP_H=$BYTESWP"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "yes" = "$application" ]; then
|
if [ "yes" = "$application" ]; then
|
||||||
|
|
41
tools/genshortcut.sh
Executable file
41
tools/genshortcut.sh
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# __________ __ ___.
|
||||||
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
# \/ \/ \/ \/ \/
|
||||||
|
#
|
||||||
|
#shortcut.desktop generator
|
||||||
|
|
||||||
|
# Create a .desktop entry to allow the simulator to be executed in newer shells
|
||||||
|
# $1 executable
|
||||||
|
# $2 shortcut name
|
||||||
|
# $3 icon
|
||||||
|
create_shortcut() {
|
||||||
|
path="$(cd "$(dirname "$1")"; pwd)/"
|
||||||
|
execname=$(basename "$1")
|
||||||
|
shortname="$2"
|
||||||
|
icon="$3"
|
||||||
|
shortcut="$path$shortname.desktop"
|
||||||
|
|
||||||
|
echo "Creating shortcut $shortcut"
|
||||||
|
echo "path: $path"
|
||||||
|
echo "exec: $execname"
|
||||||
|
echo "icon: $icon"
|
||||||
|
|
||||||
|
echo "[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Version=1.1
|
||||||
|
Type=Application
|
||||||
|
Categories=Apps;
|
||||||
|
Terminal=false
|
||||||
|
Name=$shortname
|
||||||
|
Path=$path
|
||||||
|
Exec=$path/$execname
|
||||||
|
Icon=$icon
|
||||||
|
Name[en-US]=$shortname" > $shortcut
|
||||||
|
}
|
||||||
|
|
||||||
|
#./genshortcut.sh ./rockboxui target-sim music-app
|
||||||
|
create_shortcut $@
|
Loading…
Add table
Add a link
Reference in a new issue