aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake2017-12-24 15:59:45 +0100
committerJake2017-12-24 15:59:45 +0100
commitf637790ce3e660be27f54c67981ca5ee9948c3c4 (patch)
tree9df4f3df37d70516592fcffbc854a73df58c6ad5
parent510f1e025902d9d21541bf02c373b18004bae3d3 (diff)
downloadaur-f637790ce3e660be27f54c67981ca5ee9948c3c4.tar.gz
Load SDL_GAMECONTROLLERCONFIG from txt file in home dir
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD7
-rw-r--r--next.install7
-rw-r--r--next.sh11
4 files changed, 21 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 14dd1a784355..25dd2aed9eb5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = next
pkgdesc = CGM rc Heli Flight Simulator
pkgver = 1.497
- pkgrel = 1
+ pkgrel = 2
url = http://www.rc-aerobatics.eu/index_e.html
install = next.install
arch = i686
@@ -9,12 +9,13 @@ pkgbase = next
license = custom
optdepends = joyutils: jscal, jstest, and jsattach utilities for the Linux joystick driver
optdepends = controllermap: Game controller mapping generator, to generate env. var. SDL_GAMECONTROLLERCONFIG
+ optdepends = antimicro: Game controller mapping generator, to generate env. var. SDL_GAMECONTROLLERCONFIG
source = http://www.cgm-online.com/secure_rc-heli-simulator/cgm-rc-heli-simulator-linux-x86-64bit-1497.zip
source = next.desktop
source = next.sh
sha256sums = c6441a6e6a1b23c342ad170abc8aeaca3f082e921b30a304446d3f10c391a31f
sha256sums = 31972ec9835d29109e490a54b49865dd69084c5552344cfe2fec9b534a5fa8a2
- sha256sums = 167bf2f656980495a5de69cc6fb0eb1063ddf065d021525cb73cf4e10425c2d8
+ sha256sums = b896113f488803acb89e53ce0c0df2db75a2ca7fbd5ea157c9ad871bad7e1ca1
pkgname = next
diff --git a/PKGBUILD b/PKGBUILD
index f3b2a6b835c8..a94ae726bff7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,13 +6,14 @@ versionminor=497
pkgname=next
pkgver=$versionmajor.$versionminor
-pkgrel=1
+pkgrel=2
pkgdesc="CGM rc Heli Flight Simulator"
arch=('i686' 'x86_64')
url="http://www.rc-aerobatics.eu/index_e.html"
license=('custom')
optdepends=( 'joyutils: jscal, jstest, and jsattach utilities for the Linux joystick driver'
- 'controllermap: Game controller mapping generator, to generate env. var. SDL_GAMECONTROLLERCONFIG')
+ 'controllermap: Game controller mapping generator, to generate env. var. SDL_GAMECONTROLLERCONFIG'
+ 'antimicro: Game controller mapping generator, to generate env. var. SDL_GAMECONTROLLERCONFIG')
install="${pkgname}.install"
source=("http://www.cgm-online.com/secure_rc-heli-simulator/cgm-rc-heli-simulator-linux-x86-64bit-$versionmajor$versionminor.zip"
@@ -21,7 +22,7 @@ source=("http://www.cgm-online.com/secure_rc-heli-simulator/cgm-rc-heli-simulato
sha256sums=('c6441a6e6a1b23c342ad170abc8aeaca3f082e921b30a304446d3f10c391a31f'
'31972ec9835d29109e490a54b49865dd69084c5552344cfe2fec9b534a5fa8a2'
- '167bf2f656980495a5de69cc6fb0eb1063ddf065d021525cb73cf4e10425c2d8')
+ 'b896113f488803acb89e53ce0c0df2db75a2ca7fbd5ea157c9ad871bad7e1ca1')
prepare() {
diff --git a/next.install b/next.install
index 6d365595afb3..93b02e20b780 100644
--- a/next.install
+++ b/next.install
@@ -2,13 +2,12 @@ post_install() {
cat << EOF
neXt is built with the Unity3D game engine. As from neXt version 1.473
and higher, neXt is built against Unity3D 5.6. From that version on,
- only SDL2 input controllers are supported. Long story short,
- you need to setup your USB controller the right way.
-
+ only SDL2 input controllers are supported.
More information can be found at:
http://next-rc-heli-simulator.xobor.de/t527f15-The-latest-version-v-can-not-find-usb-controller.html
- P.S. This is still work in progress
+ Long story short, you need to setup your USB controller the right way: Use aur/controllermap or aur/antimicro to generate the SDL config string,
+ save it into a simple text file at "~/neXt/controllerconfigs.txt" and it will get automatically loaded at the next startup.
EOF
}
diff --git a/next.sh b/next.sh
index 83886961e78e..e7e34035516b 100644
--- a/next.sh
+++ b/next.sh
@@ -1,4 +1,15 @@
#!/bin/bash
+# Put your SDL2 Config string into this file so it gets automatically set at start
+file="$HOME/neXt/controllerconfigs.txt"
+if [ -e "$file" ]; then
+ contents="`cat $file`";
+ export SDL_GAMECONTROLLERCONFIG="$contents";
+ echo "Set SDL_GAMECONTROLLERCONFIG to $contents";
+else
+ echo "No ~/neXt/controllerconfigs.txt found";
+fi;
+
+
cd /opt/next/
./neXt.x86_64 || ./neXt.x86