Skip to content

Commit

Permalink
Project rebranding
Browse files Browse the repository at this point in the history
  • Loading branch information
jgmdev committed Oct 9, 2024
1 parent fd77357 commit 1dbc575
Show file tree
Hide file tree
Showing 18 changed files with 746 additions and 726 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI
on:
push: { branches: [master] }
workflow_dispatch:
permissions: write-all

jobs:
build:
Expand Down Expand Up @@ -32,7 +33,7 @@ jobs:
echo VERSION=`git describe --tags --abbrev=0 --match "v*" | tail -c +2` >> $GITHUB_ENV
echo FULL_VERSION=`git describe --tags --match "v*" | tail -c +2` >> $GITHUB_ENV
echo ARCH=${{ matrix.config.arch }}-${{ matrix.config.platform }} >> $GITHUB_ENV
echo BIN=lpm.${{ matrix.config.arch }}-${{ matrix.config.platform }}${{ matrix.config.suffix }} >> $GITHUB_ENV
echo BIN=ppm.${{ matrix.config.arch }}-${{ matrix.config.platform }}${{ matrix.config.suffix }} >> $GITHUB_ENV
echo HOSTCC=gcc >> $GITHUB_ENV
- name: Setup (Linux)
Expand Down Expand Up @@ -85,19 +86,19 @@ jobs:
- name: Build
run: |
./build.sh clean && ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -static -O3
./build.sh clean && ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$FULL_VERSION-$ARCH'"' -static -O3
- name: Run Tests
if: ${{ matrix.config.native }}
run: |
cp $BIN lpm && ./lpm test t/run.lua
# - name: Run Tests
# if: ${{ matrix.config.native }}
# run: |
# cp $BIN ppm && ./ppm test t/run.lua

# - name: Package Debian/Ubuntu
# env: { ARCH: "amd64", DESCRIPTION: "A plugin manager for the lite-xl text editor.", MAINTAINER: "Adam Harrison <[email protected]>" }
# env: { ARCH: "amd64", DESCRIPTION: "A plugin manager for the pragtical text editor.", MAINTAINER: "Adam Harrison <[email protected]>" }
# run: |
# export NAME=lpm_$VERSION.0-$REV""_$ARCH
# mkdir -p $NAME/usr/bin $NAME/DEBIAN && cp lpm $NAME/usr/bin
# printf "Package: lpm\nVersion: $VERSION\nArchitecture: $ARCH\nMaintainer: $MAINTAINER\nDescription: $DESCRIPTION\n" > $NAME/DEBIAN/control
# export NAME=ppm_$VERSION.0-$REV""_$ARCH
# mkdir -p $NAME/usr/bin $NAME/DEBIAN && cp ppm $NAME/usr/bin
# printf "Package: ppm\nVersion: $VERSION\nArchitecture: $ARCH\nMaintainer: $MAINTAINER\nDescription: $DESCRIPTION\n" > $NAME/DEBIAN/control
# dpkg-deb --build --root-owner-group $NAME

- name: Upload Artifacts
Expand Down Expand Up @@ -128,11 +129,11 @@ jobs:
echo VERSION=`git describe --tags --abbrev=0 --match "v*" | tail -c +2` >> $GITHUB_ENV
echo REV=$((`git describe --tags --match "v*" | sed 's/.*-\([0-9]*\)-.*/\1/' | sed s/^v.*//` + 1)) >> $GITHUB_ENV
echo ARCH=${{ matrix.config.arch }}-darwin >> $GITHUB_ENV
echo BIN=lpm.${{ matrix.config.arch }}-darwin >> $GITHUB_ENV
echo BIN=ppm.${{ matrix.config.arch }}-darwin >> $GITHUB_ENV
- name: Build
run: |
./build.sh clean && ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -O3
./build.sh clean && ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$FULL_VERSION-$ARCH'"' -O3
- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand All @@ -158,7 +159,7 @@ jobs:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: lpm.*
pattern: ppm.*
path: artifacts
merge-multiple: true

Expand All @@ -179,11 +180,3 @@ jobs:
fi
git tag -f continuous
git push -f origin refs/tags/continuous
- name: Discord Notification
env: { DISCORD_WEBHOOK: "${{ secrets.DISCORD_WEBHOOK }}" }
run: |
if [[ -n "$DISCORD_WEBHOOK" ]] && [[ `git tag --points-at HEAD v* | head -c 1` == "v" ]]; then
perl -e 'use JSON qw(encode_json from_json); $/ = undef; print encode_json({ content => "## Lite XL Plugin Manager $ENV{VERSION} has been released!\nhttps://github.com/lite-xl/lite-xl-plugin-manager/releases/tag/v$ENV{VERSION}\n@release:lpm\n### Changes in $ENV{VERSION}:\n" . <> })' < NOTES.md |
curl -H 'Content-Type:application/json' $DISCORD_WEBHOOK -X POST -d "$(</dev/stdin)"
fi
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
lpm
ppm
lua.exe
lpm-*
ppm-*
*.o
lpm.lua.c
ppm.lua.c
lib/prefix
src/lpm.luac.c
src/lpm.luac
src/ppm.luac.c
src/ppm.luac
lib/mbedtls-2.27.0/build
lib/mbedtls-2.27.0/tests
130 changes: 65 additions & 65 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## LPM License
## PPM License

