Skip to content

Commit 6102ea7

Browse files
committed
feat(metainfo): Add debian package metainfo & screenshots for UI dipslay
1 parent 2daa83c commit 6102ea7

File tree

5 files changed

+41
-2
lines changed

5 files changed

+41
-2
lines changed

build_deb.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ Description: $DESCRIPTION
9292
Licensed under the MIT License - See /usr/share/doc/$PROJECT_NAME/copyright
9393
for full license details.
9494
EOF
95+
# copy metaino file
96+
echo -e "${YELLOW}Copying metainfo file...${NC}"
97+
mkdir -p "$DEBIAN_DIR/usr/share/metainfo"
98+
cp ./docs/$PROJECT_NAME.metainfo.xml "$DEBIAN_DIR/usr/share/metainfo/$PROJECT_NAME.metainfo.xml"
9599

96100
# Create postinst script (run after installation)
97101
echo -e "${YELLOW}Creating postinst script...${NC}"

docs/genj.metainfo.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="cli-application">
3+
<!-- To be moved to /usr/share/metainfo/genj.metainfo.xml -->
4+
<id>genj</id>
5+
<metadata_license>MIT</metadata_license>
6+
<project_license>MIT</project_license>
7+
<name>GenJ</name>
8+
<summary>genj is a command-line tool written in Rust that generates a Java project from a template (ZIP
9+
file or folder).</summary>
10+
<description>
11+
<p><em>genj</em> is a command-line tool written in Rust that generates a Java project from a template (ZIP
12+
file or folder).</p>
13+
<p>The binary reads a template, copies files to the destination directory while applying
14+
variable replacements</p>
15+
<p>in file paths and content. It also handles the transformation of the <em>${PACKAGE}</em>
16+
variable into a Java folder hierarchy.</p>
17+
</description>
18+
<!--
19+
<launchable type="desktop-id">genj</launchable>
20+
-->
21+
<url type="homepage">https://github.com/mcgivrer/genj</url>
22+
<screenshots>
23+
<screenshot type="default">
24+
<image>
25+
https://raw.githubusercontent.com/mcgivrer/genj/refs/heads/main/docs/screeshot-00.png</image>
26+
</screenshot>
27+
<screenshot type="default">
28+
<image>
29+
https://raw.githubusercontent.com/mcgivrer/genj/refs/heads/main/docs/screeshot-01.png</image>
30+
</screenshot>
31+
</screenshots>
32+
<provides>
33+
<id>genj</id>
34+
</provides>
35+
</component>

docs/screenshot-00.png

197 KB
Loading

docs/screenshot-01.png

105 KB
Loading

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ placeholders in the templates with the provided values, and generates additional
1919
files such as MANIFEST.MF and README.md."
2020
)]
2121
struct Cli {
22-
#[arg(short = 'd', long, help = "Path to the template (ZIP or folder)")]
22+
#[arg(short = 't', long="template", help = "Path to the template (ZIP or folder)")]
2323
template: String,
24-
#[arg(short, long, help = "Destination directory")]
24+
#[arg(short='d', long="destination", help = "Destination directory")]
2525
destination: String,
2626
#[arg(short = 'n', long = "project_name", default_value = "Demo")]
2727
project_name: String,

0 commit comments

Comments
 (0)