mirror of
https://codeberg.org/gaschz/passff-host.git
synced 2025-06-06 18:08:46 +02:00
Makefile fixes
* Move to the root of the repo * Make the install script executable * Add install targets to the Makefile (defaults to install-unix, install-windows not actually tested) * Update doc Signed-off-by: Olivier Mehani <olivier.mehani@learnosity.com>
This commit is contained in:
parent
0982aeaf96
commit
e495e11e3b
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
VERSION := testing
|
VERSION ?= testing
|
||||||
|
BROWSER ?= firefox
|
||||||
|
|
||||||
SRC_DIR := .
|
SRC_DIR := ./src
|
||||||
TARGET_DIR := ../bin/$(VERSION)
|
TARGET_DIR := ./bin/$(VERSION)
|
||||||
|
|
||||||
INSTALL_WIN_FILE := install_host_app.bat
|
INSTALL_WIN_FILE := install_host_app.bat
|
||||||
INSTALL_WIN_SRC := $(SRC_DIR)/$(INSTALL_WIN_FILE)
|
INSTALL_WIN_SRC := $(SRC_DIR)/$(INSTALL_WIN_FILE)
|
||||||
@ -20,12 +21,20 @@ HOST_TARGETS := $(INSTALL_WIN_TARGET) $(INSTALL_UNIX_TARGET) $(HOST_APP_TARGET)
|
|||||||
|
|
||||||
all: $(HOST_TARGETS)
|
all: $(HOST_TARGETS)
|
||||||
|
|
||||||
|
install: install-unix
|
||||||
|
install-unix: $(HOST_TARGETS)
|
||||||
|
$(INSTALL_UNIX_TARGET) --local $(BROWSER)
|
||||||
|
install-win: $(HOST_TARGETS)
|
||||||
|
$(INSTALL_UNIX_TARGET) --local $(BROWSER)
|
||||||
|
|
||||||
%/.d:
|
%/.d:
|
||||||
mkdir -p $(@D)
|
mkdir -p $(@D)
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
$(HOST_TARGETS): $(TARGET_DIR)/%: $(SRC_DIR)/% $(TARGET_DIR)/.d
|
$(HOST_TARGETS): $(TARGET_DIR)/%: $(SRC_DIR)/% $(TARGET_DIR)/.d
|
||||||
sed -e "s/_VERSIONHOLDER_/$(VERSION)/g" < $(SRC_DIR)/$* > $@
|
sed -e "s/_VERSIONHOLDER_/$(VERSION)/g" < $(SRC_DIR)/$* > $@
|
||||||
|
# Make install script executable
|
||||||
|
echo $@ | grep -vq '.sh$$' || chmod a+x $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(TARGET_DIR)
|
rm -rf $(TARGET_DIR)
|
11
README.md
11
README.md
@ -44,16 +44,15 @@ Note: Older Windows versions might require powershell to be installed manually a
|
|||||||
#### Latest from GitHub
|
#### Latest from GitHub
|
||||||
This is not recommended! Only for developers and for testing purposes!
|
This is not recommended! Only for developers and for testing purposes!
|
||||||
|
|
||||||
Clone the repository. Then, from the project's `src/` directory, run `make` and execute the installation script in `bin/testing` for your desired browser (`firefox`, `chrome`, `opera`, `chromium`, or `vivaldi`):
|
Clone the repository. Then, run the following command.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd ./src
|
$ make [VERSION=testing|...] [BROWSER=firefox|chrome|opera|chromium|vivaldi] install
|
||||||
$ make
|
|
||||||
$ cd ../bin/testing
|
|
||||||
$ ./install_host_app.sh --local [firefox|chrome|opera|chromium|vivaldi]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
This will copy the host application and manifest files to the right place for your browser. The `--local` option makes the script use the files on disk rather than downloading them from GitHub.
|
This will generate the host application and installation scripts for the given `VERSION` (`testing` by default), and copy the host application and manifest files to the right place for your `BROWSER` (`firefox` by default).
|
||||||
|
|
||||||
|
This uses the `--local` option of the the `install_host_app.sh` script, which instructs it to use the files on disk rather than downloading them from GitHub.
|
||||||
|
|
||||||
If this doesn't work, you can link the files yourself. First, change the `path` value in the `passff.json` file to be the absolute path to the project's `bin/testing/passff.py` file. Then symlink (or copy) the file `bin/testing/passff.json` to the appropriate location for your browser and OS:
|
If this doesn't work, you can link the files yourself. First, change the `path` value in the `passff.json` file to be the absolute path to the project's `bin/testing/passff.py` file. Then symlink (or copy) the file `bin/testing/passff.json` to the appropriate location for your browser and OS:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user