+ Experiment with snappy / snapcraft

This commit is contained in:
Reinhard Pointner 2016-05-19 03:29:33 +08:00
parent 4ed7416437
commit 0ef4691a8c
3 changed files with 114 additions and 16 deletions

View File

@ -1,4 +1,7 @@
#!/bin/sh
export LC_ALL="en.utf-8"
export PATH="$SNAP/bin:$SNAP/usr/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu"
@ -7,7 +10,7 @@ export LD_LIBRARY_PATH="$SNAP/usr/lib/x86_64-linux-gnu/mesa:$LD_LIBRARY_PATH"
export JAVA_HOME="$SNAP/usr/lib/jvm/default-java"
export PATH="$SNAP/usr/lib/jvm/default-java/bin:$SNAP/usr/lib/jvm/default-java/jre/bin:$PATH"
export LD_LIBRARY_PATH="$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/amd64/jli:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/../lib/amd64/jli:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$SNAP/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/amd64/jli:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/../lib/amd64/jli:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:$SNAP/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/jli:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu/pulseaudio:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
@ -17,7 +20,10 @@ export APP_ROOT="$SNAP/filebot"
export APP_DATA="$SNAP_USER_DATA/data"
export APP_CACHE="$SNAP_USER_DATA/cache"
printenv
export FONTCONFIG_FILE=$SNAP/fonts.conf
export LIBGL_DEBUG=verbose
# export JAVA_OPTS="-Dswing.defaultlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -Dswing.systemlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel"
# start filebot
$JAVA_HOME/bin/java -Dunixfs=false -DuseGVFS=false -Dapplication.update=skip -Dapplication.deployment=usc -Dnet.filebot.UserFiles.fileChooser=JavaFX "-Dapplication.dir=$APP_DATA" "-Dapplication.cache=$APP_CACHE/ehcache.disk.store" "-Djava.io.tmpdir=$APP_CACHE/java.io.tmpdir" "-Dnet.filebot.AcoustID.fpcalc=$SNAP/usr/bin/fpcalc" $JAVA_OPTS -jar "$APP_ROOT/FileBot.jar" "$@"
$JAVA_HOME/bin/java -Dunixfs=false -DuseGVFS=true -Dapplication.update=skip -Dapplication.deployment=usc -Dnet.filebot.UserFiles.fileChooser=JavaFX "-Dapplication.dir=$APP_DATA" "-Dapplication.cache=$APP_CACHE/ehcache.disk.store" "-Djava.io.tmpdir=$APP_CACHE/java.io.tmpdir" "-Dnet.filebot.AcoustID.fpcalc=$SNAP/usr/bin/fpcalc" $JAVA_OPTS -jar "$APP_ROOT/FileBot.jar" "$@"

View File

@ -0,0 +1,88 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
<!--
DO NOT EDIT THIS FILE.
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
LOCAL CHANGES BELONG IN 'local.conf'.
The intent of this standard configuration file is to be adequate for
most environments. If you have a reasonably normal environment and
have found problems with this configuration, they are probably
things that others will also want fixed. Please submit any
problems to the fontconfig bugzilla system located at fontconfig.org
Note that the normal 'make install' procedure for fontconfig is to
replace any existing fonts.conf file with the new version. Place
any local customizations in local.conf which this file references.
Keith Packard
-->
<!-- Font directory list -->
<dir>/snap/filebot/current/usr/share/fonts</dir>
<dir>/snap/filebot/current/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
<match target="pattern">
<test qual="any" name="family">
<string>mono</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>monospace</string>
</edit>
</match>
<!--
Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans serif</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>sans-serif</string>
</edit>
</match>
<!--
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans</string>
</test>
<edit name="family" mode="assign" binding="same">
<string>sans-serif</string>
</edit>
</match>
<!--
Load local system customization file
-->
<include ignore_missing="yes">conf.d</include>
<!-- Font cache directory list -->
<cachedir>/snap/filebot/current/var/cache/fontconfig</cachedir>
<cachedir prefix="xdg">fontconfig</cachedir>
<!-- the following element will be removed in the future -->
<cachedir>~/.fontconfig</cachedir>
<config>
<!--
Rescan configuration every 30 seconds when FcFontSetList is called
-->
<rescan>
<int>30</int>
</rescan>
</config>
</fontconfig>

View File

@ -14,33 +14,37 @@ apps:
plugs:
- home
- network
- network-bind
- network-observe
- opengl
- unity7
- x11
- locale-control
parts:
filebot:
plugin: copy
files:
filebot.sh: bin/filebot
FileBot.jar: filebot/FileBot.jar
mediainfo:
plugin: nil
stage-packages:
- mediainfo
fpcalc:
plugin: nil
stage-packages:
- libchromaprint-tools
java:
fonts:
plugin: copy
files:
/usr/share/fonts: /usr/share/fonts
fonts.conf: fonts.conf
base:
plugin: jdk
source: .
stage-packages:
- libgnome2-0
- gvfs
- mediainfo
- libchromaprint-tools
- language-pack-en
- openjfx
ubuntu:
plugin: nil
stage-packages:
- fontconfig
- libpango-1.0-0
- libcanberra-gtk-module
- libcanberra-gtk0
- libcanberra-gtk3-0
- overlay-scrollbar