Ich bin offizieller Linux-Paketierer von TJGroup.

This commit is contained in:
Beat Jäckle 2024-01-12 11:06:59 +01:00
parent 20fe791db7
commit f7315493cf
43 changed files with 465 additions and 83 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
*/pkg */pkg
*/src */src
*/*_64 */*_64
*-x86_64.pkg.tar.zst
*_x86_64.deb
.flatpak-builder

13
Makefile Normal file
View file

@ -0,0 +1,13 @@
# src https://www.pragmaticlinux.com/2021/01/create-a-man-page-for-your-own-program-or-script-with-pandoc/
man:
pandoc man/tigerjython.md -s -t man | gzip > man/tigerjython.1.gz
tar.gz: man
mkdir -p TigerJython/man
cp man/tigerjython.1.gz TigerJython/man
tar -czf TigerJython.tar.gz TigerJython
arch:
cd arch-pkg && makepkg
arch-local: tar.gz
cd arch-local-pkg && makepkg
deb: tar.gz
cd debian-deb && sh makedeb.sh

View file

@ -1,3 +1,19 @@
# TigerJython Paketierung # TigerJython Paketierung
Dieses Repo soll helfen TigerJython für Arch oder Debian zu paketieren. Dieses Repo soll helfen TigerJython für Arch oder Debian zu paketieren.
## Ordnerstruktur
Im Repository sind folgende Ordner:
* arch-pkg: paketierung für ArchLinux
* debian-deb: Paketierung für Debian
* flatpak: Paketierung für flatpak
* man: Manual (Basierend auf dem Readme.txt)
* TigerJython: Quelldateien
* TigerJython.tar.gz: Tarball von TigerJython
## Logo
Das vektorisierte Logo stammt von [Pixabay](https://pixabay.com/de/vectors/fu%C3%9Fabdruck-tier-pelzig-pfote-308794/)

BIN
TigerJython.tar.gz Normal file

Binary file not shown.

BIN
TigerJython/Lib/jl1.0.1.jar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,9 @@
from gturtle import *
makeTurtle()
i = 0
while i < 4:
forward(100)
right(90)
i = i + 1

View file

@ -0,0 +1,28 @@
from gturtle import *
def tree(size):
if size < 5:
fd(size)
bk(size)
return
fd(size / 3)
lt(30)
tree(size * 2 / 3)
rt(30)
fd(size / 6)
rt(25)
tree(size / 2)
lt(25)
fd(size / 3)
rt(25)
tree(size / 2)
lt(25)
fd(size / 6)
bk(size)
makeTurtle()
ht()
setPos(20, -195)
tree(250)

View file

@ -0,0 +1,16 @@
from gturtle import *
def onMouseHit(x, y):
fill(x, y)
makeTurtle(mouseHit = onMouseHit)
hideTurtle()
addStatusBar(30)
setStatusText("Click to fill a region!")
repeat 12:
repeat 6:
forward(80)
right(60)
left(30)

View file

@ -0,0 +1,7 @@
from gpanel import *
makeGPanel(0, 20, 0, 20)
for i in range(21):
line(i, 0, 20, i)

View file

@ -0,0 +1,18 @@
from gpanel import *
from random import randint, random
def randomColor():
r = randint(0, 255)
g = randint(0, 255)
b = randint(0, 255)
return makeColor(r, g, b)
makeGPanel()
bgColor(randomColor())
for i in range(20):
setColor(randomColor())
move(random(), random())
a = random() / 2
b = random() / 2
fillEllipse(a, b)

View file

@ -0,0 +1,39 @@
from gpanel import *
import random
def fern():
z = 0
n = 0
while n < nbPoints:
r = random.random()
c = "black"
if r < 0.01:
c = "yellow"
z = f(z, 0, 0, 0, 0.16, 0, 0) # Stem
elif r < 0.86:
c = "green"
z = f(z, 0.85, 0.04, -0.04, 0.85, 0, 1.60) # symmetry
elif r > 0.86 and r < 0.93:
c = "red"
z = f(z, 0.20, -0.26, 0.23, 0.22, 0, 1.60) # left leaves
elif r > 0.93:
c = "blue"
z = f(z, -0.15, 0.28, 0.26, 0.24, 0, 1.44) # right leaves
setColor(c)
point(z)
n += 1
if n % 100 == 0:
repaint()
def f(z, a, b, c, d, e, f):
re = a * z.real + b * z.imag + e
im = c * z.real + d * z.imag + f
return complex(re, im)
makeGPanel(-3.5, 3.5, 0, 10)
enableRepaint(False)
bgColor("black")
nbPoints = 40000
fern()
keep()

View file

@ -0,0 +1,10 @@
import math
from gpanel import *
makeGPanel(-2, 2, -2, 2)
for i in range(628):
t = i / 100
x = math.cos(2 * t)
y = math.sin(7 * t)
move(x, y)
circle(0.1)

View file

@ -0,0 +1,28 @@
from gamegrid import *
def pressCallback(e):
loc = toLocationInGrid(e.getX(), e.getY())
locs = [0] * 5
locs[0] = Location(loc.x, loc.y)
locs[1] = Location(loc.x, loc.y - 1)
locs[2] = Location(loc.x, loc.y + 1)
locs[3] = Location(loc.x - 1, loc.y)
locs[4] = Location(loc.x + 1, loc.y)
for i in range(5):
a = getOneActorAt(locs[i])
if a != None:
a.showNextSprite()
refresh()
return True
makeGameGrid(5, 5, 50, Color.black, False,
mousePressed = pressCallback)
setTitle("LightsOut")
for i in range(5):
for k in range(5):
lamp = Actor("sprites/lightout.gif", 2)
addActor(lamp, Location(i, k))
lamp.show(1)
show()

View file

@ -0,0 +1,37 @@
from gamegrid import *
def pressEvent(e):
global state
loc = toLocationInGrid(e.getX(), e.getY())
if loc == Location(1, 2): # off
state = State.OFF
led.show(0)
coffee.hide()
elif loc == Location(2, 2): # on
if state == State.OFF:
state = State.STANDBY
led.show(1)
elif loc == Location(4, 2): # stop
if state == State.WORKING:
state = State.STANDBY
coffee.hide()
elif loc == Location(5, 2): # work
if state == State.STANDBY:
state = State.WORKING
coffee.show()
setTitle("State: " + str(state))
refresh()
State = enum("OFF", "STANDBY", "WORKING")
state = State.OFF
makeGameGrid(7, 11, 50, None, "sprites/espresso.png", False,
mousePressed = pressEvent)
show()
setTitle("State: " + str(state))
led = Actor("sprites/lightout.gif", 2)
addActor(led, Location(3, 3))
coffee = Actor("sprites/coffee.png")
addActor(coffee, Location(3, 6))
coffee.hide()
refresh()

View file

@ -0,0 +1,21 @@
from simrobot import *
RobotContext.useBackground("sprites/border.gif")
RobotContext.setStartPosition(250, 490)
robot = LegoRobot()
gear = Gear()
robot.addPart(gear)
ls = LightSensor(SensorPort.S3)
robot.addPart(ls)
ls.activate(True)
gear.forward()
while not robot.isEscapeHit():
v = ls.getValue()
if v < 500:
gear.leftArc(0.2)
else:
gear.rightArc(0.2)
Tools.delay(100)
robot.exit()

Binary file not shown.

2
TigerJython/tigerjython Normal file
View file

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/bin/java -jar '/opt/tigerjython/tigerjython2.jar' "$@"

View file

@ -0,0 +1,7 @@
[Desktop Entry]
Name=TigerJython IDE
Exec=java -jar /opt/tigerjython/tigerjython2.jar
Icon=tigerjython
Type=Application
Categories=Education;Science;Math;
Keywords=science;math;matrix;plotting;

110
TigerJython/tigerjython.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

BIN
TigerJython/tigerjython2.jar Executable file

Binary file not shown.

35
arch-local-pkg/PKGBUILD Normal file
View file

@ -0,0 +1,35 @@
# Maintainer: Beat Jäckle <beat at git dot jdmweb2 dot ch>
pkgname=tigerjython
pkgver=2.37
pkgrel=2
#pkgrel=5
pkgdesc='TigerJython IDE'
arch=(x86_64)
url='https://www.tigerjython.ch/'
license=('custom')
depends=('java-runtime>=2')
source=("TigerJython.tar.gz")
b2sums=('SKIP')
_install_path=/usr/share
build() {
sed -i "s|/opt/${pkgname}|${_install_path}/${pkgname}|g" TigerJython/tigerjython.desktop
sed -i "s|/opt/${pkgname}|${_install_path}/${pkgname}|g" TigerJython/tigerjython
}
package() {
install -Ddm755 "${pkgdir}/${_install_path}/${pkgname}/Lib"
install -Ddm755 "${pkgdir}/${_install_path}/${pkgname}/TestSamples"
install -Ddm755 "${pkgdir}/usr/share/man/man1/"
install -Dm644 "${srcdir}/TigerJython/tigerjython2.jar" "${pkgdir}/${_install_path}/${pkgname}/."
install -Dm644 "${srcdir}/TigerJython/Lib/"* "${pkgdir}/${_install_path}/${pkgname}/Lib/."
install -Dm644 "${srcdir}/TigerJython/TestSamples/"* "${pkgdir}/${_install_path}/${pkgname}/TestSamples/."
install -Dm644 "${srcdir}/TigerJython/man/tigerjython.1.gz" "${pkgdir}/usr/share/man/man1/"
install -Dm755 "${srcdir}/TigerJython/tigerjython" "${pkgdir}/usr/bin/tigerjython"
install -Dm755 "${srcdir}/TigerJython/tigerjython.desktop" "${pkgdir}/usr/share/applications/tigerjython.desktop"
install -Dm755 "${srcdir}/TigerJython/tigerjython.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/tigerjython.svg"
}

View file

@ -0,0 +1 @@
../TigerJython.tar.gz

6
flatpak/Makefile Normal file
View file

@ -0,0 +1,6 @@
build:
flatpak-builder --install --user --force-clean build-dir ch.tigerjython.TigerJython2.yml
run:
flatpak run --nosocket=fallback-x11 --socket=x11 ch.tigerjython.TigerJython2
sh:
flatpak run --command=sh ch.tigerjython.TigerJython2

1
flatpak/TigerJython.tar.gz Symbolic link
View file

@ -0,0 +1 @@
../TigerJython.tar.gz

View file

@ -0,0 +1,43 @@
id: ch.tigerjython.TigerJython2
runtime: org.freedesktop.Platform
# runtime: org.freedesktop.Sdk.Extension.openjdk
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk
modules:
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk/install.sh
- name: tigerjython2
buildsystem: simple
build-commands:
- install -Ddm755 /app/tigerjython/Lib
- install -Ddm755 /app/tigerjython/TestSamples
- sed -i "s|/usr/bin/java|/app/jre/bin/java|g" tigerjython
- sed -i "s|/opt/tigerjython|/app/tigerjython|g" tigerjython
- install -Dm644 Lib/* /app/tigerjython/Lib
- install -Dm644 TestSamples/* /app/tigerjython/TestSamples
- install -m755 tigerjython2.jar /app/tigerjython/tigerjython2.jar
- install -m755 tigerjython /app/tigerjython/tigerjython.sh
sources:
- type: archive
path: TigerJython.tar.gz
finish-args:
- --env=PATH=/app/jre/bin:/usr/bin
# X11 + XShm access
- --share=ipc
- --socket=fallback-x11
# Wayland access
- --socket=wayland
# GPU acceleration if needed
- --device=dri
# Needs to talk to the network:
- --share=network
# Needs to save files locally
- --filesystem=xdg-documents
# command: java -jar tigerjython2.jar
# command: java --version
command: /app/tigerjython/tigerjython.sh

View file

@ -1,70 +0,0 @@
.\" Automatically generated by Pandoc 3.1.2
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "TigerJython" "" "Aug-2-2023" "tigerjython 2.37" "Readme"
.hy
.SH NAME
.PP
TigerJython
.SH SYNOPSIS
.PP
\f[B]tigerjython\f[R]
.PP
or
.PP
\f[B]java -jar /opt/tigerjython/tigerjython2.jar\f[R]
.SH DESCRIPTION
.PP
\f[B]TigerJython\f[R] is a free development environment for the Python
programming language.
If you want to learn programming, this is the tool for you.
It already includes everything you need to start programming right away.
.PP
For all versions we guarantee not to change or spy your software.
.SH FILES
.PP
Additional library modules can copied to the Lib subfolder of the
installation folder (where tigerjython2.jar resides).
They are loaded automatically by TigerJython.
The folder already contains software for special applications like a
text-to-speech converter (TTS), firmware for microcontroller
development, support for MP3 sound, etc.
If you do not use these features, you may delete the files in the Lib
folder and TigerJython still works for most standard applications.
.PP
The installation folder also contains a subfolder TestSamples, where you
find a few typical applications (turtle graphics, coordinate graphics,
game development engine (GameGrid), simulations).
.SH SEE ALSO
.IP \[bu] 2
<https://tigerjython.ch/>
.IP \[bu] 2
<https://tigerjython4kids.ch>
.IP \[bu] 2
<https://tobiaskohn.ch/>
.IP \[bu] 2
<https://jython.ch/>
.IP \[bu] 2
<https://aplu.ch/>
.IP \[bu] 2
<https://tjgroup.ch/>
.SH HELP
.PP
For help send mail to <help@tigerjython.ch>
.SH COPYRIGHT
.PP
Created by the TigerJython Group association (<https://tjgroup.ch/>) a
non-profit organisaton devoted to computer science education.

BIN
man/tigerjython.1.gz Normal file

Binary file not shown.

View file

@ -1,8 +1,9 @@
--- ---
title: TigerJython title: TigerJython
header: Readme section: 1
header: TigerJython Manual
footer: tigerjython 2.37 footer: tigerjython 2.37
date: Aug-2-2023 date: 2023-08-02
--- ---
# NAME # NAME
@ -26,6 +27,7 @@ For all versions we guarantee not to
change or spy your software. change or spy your software.
# FILES # FILES
Additional library modules can copied to the Lib subfolder of the Additional library modules can copied to the Lib subfolder of the
installation folder (where tigerjython2.jar resides). They are loaded installation folder (where tigerjython2.jar resides). They are loaded
automatically by TigerJython. The folder already contains software for automatically by TigerJython. The folder already contains software for
@ -40,18 +42,18 @@ game development engine (GameGrid), simulations).
# SEE ALSO # SEE ALSO
* <https://tigerjython.ch/> * https://tigerjython.ch/
* <https://tigerjython4kids.ch> * https://tigerjython4kids.ch/
* <https://tobiaskohn.ch/> * https://tobiaskohn.ch/
* <https://jython.ch/> * https://jython.ch/
* <https://aplu.ch/> * https://aplu.ch/
* <https://tjgroup.ch/> * https://tjgroup.ch/
# HELP # HELP
For help send mail to <help@tigerjython.ch> For help send mail to help@tigerjython.ch.
# COPYRIGHT # COPYRIGHT
Created by the TigerJython Group association (<https://tjgroup.ch/>) a Created by the TigerJython Group association https://tjgroup.ch/ a
non-profit organisaton devoted to computer science education. non-profit organisaton devoted to computer science education.