Skip to content

Commit f4347be

Browse files
committed
improving packaging
1 parent 3cf9ac6 commit f4347be

File tree

6 files changed

+80
-0
lines changed

6 files changed

+80
-0
lines changed

packaging/SmallTextPad.ico

13.8 KB
Binary file not shown.
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Desktop Entry]
2+
Name=SmallTextPad
3+
Comment=Simple Java Text Editor with Encryption
4+
Exec=smalltextpad %F
5+
Icon=${SNAP}/usr/share/pixmaps/smalltextpad.png
6+
Terminal=false
7+
Type=Application
8+
Categories=Office;TextEditor;
9+
MimeType=text/plain;text/x-java;text/x-c;text/x-c++;text/x-python;text/x-sh;application/x-smalltextpad-encrypted;
10+
StartupNotify=true
11+
StartupWMClass=SmallTextPad
25 Bytes
Binary file not shown.

packaging/snap/snapcraft.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: smalltextpad
2+
base: core22
3+
version: '1.5.0'
4+
title: SmallTextPad
5+
summary: SmallTextPad - Simple Java Text Editor with Encryption
6+
description: |
7+
SmallTextPad is a lightweight Java text editor with optional file encryption
8+
and multi-language support. Features include basic editing, undo/redo,
9+
printing, and encrypted file format (.sstp).
10+
11+
website: https://github.com/gcclinux/smalltextpad
12+
source-code: https://github.com/gcclinux/smalltextpad
13+
issues: https://github.com/gcclinux/smalltextpad/issues
14+
contact: https://github.com/gcclinux/smalltextpad/discussions
15+
license: MIT
16+
donation: https://github.com/sponsors/gcclinux
17+
18+
grade: stable
19+
confinement: strict
20+
21+
architectures:
22+
- build-on: amd64
23+
24+
apps:
25+
smalltextpad:
26+
command: bin/smalltextpad
27+
desktop: usr/share/applications/smalltextpad.desktop
28+
plugs:
29+
- home
30+
- desktop
31+
- desktop-legacy
32+
- wayland
33+
- x11
34+
- unity7
35+
- opengl
36+
- removable-media
37+
38+
parts:
39+
smalltextpad:
40+
plugin: dump
41+
source: .
42+
build-packages: []
43+
stage-packages:
44+
- openjdk-21-jre
45+
build-attributes:
46+
- no-patchelf
47+
override-build: |
48+
# Create wrapper script
49+
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
50+
cat > $SNAPCRAFT_PART_INSTALL/bin/smalltextpad << 'EOF'
51+
#!/bin/bash
52+
export JAVA_HOME=$(find $SNAP/usr/lib/jvm -name "java-*-openjdk-*" -type d | head -1)
53+
export DISPLAY=${DISPLAY:-:0}
54+
exec $JAVA_HOME/bin/java -jar $SNAP/SmallTextPad.jar "$@"
55+
EOF
56+
chmod +x $SNAPCRAFT_PART_INSTALL/bin/smalltextpad
57+
58+
# Copy pre-compiled JAR and resources
59+
cp classes/artifacts/SmallTextPad.jar $SNAPCRAFT_PART_INSTALL/
60+
cp -r res $SNAPCRAFT_PART_INSTALL/
61+
cp -r dic $SNAPCRAFT_PART_INSTALL/
62+
63+
# Install desktop file
64+
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications
65+
cp snap/gui/smalltextpad.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/
66+
67+
# Install icon
68+
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps
69+
cp res/smalltextpad_128x128.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/smalltextpad.png
25 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)