Browse Source

Added automation OPK package

root 2 years ago
parent
commit
4b0f9f88d8
3 changed files with 38 additions and 1 deletions
  1. 1 1
      .gitignore
  2. BIN
      icons/picodrive.png
  3. 37 0
      package

+ 1 - 1
.gitignore

@@ -9,6 +9,7 @@
 *.dylib
 *.so
 *.a
+*.opk
 tags
 cscope.out
 config.mak
@@ -26,7 +27,6 @@ libs/
 obj/
 .opk_data
 PicoDrive
-PicoDrive.opk
 pico_int_offs.h
 amalgamate
 textfilter

BIN
icons/picodrive.png


+ 37 - 0
package

@@ -0,0 +1,37 @@
+#!/bin/sh
+
+mkdir opk/
+git pull
+./submodule_update.sh
+cp icons/picodrive.png opk/
+cp AUTHORS COPYING README opk/
+
+cd /opt/FunKey-OS
+rm -rf FunKey/output/build/picodrive-*
+git pull
+make
+cp FunKey/output/target/usr/games/PicoDrive /opt/picodrive-irixxxx/opk
+cd -
+
+# https://unix.stackexchange.com/questions/219268/how-to-add-new-lines-when-using-echo
+print()
+	case    ${IFS- } in
+	(\ *)   printf  %b\\n "$*";;
+	(*)     IFS=\ $IFS
+	printf  %b\\n "$*"
+	IFS=${IFS#?}
+esac
+
+# Create GMenu2X entry file plus other things
+
+print '[Desktop Entry]
+Name=Mega Drive
+Comment=MS/MD/MCD/32X emulator
+Exec=PicoDrive %f
+Icon=picodrive
+Categories=emulators;
+SelectorFilter=zip,md,smd,sms,32x,cue,cso,iso,chd' > opk/picodrive.funkey-s.desktop
+
+mksquashfs opk/ picodrive_v1.98_funkey-s.opk -all-root -noappend -no-exports -no-xattrs
+
+rm -rf opk/