Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: disable CGO and update docs #71

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
PACKAGE = github.com/named-data/YaNFD
VERSION = 1.3.0.0
# COMMIT = git rev-parse --short HEAD
# DATE != date

.PHONY: all install clean test coverage

all: yanfd

yanfd: clean
go build -ldflags "-X 'main.Version=${VERSION}'" ${PACKAGE}/cmd/yanfd
CGO_ENABLED=0 go build -o yanfd -ldflags "-X 'main.Version=${VERSION}'" cmd/yanfd/main.go

install:
install -m 755 yanfd /usr/local/bin
Expand All @@ -23,20 +20,3 @@ test:

coverage:
go tool cover -html=coverage.out

cleanui:
rm -f yanfdui

yanfdui: cleanui
go build -ldflags "-X 'main.Version=${VERSION}' -X 'main.HttpBaseDir=cmd/yanfdui'" ${PACKAGE}/cmd/yanfdui

# To publish a Windows Store application
# rm -rf publish
# mkdir publish
# go generate github.com/named-data/YaNFD/cmd/yanfdui
# go build -ldflags "-X 'main.Version=${VERSION}' ${PACKAGE}/cmd/yanfdui
# mv yanfdui publish/
# cp -R cmd/yanfdui/static publish/
# cp -R cmd/yanfdui/templates publish/
# cp ./ndn_app.ico publish/
# Then, create the YaNFD-x64.msix file (including publish, yanfd.toml)
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ It is compatible with existing NDN applications and utilizes the management tool
# Prerequisites

YaNFD requires [Go 1.23](https://go.dev/doc/install) or later.
Besides that, you will need `libpcap` and `g++` on Linux and MacOS. On Ubuntu, these libraries can be installed by:

```bash
sudo apt install build-essential pkg-config libpcap-dev
```

You may refer to [this](https://github.com/zjkmxy/YaNFD-docker) if you want to build a Docker image.

Expand All @@ -31,6 +26,7 @@ go install github.com/named-data/YaNFD/cmd/yanfd@latest
Get it from: https://www.microsoft.com/store/apps/9NBK3ZJT4CL8

## Install the configuration file

### On MacOS/Linux
```bash
curl -o ./yanfd.toml https://raw.githubusercontent.com/named-data/YaNFD/master/yanfd.toml.sample
Expand All @@ -42,15 +38,17 @@ rm ./yanfd.toml
On MacOS, one also needs to change `socket_path` to `/var/run/nfd/nfd.sock` in the copied configuration file.

### On Windows 10/11
```text

```powershell
curl -o yanfd.toml https://raw.githubusercontent.com/named-data/YaNFD/master/yanfd.toml.sample
mkdir %APPDATA%\ndn
move yanfd.toml %APPDATA%\ndn\
```

One needs to change `socket_path` to `${TEMP}\\nfd\\nfd.sock` in the copied configuration file.
Also, to execute YaNFD on Windows 10, one needs to explicitly specify the configuration path:
```text

```bash
yanfd.exe --config=%APPDATA%\ndn\yanfd.toml
```

Expand All @@ -60,13 +58,16 @@ yanfd.exe --config=%APPDATA%\ndn\yanfd.toml

To build and install YaNFD on Unix-like platforms, run:

make
sudo make install
```bash
make
sudo make install
```

## Windows 10

To build and install YaNFD on Windows, please run the `go build` command in the `Makefile` manually:
```text

```powershell
go build github.com/named-data/YaNFD/cmd/yanfd
```

Expand Down Expand Up @@ -95,7 +96,7 @@ YaNFD supports the majority of this management protocol, but some features are c
# Running

To run YaNFD, run the `yanfd` (or `yanfd.exe`) executable.
To view a list of available options, specify the `--help` argument.
To view a list of available options, specify the `--help` argument.

After starting YaNFD, you can treat it like NFD from an application and configuration perspective.

Expand Down
Loading