Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from tygoee/dev
Browse files Browse the repository at this point in the history
Moved some files and functions
  • Loading branch information
tygoee authored Nov 20, 2023
2 parents 64decff + 3c4f68f commit 7f11d43
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 324 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@ Minecraft modpack manager - This solves the problem of having to install mods ma

## "Building" to a `.pyz` file

To make a `.pyz` file, you need to zip the entirety of `src/`, rename it extension to `mcm-manager.pyz` and run:
How to make a `.pyz` file:

Unix/Linux:
1. Clone the git repository (don't cd into it)

```shell
python3 mcm-manager.pyz
git clone https://github.com/tygoee/mcm_manager.git
```

2. Using python `zipapp`, make a pyz file

```shell
python3 -m zipapp mcm_manager/ -m src.runner:main
```

Windows:
To run it

```shell
python mcm-manager.pyz
python3 mcm-manager.pyz
```

To make it an app always accessible from the command line in Unix/Linux, add the [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) `#!/usr/bin/python3` at the start of the `.pyz` file and copy it to `~/.local/bin/`.
Expand Down Expand Up @@ -51,7 +57,7 @@ To get the rest of the information, go to downloads → the file → right click
`media` texture
`name` unique-spawn-eggs-v1-5.zip

Make sure 'name' is ascii encoded, for example `%20` instead of a space
Make sure 'name' is url encoded, for example `%20` instead of a space

## File structure

Expand Down
20 changes: 20 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
#
# MCM-Manager: Minecraft Modpack Manager
# Copyright (C) 2023 Tygo Everts
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

import src.runner
src.runner.main()
280 changes: 0 additions & 280 deletions src/__main__.py

This file was deleted.

5 changes: 5 additions & 0 deletions src/install/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ class Manifest(TypedDict):


# --- modloaders.py --- #
Modloader = Literal['forge', 'fabric'] | str


class _OSDict(TypedDict):
name: Literal["windows", "linux", "osx"] # NotRequired
arch: NotRequired[Literal["x86"]]
Expand All @@ -111,6 +114,8 @@ class _Rules(TypedDict):
class OSLibrary(Library, _Rules):
"All libraries of the media for a specific os"

...


Libraries = dict[str, Library | OSLibrary]

Expand Down
Loading

0 comments on commit 7f11d43

Please sign in to comment.