Merge pull request #3 from Tooloop/22.04

22.04
This commit is contained in:
Daniel Stock
2022-05-19 16:13:25 +02:00
committed by GitHub
2740 changed files with 307 additions and 368866 deletions
+1
View File
@@ -1,2 +1,3 @@
*.deb *.deb
*.zip *.zip
\#*
+77 -120
View File
@@ -1,12 +1,13 @@
# Tooloop Packages # Tooloop Packages
This repository contains all apps, that come bundled with Tooloop OS. This repository contains presentations and addons, that come bundled with
[Tooloop OS](https://github.com/Tooloop/Tooloop-OS).
Its also a great place to get information on how to build your own package. Its also a great place to get information on how to build your own package.
## Creating a package ## Package format
Tooloop Packages are ZIP files, containing a Debian package and additional images, displayed in the app center: Tooloop Packages are ZIP files, wrapping a Debian package and additional images, that are displayed in the [app center](https://github.com/Tooloop/Tooloop-Control):
package.zip package.zip
@@ -19,44 +20,37 @@ Tooloop Packages are ZIP files, containing a Debian package and additional image
└─ ... └─ ...
**Debian package** ## The Debian package
Create a folder structure with your stuff:
Your-App This is the folder structure:
├─ media/ (your image files) ```
│ ├─ some-image.jpg
├─ media/ (your image files)
│ ├─ some-image.jpg
│ └─ ...
package/ (the Debian package)
├─ DEBIAN/
│ ├─ control (mandatory)
│ ├─ postinst (optional)
│ ├─ postrm (optional)
│ └─ ...
└─ assets/
├─ presentation/
│ ├─ LICENSE.md
│ ├─ README.md
│ ├─ start-presentation.sh (mandatory)
│ ├─ stop-presentation.sh (mandatory)
│ └─ ... │ └─ ...
package/ (the Debian package) └─ data/
├─ DEBIAN/ └─ ...
│ ├─ control (mandatory) ```
│ ├─ postinst (optional)
│ ├─ postrm (optional)
│ └─ ...
├─ assets/
│ ├─ presentation/
│ │ ├─ LICENSE.md
│ │ ├─ README.md
│ │ ├─ start-presentation.sh (mandatory)
│ │ ├─ stop-presentation.sh (mandatory)
│ │ └─ ...
│ │
│ └─ data/
│ └─ ...
└─ opt/
└─ tooloop/
└─ settings─server/
└─ installed_app/
├─ controller.py
└─ settings.html
The `/DEBIAN` folder contains the package information and some control files. All other folders are simply copied to disk for you.
The `DEBIAN` contains the package information and some control files.
All other folders except simply copied to disk for you.
**The DEBIAN/control file** **The DEBIAN/control file**
@@ -66,105 +60,68 @@ Its used to display information in the app center.
https://linux.die.net/man/5/deb-control https://linux.die.net/man/5/deb-control
Package: tooloop-processing-example ```YAML
# Use semantic versioning https://semver.org/ Package: my-app
Version: 0.9.0 # Use semantic versioning https://semver.org/
Maintainer: vollstock <daniel@vollstock.de> Version: 1.0.0
Homepage: https://www.vollstock.de Maintainer: Tooloop Multimedia
Bugs: https://github.com/vollstock/Tooloop-Examples Homepage: https://www.tooloop.de
# One of "tooloop/presentation", "tooloop/addon" Bugs: https://github.com/Tooloop/Tooloop-Packages
Section: tooloop/presentation # One of "tooloop/presentation", "tooloop/addon"
# One of "amd64", "armvl7", "all" Section: tooloop/presentation
Architecture: amd64 Architecture: amd64
Depends: tooloop-processing tooloop-processing (= 3.4.0) Depends: tooloop-transparent-cursor
# App name shown in the app center. # App name shown in the app center.
Name: Processing Example Name: My App
# First line is the short description shown in the app center. # The thumbnail shown in the app center
# All following lines are used as detailed description. Thumbnail: my-app-thumbnail.jpg
Description: A simple example, how to make a processing app # The media files, shown in the detail view of the package
Longer description… # can be JPGs and PNGs
# The thumbnail shown in the app center Media: my-app-image1.jpg, my-app-image2.png
Thumbnail: thumbnail.jpg # First line is the short description shown in the app center.
# The media files, shown in the detail view of the package # All following lines are used as detailed description.
# can be JPGs and PNGs Description: A simple example, how to make a processing app
Media: image1.jpg, Longer description, indented by one space
image2.png .
empty lines have just a single point
*Markdown* _is_ ok
ends with one additional line break
```
**Scripts** **Scripts**
You can add scripts in `DEBIAN` to further customize installation: You can add scripts in `DEBIAN` to further customize installation:
| script | when | | script | when |
|----------|---------------------| | -------- | ------------------- |
| preinst | before installation | | preinst | before installation |
| postinst | after installation | | postinst | after installation |
| prerm | before removal | | prerm | before removal |
| postrm | after removal | | postrm | after removal |
The scripts can be used to e. g. reload the settings server: Use those to create folders, auto-generate files, cleanup, etc.
#!/bin/bash
set -e
systemctl restart tooloop-settings-server
exit 0
**Building the Debian package** ## Building and deploying your package
dpkg --build packagefolder packagename_version_architecture.deb There scripts that you can use to build and deploy your package on a Tooloop OS Box. In fact, its these scripts that are used by the Tooloop OS installer.
Start by simply copying the `hello-world` folder and hack away from there.
e.g. 1. Clone this repo on a Tooloop Box
2. Add your package folder (e. g. by copying the hello-world example)
dpkg --build kiosk-browser tooloop-processing-example_0.9.0_amd64.deb 3. Build packages
```bash
./build.sh
```
4. Deploy packages
```bash
## Setting up the local .deb repository ./deploy.sh
```
https://askubuntu.com/questions/170348/how-to-create-a-local-apt-repository#176546 5. Restart the control center
```bash
Create a packages directory and a dirctory where installed addons will live in: sudo systemctyl restart tooloop-control.service
```
mkdir /assets/packages /assets/addons
chown -R tooloop:tooloop /assets
Add `.keep` files so apt will not remove folders when purging packages:
touch /assets/addons/.keep
touch /assets/presentation/.keep
touch opt/tooloop/settings─server/installed_app/.keep
Create a script that will scan packages and create a RELEASE file apt-get update can read
`/opt/tooloop/scripts/update-tooloop-packages`
#! /bin/bash
cd /assets/packages
# Generate the Packages file
dpkg-scanpackages . /dev/null > Packages
gzip --keep --force -9 Packages
# Generate the Release file
cat conf/distributions > Release
# The Date: field has the same format as the Debian package changelog entries,
# that is, RFC 2822 with time zone +0000
echo -e "Date: `LANG=C date -Ru`" >> Release
# Release must contain MD5 sums of all repository files (in a simple repo just the Packages and Packages.gz files)
echo -e 'MD5Sum:' >> Release
printf ' '$(md5sum Packages.gz | cut --delimiter=' ' --fields=1)' %16d Packages.gz' $(wc --bytes Packages.gz | cut --delimiter=' ' --fields=1) >> Release
printf '\n '$(md5sum Packages | cut --delimiter=' ' --fields=1)' %16d Packages' $(wc --bytes Packages | cut --delimiter=' ' --fields=1) >> Release
# Release must contain SHA256 sums of all repository files (in a simple repo just the Packages and Packages.gz files)
echo -e '\nSHA256:' >> Release
printf ' '$(sha256sum Packages.gz | cut --delimiter=' ' --fields=1)' %16d Packages.gz' $(wc --bytes Packages.gz | cut --delimiter=' ' --fields=1) >> Release
printf '\n '$(sha256sum Packages | cut --delimiter=' ' --fields=1)' %16d Packages' $(wc --bytes Packages | cut --delimiter=' ' --fields=1) >> Release
# Get apt to see the changes
sudo apt-get update
## Useful commands ## Useful commands
Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

+30
View File
@@ -0,0 +1,30 @@
Package: tooloop-glmark2
Version: 1.0.0
Maintainer: Tooloop Multimedia
Homepage: https://www.tooloop.de
Bugs: https://github.com/glmark2/glmark2
Section: tooloop/presentation
Depends: glmark2
Architecture: amd64
Name: glmark2
Thumbnail: glmark2-thumbnail.jpg
Media: glmark2-jellyfish.jpg, glmark2-buffer.jpg, glmark2-refract.jpg, glmark2-shadow.jpg
Description: OpenGL 2.0 and ES 2.0 benchmark
This is a meta package installing [glmark2](https://github.com/glmark2/glmark2).
glmark2 runs several tests and returns a final total score afterwards.
Its useful to compare and benchmark different computers or graphics cards.
.
### Testing
.
All test scenes are run at a resolution of 1920 × 1080 px and results are
stored in `/assets/logs/glmark2.txt`
.
If you want to change test parameters, simply change the command in
`/assets/presentation/start-presentation.sh`. Please refer to the
[glmark2 man pages](https://manpages.ubuntu.com/manpages/jammy/man1/glmark2.1.html)
to learn about all options.
.
### Attribution
.
glmark2 is developed by Alexandros Frantzis and Jesse Barker based on the
original glmark benchmark by Ben Smith.
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
touch /assets/logs/glmark2.txt
chown tooloop:tooloop /assets/logs/glmark2.txt
exit 0
@@ -0,0 +1,5 @@
#!/bin/bash
glmark2 --annotate --size 1920x1080 > /assets/logs/glmark2.txt &
exit 0
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
pkill java killall glmark2
exit 0 exit 0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

-46
View File
@@ -1,46 +0,0 @@
Package: tooloop-gstreamer
Maintainer: vollstock <daniel@vollstock.de>
Homepage: https://www.vollstock.de
Architecture: all
Version: 1.8.3
Section: tooloop/addon
Depends: mpg123,
libmpg123-dev,
gstreamer1.0-doc,
gstreamer1.0-tools,
gstreamer1.0-alsa,
gstreamer1.0-libav,
gstreamer1.0-pulseaudio,
gstreamer1.0-plugins-base,
gstreamer1.0-plugins-base-doc,
gstreamer1.0-plugins-base-dbg,
gstreamer1.0-plugins-good,
gstreamer1.0-plugins-good-doc,
gstreamer1.0-plugins-good-dbg,
gstreamer1.0-plugins-bad,
gstreamer1.0-plugins-bad-doc,
gstreamer1.0-plugins-bad-dbg,
gstreamer1.0-plugins-ugly,
gstreamer1.0-plugins-ugly-doc,
gstreamer1.0-plugins-ugly-dbg,
gstreamer1.0-vaapi,
gstreamer1.0-vaapi-doc,
gstreamer1.0-x,
libgstreamer1.0-0,
libgstreamer1.0-0-dbg,
libgstreamer1.0-dev,
va-driver-all,
libva-glx2,
libva-x11-2,
vainfo,
libvdpau-va-gl1,
vdpau-driver-all,
vdpauinfo,
vdpau-va-driver
Name: Gstreamer
Description: Library for constructing graphs of media-handling components
GStreamer is a library for constructing graphs of media-handling components.
The applications it supports range from simple Ogg/Vorbis playback, audio/video
streaming to complex audio (mixing) and video (non-linear editing) processing.
Thumbnail: gstreamer-thumbnail.png
+1
View File
@@ -0,0 +1 @@
*.deb
Binary file not shown.

After

Width:  |  Height:  |  Size: 862 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

+21
View File
@@ -0,0 +1,21 @@
Package: hello-world
Version: 1.0.0
Maintainer: Tooloop Multimedia
Homepage: https://www.tooloop.de
Bugs: https://www.github.com/Tooloop/Tooloop-Packages
Section: tooloop/presentation
Architecture: amd64
Name: Hello World
Thumbnail: hello-world-thumbnail.jpg
Media: hello-world-image-1.jpg, hello-world-image-2.jpg, hello-world-image-3.jpg
Description: Example package skeleton
### Just an example
.
This package is meant as a bare example to get you started packaging your own
presentation. Use it as a skeleton. For more details, please see the
[README](https://github.com/Tooloop/Tooloop-Packages).
.
### Credits
.
Photos by [NASA](https://unsplash.com/@nasa?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
on [Unsplash](https://unsplash.com/@nasa?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
# Do something after package installation
exit 0
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
# Do something after package removal
exit 0
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
# Do something before package installation
exit 0
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
# Do something before package removal
exit 0
@@ -0,0 +1,8 @@
#!/bin/bash
# here comes everything, you want Tooloop to run
# don't forget to put an "&" at the end of each line, e.g. xeyes &
xeyes &
exit 0
@@ -0,0 +1,8 @@
#!/bin/bash
# here comes everything, you need to stop the running presentation
# basically kill or stop everything you started in `start-presentation.sh`
kill $(pidof xeyes)
exit 0
+8 -7
View File
@@ -1,14 +1,15 @@
Package: tooloop-image-slideshow Package: tooloop-image-slideshow
Version: 0.1.0 Version: 1.0.0
Maintainer: vollstock <daniel@vollstock.de> Maintainer: Tooloop Multimedia
Homepage: https://www.vollstock.de Homepage: https://www.tooloop.de
Bugs: https://github.com/vollstock/Tooloop-Examples Bugs: https://github.com/Tooloop/Tooloop-Packages
Section: tooloop/presentation Section: tooloop/presentation
Architecture: all Architecture: all
Depends: chromium-browser Depends: chromium-browser
Name: Image slideshow Name: Image slideshow
Description: Image slideshow with smooth transitions Thumbnail: image-slideshow-thumbnail.jpg
Description: A simple image slideshow
A simple example app using the chromium browser and some javascript to display A simple example app using the chromium browser and some javascript to display
a fullscreen image slideshow. a fullscreen image slideshow.
Thumbnail: image-slideshow-thumbnail.jpg .
The images are stored in the `/assets/data` folder.
File diff suppressed because one or more lines are too long
@@ -1,67 +1,82 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="UTF-8">
<title>Slideshow</title> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<style media="screen"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
html, body { <title>Slideshow</title>
height: 100%; <style media="screen">
margin: 0; html,
padding: 0; body {
} height: 100%;
div { margin: 0;
height: 100%; padding: 0;
width: 100%; background: black;
position:absolute; }
z-index:1;
background-size: cover; .slide {
background-position: center center; height: 100%;
} width: 100%;
div.active{ position: absolute;
z-index:3 z-index: 1;
} background-size: cover;
</style> background-position: center center;
opacity: 0;
transition: opacity 1s;
}
.active {
opacity: 1;
z-index: 2;
}
.next {
z-index: 3;
}
</style>
</head> </head>
<body> <body>
<div id="slideshow">
<div class="slide active" style="background-image: url(/media/assets/data/image1.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image2.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image3.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image4.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image5.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image6.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image7.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image8.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image9.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image10.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image11.jpg)"></div>
<div class="slide" style="background-image: url(/media/assets/data/image12.jpg)"></div>
</div>
<div id="slideshow"> <script type="text/javascript">
<div style="background-image: url(/assets/data/image1.jpg)" class="active"></div> var active, next;
<div style="background-image: url(/assets/data/image2.jpg)" ></div>
<div style="background-image: url(/assets/data/image3.jpg)" ></div>
<div style="background-image: url(/assets/data/image4.jpg)" ></div>
<div style="background-image: url(/assets/data/image5.jpg)" ></div>
<div style="background-image: url(/assets/data/image6.jpg)" ></div>
<div style="background-image: url(/assets/data/image7.jpg)" ></div>
<div style="background-image: url(/assets/data/image8.jpg)" ></div>
<div style="background-image: url(/assets/data/image9.jpg)" ></div>
<div style="background-image: url(/assets/data/image10.jpg)" ></div>
<div style="background-image: url(/assets/data/image11.jpg)" ></div>
<div style="background-image: url(/assets/data/image12.jpg)" ></div>
</div>
<script type='application/javascript' src='jquery-3.1.1.min.js'></script> function nextImage() {
<script type="text/javascript"> active = document.querySelector("#slideshow .slide.active");
active.classList.remove("active");
function nextImage() { active = getNextSlide(active);
var $active = $('#slideshow .active'); active.classList.add("active");
var $next = ($active.next().length > 0) ? $active.next() : $('#slideshow div:first'); active.classList.remove("next");
$next.css('z-index', 2); // move the next image up the pile next = getNextSlide(active)
next.classList.add("next")
}
$active.fadeOut(500, function() { // fade out the top image function getNextSlide(slide) {
$active.css('z-index',1).show().removeClass('active'); // reset the z-index and unhide the image return slide.nextElementSibling ? slide.nextElementSibling : document.querySelectorAll("#slideshow .slide")[0];
$next.css('z-index',3).addClass('active'); // make the next image the top one }
});
}
$(document).ready(function(){ document.addEventListener("DOMContentLoaded", function () {
setInterval('nextImage()', 7000); setInterval("nextImage()", 7000);
}) });
</script> </script>
</body> </body>
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
COMMAND="chromium-browser --noerrdialogs --kiosk --incognito /assets/presentation/slideshow.html" COMMAND="chromium-browser --noerrdialogs --kiosk --incognito /media/assets/presentation/slideshow.html"
if [ $EUID == 0 ]; then if [ $EUID == 0 ]; then
su tooloop -c "$COMMAND" & su tooloop -c "$COMMAND" &
@@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
pkill chromium killall chrome
exit 0 exit 0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

@@ -1,35 +0,0 @@
Package: tooloop-intel-display-driver
Maintainer: vollstock <daniel@vollstock.de>
Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Homepage: https://www.x.org/
Architecture: amd64
Version: 0.1.0
Section: tooloop/addon
Depends: xserver-xorg-video-intel,
va-driver-all,
libva-glx2,
libva-x11-2,
vainfo,
libvdpau-va-gl1,
vdpau-driver-all,
vdpauinfo,
vdpau-va-driver
Provides: xorg-driver-video
Download-Size: 728 kB
Installed-Size: 3,259 kB
Name: Intel Display Driver
Description: X.Org X server -- Intel i8xx, i9xx display driver
This package provides the driver for the Intel i8xx and i9xx family
of chipsets, including i810, i815, i830, i845, i855, i865, i915, i945
and i965 series chips.
.
This package also provides XvMC (XVideo Motion Compensation) drivers
for i810/i815 and i9xx and newer chipsets.
.
This package is built from the X.org xf86-video-intel driver module.
.
The use of this driver is discouraged if your hw is new enough (ca.
2007 and newer). You can try uninstalling this driver and let the
server use it's builtin modesetting driver instead.
Thumbnail: intel-display-driver-thumbnail.png
+4 -4
View File
@@ -1,8 +1,8 @@
Package: tooloop-kiosk-browser Package: tooloop-kiosk-browser
Version: 0.1.0 Version: 1.0.0
Maintainer: vollstock Maintainer: Tooloop Multimedia
Homepage: https://www.vollstock.de Homepage: https://www.tooloop.de
Bugs: https://github.com/vollstock/Tooloop-Examples Bugs: https://github.com/Tooloop/Tooloop-Packages
Section: tooloop/presentation Section: tooloop/presentation
Architecture: amd64 Architecture: amd64
Depends: chromium-browser Depends: chromium-browser
+24 -22
View File
@@ -2,23 +2,21 @@
<meta charset="utf-8"> <meta charset="utf-8">
<html> <html>
<head> <head>
<title>Simple Kiosk</title> <title>Simple Kiosk</title>
<style type="text/css"> <style type="text/css">
canvas { canvas {
display: block; display: block;
vertical-align: bottom;
} }
#particles { #particles {
position:absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #172e4d; background-color: #172e4d;
/*background: radial-gradient(ellipse at center, #224a5e 0%,#172e4d 100%);*/ background: radial-gradient(ellipse at center, #224a5e 0%, #172e4d 50%, #050b23 100%);
background: radial-gradient(ellipse at center, #224a5e 0%,#172e4d 50%,#050b23 100%);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: 50% 50%; background-position: 50% 50%;
@@ -27,7 +25,7 @@
#box { #box {
width: 50%; width: 50%;
position: absolute; position: absolute;
background: rgba(255,255,255,0.9); background: rgba(255, 255, 255, 0.9);
left: 25%; left: 25%;
top: 25%; top: 25%;
border-radius: 2px; border-radius: 2px;
@@ -35,9 +33,12 @@
max-width: 640px; max-width: 640px;
box-sizing: border-box; box-sizing: border-box;
padding: 50px 40px 50px 40px; padding: 50px 40px 50px 40px;
-webkit-user-select: none; /* Chrome all / Safari all */ -webkit-user-select: none;
-moz-user-select: none; /* Firefox all */ /* Chrome all / Safari all */
-ms-user-select: none; /* IE 10+ */ -moz-user-select: none;
/* Firefox all */
-ms-user-select: none;
/* IE 10+ */
user-select: none; user-select: none;
} }
@@ -51,7 +52,10 @@
font-weight: lighter; font-weight: lighter;
} }
body, div, h1, p { body,
div,
h1,
p {
margin: 0; margin: 0;
font-family: 'ClearSans', sans-serif; font-family: 'ClearSans', sans-serif;
font-weight: 100; font-weight: 100;
@@ -59,7 +63,8 @@
line-height: 1.25em; line-height: 1.25em;
} }
h1, p { h1,
p {
margin: 0 0 1em 0; margin: 0 0 1em 0;
} }
@@ -69,10 +74,11 @@
font-size: 2em; font-size: 2em;
} }
a, a:visited, a:active { a,
a:visited,
a:active {
color: #b1148e; color: #b1148e;
} }
</style> </style>
</head> </head>
@@ -85,13 +91,13 @@
<h1>Simple Kiosk</h1> <h1>Simple Kiosk</h1>
<p>This is a simple browser for your show room or trade fair booth.</p> <p>This is a simple browser for your show room or trade fair booth.</p>
<p>It has very few features but works for simple things.</p> <p>It has very few features but works for simple things.</p>
<p>By default it loads <span style="font-family: monospace;">/assets/data/index.html</span> but you can choose any page you like.</p> <p>By default it loads <span style="font-family: monospace;">/assets/data/index.html</span> but you can choose
any page you like.</p>
<p>Simple Kiosk comes with a plugin for the Tooloop Settings Server so you can configure it in there.</p> <p>Simple Kiosk comes with a plugin for the Tooloop Settings Server so you can configure it in there.</p>
</div> </div>
<div id="credits"><a href="http://vincentgarreau.com/particles.js/">particles.js</a> by Vincent Garreau</div> <div id="credits"><a href="http://vincentgarreau.com/particles.js/">particles.js</a> by Vincent Garreau</div>
<!-- particles.js lib - https://github.com/VincentGarreau/particles.js -->
<script src="particles.min.js"></script> <script src="particles.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
@@ -116,12 +122,7 @@
}, },
"polygon": { "polygon": {
"nb_sides": 8 "nb_sides": 8
}, }
// "image": {
// "src": "img/github.svg",
// "width": 100,
// "height": 100
// }
}, },
"opacity": { "opacity": {
"value": 0.5, "value": 0.5,
@@ -206,7 +207,7 @@
}, },
"retina_detect": true "retina_detect": true
}); });
var update = function() { var update = function () {
requestAnimationFrame(update); requestAnimationFrame(update);
}; };
requestAnimationFrame(update);; requestAnimationFrame(update);;
@@ -214,4 +215,5 @@
</script> </script>
</body> </body>
</html> </html>
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
URL="file:///assets/data/index.html" URL="/media/assets/data/index.html"
# List of Chromium Command Line Switches # List of Chromium Command Line Switches
# https://peter.sh/experiments/chromium-command-line-switches/ # https://peter.sh/experiments/chromium-command-line-switches/
@@ -20,13 +20,12 @@ COMMAND="chromium-browser \
--class=TooloopKiosk \ --class=TooloopKiosk \
$URL" $URL"
killall chrome
sleep 0.1
if [ $EUID == 0 ]; then if [ $EUID == 0 ]; then
pkill chromium
sleep 0.1
su tooloop -c "$COMMAND" & su tooloop -c "$COMMAND" &
else else
pkill chromium
sleep 0.1
$COMMAND & $COMMAND &
fi fi
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
pkill xidlerun & pkill xidlerun &
pkill chromium & pkill chrome &
exit 0 exit 0
@@ -1,75 +0,0 @@
# -*- coding: utf-8 -*-
from flask import Flask, jsonify, request, abort
from os import chown
from pwd import getpwnam
from grp import getgrnam
class InstalledApp(object):
def __init__(self, flask):
super(InstalledApp, self).__init__()
# default homepage
self.homepage = 'file:///assets/data/index.html';
# connect flask routes to tooloop api calls
self.add_routes(flask)
def add_routes(self, flask):
@flask.route('/simple-kiosk/change-homepage', methods=['POST'])
def change_homepage():
if not request.form or not 'homepage' in request.form:
abort(400)
try:
self.homepage = request.form['homepage'];
file = open('/assets/presentation/reset-kiosk.sh','w')
file.write('#!/bin/bash\n')
file.write('\n')
file.write('URL="'+self.homepage+'"\n')
file.write('\n')
file.write('# List of Chromium Command Line Switches\n')
file.write('# https://peter.sh/experiments/chromium-command-line-switches/\n')
file.write('COMMAND="chromium-browser \\\n')
file.write('--kiosk \\\n')
file.write('--bwsi \\\n')
file.write('--overscroll-history-navigation=1 \\\n')
file.write('--incognito \\\n')
file.write('--disable-infobars \\\n')
file.write('--disable-translate \\\n')
file.write('--no-default-browser-check \\\n')
file.write('--no-first-run \\\n')
file.write('--disable-translate-new-ux \\\n')
file.write('--num-raster-threads=4 \\\n')
file.write('--enable-zero-copy \\\n')
file.write('--noerrdialogs \\\n')
file.write('--class=TooloopKiosk \\\n')
file.write('$URL"\n')
file.write('\n')
file.write('if [ $EUID == 0 ]; then\n')
file.write(' pkill chromium\n')
file.write(' sleep 0.1\n')
file.write(' su tooloop -c "$COMMAND" &\n')
file.write('else\n')
file.write(' pkill chromium\n')
file.write(' sleep 0.1\n')
file.write(' $COMMAND &\n')
file.write('fi\n')
file.write('\n')
file.write('exit 0\n')
file.close()
uid = getpwnam('tooloop').pw_uid
gid = getgrnam('tooloop').gr_gid
chown('/assets/presentation/reset-kiosk.sh', uid, gid)
return jsonify({'message':'homepage changed'})
except Exception as e:
abort(500)
@@ -1,43 +0,0 @@
{% extends "base.html" %}
{% block content %}
<table class="settings-table">
<tr><td colspan="2"><h2>{{installed_app.name}}</h2></td></tr>
<tr>
<td class="label-column" style="vertical-align: top; padding-top: 1.1em;">Homepage</td>
<td class="value-column">
<form id="homepage-form">
<input type="text" id="homepage-input" value="{{app_controller.homepage}}">
<button type="submit">Save</button>
</form>
</td>
</tr>
</table>
{% endblock %}
{% block page_footer_scripts %}
<script type="text/javascript">
$('#homepage-form').on('submit', function(event) {
event.preventDefault();
var feedback = attachFeedback(event.target);
$.ajax({
method: "POST",
data: { "homepage":$('#homepage-input').val() },
url: "/simple-kiosk/change-homepage"
}).done(function( data ) {
displayConfirmFeedback(feedback, 'Saved');
$.ajax( {url:"/tooloop/api/v1.0/presentation/reset"} );
}).error(function( jqXHR, textStatus, errorThrown ) {
displayErrorFeedback(feedback, errorThrown);
});
});
</script>
{% endblock %}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

