Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
chore: remove package repositories, update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Blooym committed Sep 6, 2023
1 parent 5c5ccc9 commit f93fa40
Show file tree
Hide file tree
Showing 23 changed files with 349 additions and 595 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine
FROM golang:1.21-alpine

# Install Git and OpenSSH.
RUN apk add --no-cache --update git openssh upx curl
Expand Down
72 changes: 0 additions & 72 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ archives:
files:
- LICENSE*
- README*
- CHANGELOG*
- src: ./.build_data/man/*.gz
dst: manpages/
strip_parent: true
Expand All @@ -47,77 +46,6 @@ changelog:
- "^build:"
- "^ci:"

brews:
- tap:
owner: Blooym
name: proto
commit_author:
name: github-actions
email: actions@github.com
dependencies:
- name: gnu-tar
commit_msg_template: "build: Brew formula update for version {{ .Tag }}"
description: |
Proto compatability tool manager
homepage: "https://github.com/Blooym/proto"
license: "GPL-3.0-only"

nfpms:
- vendor: Blooym
id: nfpm
homepage: https://github.com/Blooym/proto
maintainer: Blooym
description: |
Proto compatability tool manager
license: "GPL-3.0"
priority: extra
section: Utilities
formats:
- deb
- rpm
dependencies:
- tar
provides:
- proto
contents:
# Desktop and Store files.
- src: ./.build_data/dev.blooym.proto.desktop
dst: /usr/share/applications/dev.blooym.proto.desktop
- src: ./.build_data/dev.blooym.proto.metainfo.xml
dst: /usr/share/metainfo/dev.blooym.proto.metainfo.xml

# Icon files.
- dst: /usr/share/icons/proto
type: dir
- src: ./.build_data/icon.png
dst: /usr/share/icons/proto/icon.png

# Man pages.
- src: ./.build_data/man/
dst: /usr/share/man/man1/

# Doc files.
- dst: /usr/share/doc/proto
type: dir
- src: ./LICENSE
dst: /usr/share/doc/proto/LICENSE
- src: ./README.md
dst: /usr/share/doc/proto/README

# Yum/DNF repository.
- src: ./.build_data/blooym.repo
dst: /etc/yum.repos.d/blooym.repo
type: config|noreplace
packager: rpm

# APT repository.
- src: ./.build_data/blooym.list
dst: /etc/apt/sources.list.d/blooym.list
type: config|noreplace
packager: deb
rpm:
compression: xz

publishers:
- name: "packages.blooym.dev"
dir: "{{ dir .ArtifactPath }}"
Expand Down
19 changes: 0 additions & 19 deletions CONTRIBUTING.md

This file was deleted.

133 changes: 0 additions & 133 deletions build/generate.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package main

import (
"bytes"
"compress/gzip"
"io"
"io/ioutil"
"os"

"github.com/Blooym/proto/cmd"
"github.com/Blooym/proto/core"
"github.com/spf13/cobra/doc"
)

Expand All @@ -24,11 +17,6 @@ func main() {
cleanup()
createBuildDir(build_dir)

generateAPTRepoFile()
generateDNFRepoFile()
generateDesktop()
generateMetainfo()
generateIcon()
generateMANPages()
}

Expand All @@ -39,127 +27,6 @@ func createBuildDir(dir string) {
}
}

// Create a file in the build directory
func createBuildFile(fileName string, data string) {
file, err := os.Create(build_dir + fileName)
core.CheckError(err)

defer file.Close()

_, err = file.WriteString(data)
core.CheckError(err)

file.Sync()
}

// Generate the .desktop file
func generateDesktop() {

version := os.Args[1]

if version == "" {
panic("No version specified")
}

fileData := `[Desktop Entry]
Type=Application
Name=Proto
Comment=Proto compatability & runner manager
Icon=/usr/share/icons/proto/icon.png
Exec=proto
Terminal=true
Categories=ConsoleOnly;Utility;X-GNOME-Utilities;FileTools;
Keywords=proton;steamplay;wine;runner;
NoDisplay=true
`

createBuildFile("dev.blooym.proto.desktop", fileData)
}

func generateDNFRepoFile() {
fileData := `[Blooym]
name=Blooym Packages
baseurl=https://packages.blooym.dev/yum/
enabled=1
gpgcheck=0`
createBuildFile("blooym.repo", fileData)
}

func generateAPTRepoFile() {
fileData := `deb [trusted=yes] https://packages.blooym.dev/apt/ /`
createBuildFile("blooym.list", fileData)
}

// Generate the .metainfo.xml file
func generateMetainfo() {
fileData := `<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2020 Blooym -->
<component type="desktop-application">
<id>dev.blooym.proto</id>
<name>Proto</name>
<developer_name>Blooym</developer_name>
<content_rating type="oars-1.1" />
<icon type="local" width="128" height="128">/usr/share/icons/proto/icon.png</icon>
<launchable type="desktop-id">dev.blooym.proto.desktop</launchable>
<metadata_license>MIT</metadata_license>
<project_license>GPL-3.0-only</project_license>
<summary>Manage custom runner installations</summary>
<description>
<p>
Install and manage custom runners with ease from the command-line. Proto is a tool for managing custom wine runners for multiple programs without the need to manually download and extract them.
Features:
- Multi-user support with no additional setup
- Intuitive CLI with powerful configuration
- Deep information about installed runners & new releases
- & more!
</p>
</description>
<provides>
<binary>proto</binary>
</provides>
<screenshots>
<screenshot type="default">
<caption>The Main CLI Page</caption>
<image type="source">https://raw.githubusercontent.com/Blooym/proto/main/.assets/Screenshots/main_app_screenshot.png</image>
</screenshot>
</screenshots>
<recommends>
<display_length compare="ge">medium</display_length>
<control>keyboard</control>
<control>pointing</control>
<control>console</control>
</recommends>
<url type="homepage">https://github.com/Blooym/proto</url>
<url type="bugtracker">https://github.com/Blooym/proto/issues</url>
<url type="faq">https://github.com/Blooym/proto#readme</url>
<url type="help">https://github.com/Blooym/proto#readme</url>
</component>`

createBuildFile("dev.blooym.proto.metainfo.xml", fileData)
}

// Fetch the icon from the assets and put it in the build directory
func generateIcon() {
srcFile, err := os.Open("./.assets/Logos/icon.png")
core.CheckError(err)
defer srcFile.Close()

destFile, err := os.Create(build_dir + "icon.png")
core.CheckError(err)
defer destFile.Close()

_, err = io.Copy(destFile, srcFile)
core.CheckError(err)

err = destFile.Sync()
core.CheckError(err)
}

func generateMANPages() {
// Generate the man pages
header := &doc.GenManHeader{
Expand Down
5 changes: 0 additions & 5 deletions cmd/config.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/info.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/install.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/list.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/releases.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/uninstall.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
5 changes: 0 additions & 5 deletions cmd/update.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package cmd

import (
Expand Down
11 changes: 3 additions & 8 deletions config/defaults.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
Copyright © 2022 Blooym
GPLv3 License, see the LICENSE file for more information.
*/
package config

import (
Expand All @@ -13,7 +8,7 @@ import (
)

/*
SetDefaults sets the default values for the configuration file.
SetDefaults sets the default values for the configuration file.
*/
func SetDefaults() {
configDir, _ := os.UserConfigDir()
Expand All @@ -34,8 +29,8 @@ func SetDefaults() {
"GloriousEggroll/wine-ge-custom",
})
viper.SetDefault("app.customlocations", map[string]string{
"steam": "~/.steam/root/compatibilitytools.d/",
"lutris": "~/.local/share/lutris/runners/wine/",
"steam": "~/.steam/root/compatibilitytools.d/",
"lutris": "~/.local/share/lutris/runners/wine/",
"lutrisflatpak": "~/.var/app/net.lutris.Lutris/data/lutris/runners/wine",
})

Expand Down
Loading

0 comments on commit f93fa40

Please sign in to comment.