Skip to content

Commit 18d7091

Browse files
committed
remove runtime metadata set
1 parent 244b854 commit 18d7091

File tree

5 files changed

+12
-40
lines changed

5 files changed

+12
-40
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
uses: actions/upload-artifact@v4
9696
with:
9797
name: massastation_${{ matrix.target }}_${{ matrix.arch }}_package
98-
path: massastation.tar.xz
98+
path: MassaStation.tar.xz
9999
if-no-files-found: error
100100
retention-days: 1
101101

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ tasks:
109109
desc: Packages MassaStation using fyne
110110
platforms: [linux, darwin]
111111
cmds:
112-
- cmd: fyne package -src ./cmd/massastation -icon ../../int/systray/embedded/logo.png {{if .OS}}--os {{.OS}}{{end}}
112+
- cmd: fyne package -src ./cmd/massastation -icon ../../int/systray/embedded/logo.png -name MassaStation --app-id net.massalabs.massastation {{if .OS}}--os {{.OS}}{{end}}
113113

114114
generate-dirs:
115115
desc: Generates required directories for MassaStation

cmd/massastation/fyne_metadata_init.go

Lines changed: 0 additions & 25 deletions
This file was deleted.

installer/deb/create_deb.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BUILD_DIR=builddeb
88
TMP_DIR=tmpdeb
99
PKGVERSION=0.0.0-dev
1010

11-
MASSASTATION_ARCHIVE_NAME=massastation.tar.xz
11+
MASSASTATION_ARCHIVE_NAME=MassaStation.tar.xz
1212
MASSASTATION_BINARY_NAME=massastation
1313

1414
# Print error message to stderr and exit with code 1.
@@ -36,7 +36,7 @@ build_massastation() {
3636
go generate ../... || fatal "go generate failed for $MASSASTATION_BINARY_NAME"
3737
export GOARCH=$ARCH
3838
export CGO_ENABLED=1
39-
fyne package -src ../cmd/massastation -icon ../../int/systray/embedded/logo.png || fatal "fyne package failed for $MASSASTATION_BINARY_NAME"
39+
fyne package -src ../cmd/massastation -icon ../../int/systray/embedded/logo.png -name MassaStation --app-id com.massalabs.massastation || fatal "fyne package failed for $MASSASTATION_BINARY_NAME"
4040
}
4141

4242
# Delete the build directory if it exists.
@@ -67,21 +67,18 @@ main() {
6767

6868
mkdir -p $BUILD_DIR/usr/bin || fatal "failed to create $BUILD_DIR/usr/bin"
6969

70-
# Find and copy the binary
71-
BINARY_PATH=$(find $TMP_DIR -type f -name "$MASSASTATION_BINARY_NAME" -o -name "massastation_*" | head -1)
72-
[ -z "$BINARY_PATH" ] && fatal "failed to find $MASSASTATION_BINARY_NAME binary in $TMP_DIR"
73-
cp "$BINARY_PATH" $BUILD_DIR/usr/bin/$MASSASTATION_BINARY_NAME || fatal "failed to copy $MASSASTATION_BINARY_NAME to $BUILD_DIR/usr/bin"
70+
# Check if the binary isn't named massastation. If it isn't, rename it to massastation.
71+
if [ ! -f $TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME ]; then
72+
mv $TMP_DIR/usr/local/bin/massastation_* $TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME || fatal "failed to rename binary to $MASSASTATION_BINARY_NAME"
73+
fi
74+
cp $TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME $BUILD_DIR/usr/bin || fatal "failed to copy $MASSASTATION_BINARY_NAME to $BUILD_DIR/usr/bin"
7475
chmod +x $BUILD_DIR/usr/bin/$MASSASTATION_BINARY_NAME || fatal "failed to make $MASSASTATION_BINARY_NAME executable"
7576

7677
mkdir -p $BUILD_DIR/usr/share/applications || fatal "failed to create $BUILD_DIR/usr/share/applications"
77-
DESKTOP_PATH=$(find $TMP_DIR -type f -name "*.desktop" | head -1)
78-
[ -z "$DESKTOP_PATH" ] && fatal "failed to find .desktop file in $TMP_DIR"
79-
cp "$DESKTOP_PATH" $BUILD_DIR/usr/share/applications/net.massalabs.massastation.desktop || fatal "failed to copy .desktop file to $BUILD_DIR/usr/share/applications"
78+
cp $TMP_DIR/usr/local/share/applications/net.massalabs.massastation.desktop $BUILD_DIR/usr/share/applications || fatal "failed to copy net.massalabs.massastation.desktop to $BUILD_DIR/usr/share/applications"
8079

8180
mkdir -p $BUILD_DIR/usr/share/pixmaps || fatal "failed to create $BUILD_DIR/usr/share/pixmaps"
82-
ICON_PATH=$(find $TMP_DIR -type f -name "*.png" | head -1)
83-
[ -z "$ICON_PATH" ] && fatal "failed to find .png icon in $TMP_DIR"
84-
cp "$ICON_PATH" $BUILD_DIR/usr/share/pixmaps/net.massalabs.massastation.png || fatal "failed to copy icon to $BUILD_DIR/usr/share/pixmaps"
81+
cp $TMP_DIR/usr/local/share/pixmaps/net.massalabs.massastation.png $BUILD_DIR/usr/share/pixmaps || fatal "failed to copy net.massalabs.massastation.png to $BUILD_DIR/usr/share/pixmaps"
8582

8683
mkdir -p $BUILD_DIR/usr/share/doc/massastation || fatal "failed to create $BUILD_DIR/usr/share/doc/massastation"
8784
cp common/MassaStation_ToS.txt $BUILD_DIR/usr/share/doc/massastation/terms-and-conditions.txt || fatal "failed to copy MassaStation_ToS.txt to $BUILD_DIR/usr/share/doc/massastation/terms-and-conditions.txt"

installer/macos/create_pkg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ build_massastation() {
4949
go generate ../... || fatal "go generate failed for $MASSASTATION_APPLICATION_NAME"
5050
export GOARCH=$ARCH
5151
export CGO_ENABLED=1
52-
fyne package -src ../cmd/massastation -icon ../../int/systray/embedded/logo.png || fatal "fyne package failed for $MASSASTATION_APPLICATION_NAME"
52+
fyne package -src ../cmd/massastation -icon ../../int/systray/embedded/logo.png -name MassaStation --app-id com.massalabs.massastation || fatal "fyne package failed for $MASSASTATION_APPLICATION_NAME"
5353
chmod +x $MASSASTATION_APPLICATION_NAME || fatal "failed to chmod $MASSASTATION_APPLICATION_NAME"
5454
}
5555

0 commit comments

Comments
 (0)