Copyright (c) 2022 lite-xl Team
Copyright (c) 2022 pragtical Team

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
78 changes: 40 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
# Lite XL Plugin Manager (lpm)
**Warning:** This repository could be regularly rebased

# Pragtical Plugin Manager (ppm)

![image](https://user-images.githubusercontent.com/1034518/216748882-3ae8c8d4-a767-4d97-acc4-c1cde7e3e331.png)

A standalone binary that provides an easy way of installing, and uninstalling
plugins from lite-xl, as well as different version of lite-xl.
plugins from pragtical, as well as different version of pragtical.

Can be used by a package manager plugin that works from inside the editor
and calls this binary.

Also contains a `plugin_manager.lua` plugin to integrate the binary with lite-xl in
Also contains a `plugin_manager.lua` plugin to integrate the binary with pragtical in
the form of an easy-to-use GUI.

By default in releases, `lpm` will automatically consume the `manifest.json`
By default in releases, `ppm` will automatically consume the `manifest.json`
in the `latest` branch of this repository, which corresponds to the most
recent versioned release.

Conforms to [SCPS3](https://github.com/adamharrison/straightforward-c-project-standard#SCPS3).

## Status

`lpm` 1.0 has been just released, and so may still contain bugs, but is generally feature-complete.
`ppm` 1.0 has been just released, and so may still contain bugs, but is generally feature-complete.

## Specification

For details about the `manifest.json` files that `lpm` consumes,
For details about the `manifest.json` files that `ppm` consumes,
[see here](SPEC.md).

## Quickstart

The fastest way to get started with lpm is to simply pull a release.
The fastest way to get started with ppm is to simply pull a release.

```
wget https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-linux -O lpm && chmod +x lpm
wget https://github.com/pragtical/plugin-manager/releases/download/latest/ppm.x86_64-linux -O ppm && chmod +x ppm
```

If you want to get the GUI version installed with lite-xl, you can tell `lpm` to install `plugin_manager`, which will allow
you to access `Plugin Manager: Show` in the command palette in `lite-xl`.
If you want to get the GUI version installed with pragtical, you can tell `ppm` to install `plugin_manager`, which will allow
you to access `Plugin Manager: Show` in the command palette in `pragtical`.

```
./lpm install plugin_manager --assume-yes
./ppm install plugin_manager --assume-yes
```

### Compilation
Expand All @@ -47,46 +49,46 @@ If you have a C compiler, and `git`, and want to compile from scratch,
you can do:

```
git clone https://github.com/lite-xl/lite-xl-plugin-manager.git \
--shallow-submodules --recurse-submodules && cd lite-xl-plugin-manager &&\
./build.sh -DLPM_STATIC && ./lpm
git clone https://github.com/pragtical/plugin-manager.git \
--shallow-submodules --recurse-submodules && cd plugin-manager &&\
./build.sh -DPPM_STATIC && ./ppm
````
If you want to build it quickly, and have the right modules installed, you can
do:
```
./build.sh -lgit2 -lzip -llua -lm -lmbedtls -lmbedx509 -lmbedcrypto -lz -DLPM_STATIC
./build.sh -lgit2 -lzip -llua -lm -lmbedtls -lmbedx509 -lmbedcrypto -lz -DPPM_STATIC
```
OR
```
gcc src/lpm.c lib/microtar/src/microtar.c -Ilib/microtar/src -lz -lgit2 \
-lzip -llua -lm -lmbedtls -lmbedx509 -lmbedcrypto -o lpm
gcc src/ppm.c lib/microtar/src/microtar.c -Ilib/microtar/src -lz -lgit2 \
-lzip -llua -lm -lmbedtls -lmbedx509 -lmbedcrypto -o ppm
```
CI is enabled on this repository, so you can grab Windows and Linux builds from the
`continuous` [release page](https://github.com/lite-xl/lite-xl-plugin-manager/releases/tag/continuous),
which is a nightly, or the `latest` [release page](https://github.com/lite-xl/lite-xl-plugin-manager/releases/tag/latest),
`continuous` [release page](https://github.com/pragtical/plugin-manager/releases/tag/continuous),
which is a nightly, or the `latest` [release page](https://github.com/pragtical/plugin-manager/releases/tag/latest),
which holds the most recent released version.
There are also tagged releases, for specified versions.
You can get a feel for how to use `lpm` by typing `./lpm --help`.
You can get a feel for how to use `ppm` by typing `./ppm --help`.
You can also use `scoop` to grab `lpm`:
You can also use `scoop` to grab `ppm`:
```
scoop install https://raw.githubusercontent.com/lite-xl/lite-xl-plugin-manager/refs/heads/master/lite-xl-plugin-manager.json
scoop install https://raw.githubusercontent.com/pragtical/plugin-manager/refs/heads/master/pragtical-plugin-manager.json
```
Please note, that _meson_ is _not_ necessarily the best way to compile `lpm`. If you have troubles with it, please do consider using the build.sh script.
Please note, that _meson_ is _not_ necessarily the best way to compile `ppm`. If you have troubles with it, please do consider using the build.sh script.
## Supporting Libraries / Dependencies
As seen in the `lib` folder, the following external libraries are used to
build `lpm` as git submodules:
build `ppm` as git submodules:
* `lua` (core program written in)
* `mbedtls` (https/SSL support)
Expand All @@ -95,12 +97,12 @@ build `lpm` as git submodules:
* `libzip` (for unpacking .zip files)
* `libmicrotar` (for unpacking .tar.gz files)
To build, `lpm` only requires a C compiler. To run the underlying build process
To build, `ppm` only requires a C compiler. To run the underlying build process
for `mbedtls` and `libgit2`, `cmake` is also required.
## Supported Platforms
`lpm` should work on all platforms `lite-xl` works on; but releases are offered for the following:
`ppm` should work on all platforms `pragtical` works on; but releases are offered for the following:
* Windows x86_64
* Linux x86_64
Expand All @@ -118,44 +120,44 @@ Experimental support (i.e. doesn't work) exists for the following platforms:
## Use in CI
To make pre-fab lite builds, you can easily use `lpm` in CI. If you had a linux build container, you could do something like:
To make pre-fab pragtical builds, you can easily use `ppm` in CI. If you had a linux build container, you could do something like:
```sh
curl https://github.com/adamharrison/lite-xl-plugin-manager/releases/download/v0.1/lpm.x86_64-linux > lpm
export LITE_USERDIR=lite-xl/data && export LPM_CACHE=/tmp/cache
./lpm add https://github.com/adamharrison/lite-xl-plugin-manager && ./lpm install plugin_manager lsp
curl https://github.com/pragtical/plugin-manager/releases/download/v0.1/ppm.x86_64-linux > ppm
export PRAGTICAL_USERDIR=pragtical/data && export PPM_CACHE=/tmp/cache
./ppm add https://github.com/pragtical/plugin-manager && ./ppm install plugin_manager lsp
```

## Usage

```sh
lpm install aligncarets
lpm uninstall aligncarets
ppm install aligncarets
ppm uninstall aligncarets
```

```sh
lpm --help
ppm --help
```

## Building & Running

### Linux & MacOS & Windows MSYS

```
./build.sh clean && ./build.sh -DLPM_STATIC && ./lpm
./build.sh clean && ./build.sh -DPPM_STATIC && ./ppm
```

### Linux -> Windows

```
./build.sh clean && CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-gcc-ar WINDRES=x86_64-w64-mingw32-windres \
CMAKE_DEFAULT_FLAGS="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER\ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_INCLUDE_PATH=/usr/share/mingw-w64/include"\
GIT2_CONFIGURE="-DDLLTOOL=x86_64-w64-mingw32-dlltool" ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$VERSION-x86_64-windows-`git rev-parse --short HEAD`'"'
GIT2_CONFIGURE="-DDLLTOOL=x86_64-w64-mingw32-dlltool" ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$VERSION-x86_64-windows-`git rev-parse --short HEAD`'"'
```

## Tests

To run the test suite, you can use `lpm` to execute the test by doing `./lpm test t/run.lua`. use `FAST=1 ./lpm test t/run.lua` to avoid the costs of tearing down and building up suites each time.
To run the test suite, you can use `ppm` to execute the test by doing `./ppm test t/run.lua`. use `FAST=1 ./ppm test t/run.lua` to avoid the costs of tearing down and building up suites each time.

## Extra Features

Expand All @@ -172,5 +174,5 @@ An array of files to be marked as executable (after extraction, if applicable).
If you find a bug, please create an issue with the following information:

* Your operating system.
* The commit or version of LPM you're using (`lpm --version` for releases).
* The exact steps to reproduce in LPM invocations, if possible from a fresh LPM install (targeting an empty folder with `--userdir`).
* The commit or version of PPM you're using (`ppm --version` for releases).
* The exact steps to reproduce in PPM invocations, if possible from a fresh PPM install (targeting an empty folder with `--userdir`).
Loading

0 comments on commit 1dbc575

Please sign in to comment.