-15
View File
@@ -1,15 +0,0 @@
Package: tooloop-processing
Version: 3.4
Maintainer: vollstock <daniel@vollstock.de>
Homepage: https://www.vollstock.de
Section: tooloop/addon
Architecture: all
Name: Processing 3.4
Description: Software sketchbook and a language for learning how to code
Processing is a flexible software sketchbook and a language for learning how
to code within the context of the visual arts. Since 2001, Processing has
promoted software literacy within the visual arts and visual literacy within
technology. There are tens of thousands of students, artists, designers,
researchers, and hobbyists who use Processing for learning and prototyping.
Thumbnail: processing-3.4-thumbnail.png
@@ -1,12 +0,0 @@
# If you want to support more platforms, visit jogamp.org to get the
# natives libraries for the platform in question (i.e. Solaris).
name = OpenGL
application.macosx=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-macosx-universal.jar,gluegen-rt-natives-macosx-universal.jar
application.windows32=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-windows-i586.jar,gluegen-rt-natives-windows-i586.jar
application.windows64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-windows-amd64.jar,gluegen-rt-natives-windows-amd64.jar
application.linux32=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-i586.jar,gluegen-rt-natives-linux-i586.jar
application.linux64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar
application.linux-armv6hf=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-armv6hf.jar,gluegen-rt-natives-linux-armv6hf.jar
application.linux-arm64=core.jar,jogl-all.jar,gluegen-rt.jar,jogl-all-natives-linux-aarch64.jar,gluegen-rt-natives-linux-aarch64.jar
@@ -1,252 +0,0 @@
#!/bin/sh
# This script adds a menu item, icons and mime type for Processing for
# the current user. If possible, it will use the xdg-utils - or fall back
# to just creating and copying a desktop file to the user's directory.
# If called with the "-u" option, it will uninstall.
# Resource name to use (including vendor prefix)
RESOURCE_NAME=processing-pde
# Get absolute path from which this script file was executed
# (Could be changed to "pwd -P" to resolve symlinks to their target)
SCRIPT_PATH=$( cd $(dirname $0) ; pwd )
cd "${SCRIPT_PATH}"
# Default mode is to install.
UNINSTALL=false
# If possible, get location of the desktop folder. Default to ~/Desktop
XDG_DESKTOP_DIR="${HOME}/Desktop"
if [ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/user-dirs.dirs" ]; then
. "${XDG_CONFIG_HOME:-${HOME}/.config}/user-dirs.dirs"
fi
# Install using xdg-utils
xdg_install_f() {
# Create a temp dir accessible by all users
TMP_DIR=`mktemp --directory`
# Create *.desktop file using the existing template file
sed -e "s,<BINARY_LOCATION>,${SCRIPT_PATH}/processing,g" \
-e "s,<ICON_NAME>,${RESOURCE_NAME},g" "${SCRIPT_PATH}/lib/desktop.template" > "${TMP_DIR}/${RESOURCE_NAME}.desktop"
# Install the icon files using name and resolutions
xdg-icon-resource install --context mimetypes --size 16 "${SCRIPT_PATH}/lib/icons/pde-16.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 32 "${SCRIPT_PATH}/lib/icons/pde-32.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 48 "${SCRIPT_PATH}/lib/icons/pde-48.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 64 "${SCRIPT_PATH}/lib/icons/pde-64.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 128 "${SCRIPT_PATH}/lib/icons/pde-128.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 256 "${SCRIPT_PATH}/lib/icons/pde-256.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 512 "${SCRIPT_PATH}/lib/icons/pde-512.png" $RESOURCE_NAME
xdg-icon-resource install --context mimetypes --size 1024 "${SCRIPT_PATH}/lib/icons/pde-1024.png" $RESOURCE_NAME
# Install the created *.desktop file
xdg-desktop-menu install "${TMP_DIR}/${RESOURCE_NAME}.desktop"
# Create icon on the desktop
xdg-desktop-icon install "${TMP_DIR}/${RESOURCE_NAME}.desktop"
# Install Processing mime type
xdg-mime install "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"
# Install icons for mime type
xdg-icon-resource install --context mimetypes --size 16 "${SCRIPT_PATH}/lib/icons/pde-16.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 32 "${SCRIPT_PATH}/lib/icons/pde-32.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 48 "${SCRIPT_PATH}/lib/icons/pde-48.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 64 "${SCRIPT_PATH}/lib/icons/pde-64.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 128 "${SCRIPT_PATH}/lib/icons/pde-128.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 256 "${SCRIPT_PATH}/lib/icons/pde-256.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 512 "${SCRIPT_PATH}/lib/icons/pde-512.png" text-x-processing
xdg-icon-resource install --context mimetypes --size 1024 "${SCRIPT_PATH}/lib/icons/pde-1024.png" text-x-processing
# Make the Processing Development Environment the default app for *.pde files
xdg-mime default ${RESOURCE_NAME}.desktop text/x-processing
# Clean up
rm "${TMP_DIR}/${RESOURCE_NAME}.desktop"
rmdir "$TMP_DIR"
}
# Install by simply copying desktop file (fallback)
simple_install_f() {
# Create a temp dir accessible by all users
TMP_DIR=`mktemp --directory`
# Create *.desktop file using the existing template file
sed -e "s,<BINARY_LOCATION>,${SCRIPT_PATH}/processing,g" \
-e "s,<ICON_NAME>,${SCRIPT_PATH}/lib/icons/pde-128.png,g" "${SCRIPT_PATH}/lib/desktop.template" > "${TMP_DIR}/${RESOURCE_NAME}.desktop"
mkdir -p "${HOME}/.local/share/applications"
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${HOME}/.local/share/applications/"
mkdir -p "${HOME}/.local/share/metainfo"
cp "${SCRIPT_PATH}/lib/appdata.xml" "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
# Copy desktop icon if desktop dir exists (was found)
if [ -d "${XDG_DESKTOP_DIR}" ]; then
cp "${TMP_DIR}/${RESOURCE_NAME}.desktop" "${XDG_DESKTOP_DIR}/"
# Altering file permissions to avoid "Untrusted Application Launcher" error on Ubuntu
chmod u+x "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
fi
# Clean up temp dir
rm "${TMP_DIR}/${RESOURCE_NAME}.desktop"
rmdir "${TMP_DIR}"
}
# Uninstall using xdg-utils
xdg_uninstall_f() {
# Remove *.desktop file
xdg-desktop-menu uninstall ${RESOURCE_NAME}.desktop
# Remove icon from desktop
xdg-desktop-icon uninstall ${RESOURCE_NAME}.desktop
# Remove icons
xdg-icon-resource uninstall --size 16 $RESOURCE_NAME
xdg-icon-resource uninstall --size 32 $RESOURCE_NAME
xdg-icon-resource uninstall --size 48 $RESOURCE_NAME
xdg-icon-resource uninstall --size 64 $RESOURCE_NAME
xdg-icon-resource uninstall --size 128 $RESOURCE_NAME
xdg-icon-resource uninstall --size 256 $RESOURCE_NAME
xdg-icon-resource uninstall --size 512 $RESOURCE_NAME
xdg-icon-resource uninstall --size 1024 $RESOURCE_NAME
# Remove MIME type icons
xdg-icon-resource uninstall --size 16 text-x-processing
xdg-icon-resource uninstall --size 32 text-x-processing
xdg-icon-resource uninstall --size 48 text-x-processing
xdg-icon-resource uninstall --size 64 text-x-processing
xdg-icon-resource uninstall --size 128 text-x-processing
xdg-icon-resource uninstall --size 256 text-x-processing
xdg-icon-resource uninstall --size 512 text-x-processing
xdg-icon-resource uninstall --size 1024 text-x-processing
# Remove MIME type
xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"
}
# Uninstall by simply removing desktop files (fallback), incl. old one
simple_uninstall_f() {
# delete legacy cruft .desktop file
if [ -f "${HOME}/.local/share/applications/processing.desktop" ]; then
rm "${HOME}/.local/share/applications/processing.desktop"
fi
# delete another legacy .desktop file
if [ -f "${HOME}/.local/share/applications/processing-processingide.desktop" ]; then
rm "${HOME}/.local/share/applications/processing-processingide.desktop"
fi
if [ -f "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop" ]; then
rm "${HOME}/.local/share/applications/${RESOURCE_NAME}.desktop"
fi
if [ -f "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml" ]; then
rm "${HOME}/.local/share/metainfo/${RESOURCE_NAME}.appdata.xml"
fi
if [ -f "${XDG_DESKTOP_DIR}/processing.desktop" ]; then
rm "${XDG_DESKTOP_DIR}/processing.desktop"
fi
if [ -f "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop" ]; then
rm "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
fi
}
# Update desktop file and mime databases (if possible)
updatedbs_f() {
if [ -d "${HOME}/.local/share/applications" ]; then
if command -v update-desktop-database > /dev/null; then
update-desktop-database "${HOME}/.local/share/applications"
fi
fi
if [ -d "${HOME}/.local/share/mime" ]; then
if command -v update-mime-database > /dev/null; then
update-mime-database "${HOME}/.local/share/mime"
fi
fi
}
# Check availability of xdg-utils
xdg_exists_f() {
if ! command -v xdg-icon-resource > /dev/null; then return 1; fi
if ! command -v xdg-desktop-menu > /dev/null; then return 1; fi
if ! command -v xdg-desktop-icon > /dev/null; then return 1; fi
if ! command -v xdg-mime > /dev/null; then return 1; fi
return 0
}
# Shows a description of the available options
display_help_f() {
printf "\nThis script will add a Processing desktop shortcut, menu item,\n"
printf "icons and file associations for the current user.\n"
if ! xdg_exists_f; then
printf "\nxdg-utils are recommended to be installed, so this script can use them.\n"
fi
printf "\nOptional arguments are:\n\n"
printf "\t-u, --uninstall\t\tRemoves shortcut, menu item and icons.\n\n"
printf "\t-h, --help\t\tShows this help again.\n\n"
}
# Check for provided arguments
while [ $# -gt 0 ] ; do
ARG="${1}"
case $ARG in
-u|--uninstall)
UNINSTALL=true
shift
;;
-h|--help)
display_help_f
exit 0
;;
*)
printf "\nInvalid option -- '${ARG}'\n"
display_help_f
exit 1
;;
esac
done
# If possible, use xdg-utils, if not, use a more basic approach
if xdg_exists_f; then
if [ ${UNINSTALL} = true ]; then
printf "Removing desktop shortcut and menu item for Processing..."
xdg_uninstall_f
simple_uninstall_f
else
printf "Adding desktop shortcut, menu item and file associations for Processing..."
xdg_uninstall_f
simple_uninstall_f
xdg_install_f
fi
else
if [ ${UNINSTALL} = true ]; then
printf "Removing desktop shortcut and menu item for Processing..."
simple_uninstall_f
else
printf "Adding desktop shortcut and menu item for Processing..."
simple_uninstall_f
simple_install_f
fi
fi
updatedbs_f
printf " done!\n"
exit 0
@@ -1,69 +0,0 @@
Copyright © 1993, 2018, Oracle and/or its affiliates.
All rights reserved.
This software and related documentation are provided under a
license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws.
Except as expressly permitted in your license agreement or
allowed by law, you may not use, copy, reproduce, translate,
broadcast, modify, license, transmit, distribute, exhibit,
perform, publish, or display any part, in any form, or by
any means. Reverse engineering, disassembly, or
decompilation of this software, unless required by law for
interoperability, is prohibited.
The information contained herein is subject to change
without notice and is not warranted to be error-free. If you
find any errors, please report them to us in writing.
If this is software or related documentation that is
delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, the following notice is
applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any
operating system, integrated software, any programs
installed on the hardware, and/or documentation, delivered
to U.S. Government end users are "commercial computer
software" pursuant to the applicable Federal Acquisition
Regulation and agency-specific supplemental regulations. As
such, use, duplication, disclosure, modification, and
adaptation of the programs, including any operating system,
integrated software, any programs installed on the hardware,
and/or documentation, shall be subject to license terms and
license restrictions applicable to the programs. No other
rights are granted to the U.S. Government.
This software or hardware is developed for general use in a
variety of information management applications. It is not
developed or intended for use in any inherently dangerous
applications, including applications that may create a risk
of personal injury. If you use this software or hardware in
dangerous applications, then you shall be responsible to
take all appropriate fail-safe, backup, redundancy, and
other measures to ensure its safe use. Oracle Corporation
and its affiliates disclaim any liability for any damages
caused by use of this software or hardware in dangerous
applications.
Oracle and Java are registered trademarks of Oracle and/or
its affiliates. Other names may be trademarks of their
respective owners.
Intel and Intel Xeon are trademarks or registered trademarks
of Intel Corporation. All SPARC trademarks are used under
license and are trademarks or registered trademarks of SPARC
International, Inc. AMD, Opteron, the AMD logo, and the AMD
Opteron logo are trademarks or registered trademarks of
Advanced Micro Devices. UNIX is a registered trademark of
The Open Group.
This software or hardware and documentation may provide
access to or information on content, products, and services
from third parties. Oracle Corporation and its affiliates
are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content,
products, and services. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or
damages incurred due to your access to or use of third-party
content, products, or services.
@@ -1 +0,0 @@
Please refer to http://java.com/license
@@ -1 +0,0 @@
Please refer to http://java.com/licensereadme
@@ -1,28 +0,0 @@
<html>
<head>
<title>
Welcome to the Java(TM) Platform
</title>
</head>
<body>
<h2>Welcome to the Java<SUP><FONT SIZE=-2>TM</FONT></SUP> Platform</h2>
<p> Welcome to the Java<SUP><FONT SIZE=-2>TM</FONT></SUP> Standard Edition Runtime
Environment. This provides complete runtime support for Java applications.
<p> The runtime environment includes the Java<SUP><FONT SIZE=-2>TM</FONT></SUP>
Plug-in product which supports the Java environment inside web browsers.
<h3>References</h3>
<p>
See the <a href="http://download.oracle.com/javase/7/docs/technotes/guides/plugin/">Java Plug-in</a> product
documentation for more information on using the Java Plug-in product.
<p> See the <a href=
"http://www.oracle.com/technetwork/java/javase/overview/"
>Java Platform</a> web site for
more information on the Java Platform.
<hr>
<font size="-2">
Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
</font>
<p>
</body>
</html>
@@ -1,245 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
# Shell Script to run the Java Plug-in control panel.
#
# Parse the command-line options
# -r means make associate with the container (i.e browser)
# -u means remove the association with the container
# -c provides the location of the container install
# -j provides the location of the jre install
# if neither -r or -u are specified, run the ControlPanel UI
USAGE='usage: ControlPanel [ (-u scheme | -r scheme) -c cpath -j jrepath ]'
JLERROR='ControlPanel: Error: Invalid JRE location: '
CLERROR='ControlPanel: Error: Invalid container location: '
IPERROR='ControlPanel: Error: Insufficient permission'
ISERROR='ControlPanel: Error: Invalid scheme: '
XLERROR='ControlPanel: Error: Invalid link or copy: '
check_container_dir() {
if [ ! -d ${1} ]; then
echo "${CLERROR}${2}"
exit 1
fi
if [ ! -w ${1} ]; then
echo "${IPERROR}"
exit 1
fi
}
link_logic() {
if [ ${mode} = "reg" ]; then
ln -s ${1} ${2}
else
rm -f ${2}
fi
}
#
# Get the absolute path to a symbolic link's reference.
#
# Parameters:
# $* : path - the path to the file (link) to dereference (can have spaces in
# the path).
#
# Output:
# This function writes the path to the link reference to stdout.
#
#
dereference() {
path="$*"
result=
#
# Make sure the path is absolute
#
parent="`cd \`dirname \"${path}\"\`; pwd -P`"
child="`basename \"${path}\"`"
#
# if parent == child, then path == /, and is already absolute
#
if [ "${parent}" != "${child}" ]; then
path="${parent}/${child}"
fi
if [ -h "${path}" ]; then
path=`ls -l "${path}" | sed -e "s#^.*${path} -> ##"`
# make sure the path is still absolute (starts with '/')
if expr "${path}" : '[^/]' > /dev/null; then
path="${parent}/${path}"
fi
fi
echo ${path}
}
#
# Check for all the parts required to launch the control panel relative to the
# given path.
#
#
# Parameters:
# $* : path - the path to examine, presumably the resolved path to this
# script (can have spaces in the path).
#
# Output:
# If successful, this function outputs the absolute path to a directory
# containing the Java binary, and ../lib/deploy.jar; otherwise it outputs
# an empty string. (Output is to stdout.)
#
# Note: the assumption is that this function returns either:
#
# <jdk-root>/jre/bin, or
# <jre-root>/bin
#
# However, as long as the directory pointed by the path returned by this
# function contains:
#
# ./java
# ../lib/deploy.jar
#
# it should be possible to successfully launch the JCP from the given
# information.
#
check_parts() {
result="`cd \`dirname \"$*\"\`; pwd -P`"
# if this is a JDK, we need the JRE subdir
if [ -d "${result}/../jre/bin" ]; then
result="`cd \`dirname \"$*\"\`/../jre/bin; pwd -P`"
fi
if [ ! -x "${result}/java" ] || [ ! -f "${result}/../lib/deploy.jar" ]; then
result=
fi
echo ${result}
}
#
# Launch the Java Control Panel.
#
# Parameters:
# $* : path - the path of this script (can have spaces in the path).
#
launch_jcp() {
path="$*"
while [ -h ${path} ]; do
path="`dereference ${path}`"
done
java_home="`check_parts ${path}`"
if [ -n "${java_home}" ]; then
# launch the JCP using paths relative to
${java_home}/java -Djavaplugin.user.profile=${USER_JPI_PROFILE} \
-Xbootclasspath/a:${java_home}/../lib/deploy.jar \
${_JAVA_VM_OPTIONS} \
com.sun.deploy.panel.ControlPanel
else
echo "${XLERROR}${java_home}"
exit 1
fi
}
#
# Manage the process of registering/unregistering the Java Plug-in with a given
# container (browser).
#
manage_container() {
# Do the "right" thing based on the provided scheme.
plugin_stem=${java_home}/plugin/${proc}
if [ ! -d ${plugin_stem} ]; then
echo "${JLERROR}${java_home}"
exit 1
fi
case ${scheme} in
ns4 | ns4E )
plugin_location="${plugin_stem}/ns4"
if [ ${mode} = "reg" ]; then
echo "${plugin_location}"
fi
;;
ns4L )
plugin_location="${plugin_stem}/ns4"
filename=`ls ${plugin_location}`
container_target="${container_home}/plugins"
check_container_dir ${container_target} ${container_home}
link_logic ${plugin_location}/${filename} ${container_target}/${filename}
;;
ns610 | ns610L )
plugin_location="${plugin_stem}/ns610"
filename=`ls ${plugin_location}`
container_target="${container_home}/plugins"
check_container_dir ${container_target} ${container_home}
link_logic ${plugin_location}/${filename} ${container_target}/${filename}
;;
* )
echo ${ISERROR}${scheme}
exit 1
esac
}
while getopts ":r:u:c:j:" opt; do
case $opt in
r ) mode="reg";scheme=${OPTARG}
;;
u ) mode="unreg";scheme=${OPTARG}
;;
c ) container_home=${OPTARG}
;;
j ) java_home=${OPTARG}
;;
: ) echo ${USAGE}
exit 1
;;
\? ) echo ${USAGE}
exit 1
;;
esac
done
os=`uname -s`
if [ "${os}" = "Linux" ]; then
case "`uname -m`" in
i[3-9]86 | ia32 | ia64 | x86_64)
proc=i386
;;
sparc*)
proc=sparc
;;
arm*)
proc=arm
;;
ppc*)
proc=ppc
;;
*)
proc="`uname -m`"
;;
esac
else
proc=`uname -p`
fi
if [ -z "${scheme}" ] &&
[ -z "${java_home}" ] && [ -z "${container_home}" ]
then
# just run the control panel
launch_jcp $0
elif [ -n "${scheme}" ] &&
[ -n "${java_home}" ] && [ -n "${container_home}" ]
then
# try to register/unregister the plugin
manage_container
else
# one or more missing args
echo ${USAGE}
exit 1
fi
@@ -1,35 +0,0 @@
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# List of JVMs that can be used as an option to java, javac, etc.
# Order is important -- first in this list is the default JVM.
# NOTE that this both this file and its format are UNSUPPORTED and
# WILL GO AWAY in a future release.
#
# You may also select a JVM in an arbitrary location with the
# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
# and may not be available in a future release.
#
-server KNOWN
-client IGNORE

Some files were not shown because too many files have changed in this diff Show More