Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ debian/files
*.debhelper

obj-x86_64-linux-gnu

# Docker build
/build
/build-output
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM linuxmintd/mint21-amd64

WORKDIR /src

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update

RUN apt-get install -y --no-install-recommends \
build-essential \
meson ninja-build pkg-config \
python3 python3-gi \
gobject-introspection \
gtk-doc-tools \
intltool itstool \
libatk1.0-dev \
libcinnamon-desktop-dev \
libexempi-dev \
libexif-dev \
libgail-3-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libgsf-1-dev \
libgtk-3-dev \
libgtk-layer-shell-dev \
libjson-glib-dev \
libpango1.0-dev \
libx11-dev \
libxapp-dev \
libxext-dev \
libxrender-dev \
libwayland-dev \
&& rm -rf /var/lib/apt/lists/*
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.PHONY: build

# Variables
# =============================================================================
VAR_DOCKER_EXE := docker compose
VAR_COMPOSE_FILE := docker-compose.yml
# =============================================================================


# Helpers
# =============================================================================
ARGS ?= $(filter-out $@,$(MAKECMDGOALS))
DOCKER := $(VAR_DOCKER_EXE) -f $(VAR_COMPOSE_FILE)
# =============================================================================


# Core Commands
# =============================================================================

build:
$(DOCKER) run --rm build

fix_permissions:
sudo chown -R $(USER) ./build
sudo chown -R $(USER) ./build-output

install:
sudo killall nemo-desktop nemo 2>/dev/null || true
sleep 1
sudo cp -rf build-output/nemo /usr/bin/nemo
sudo cp -rf build-output/nemo-desktop /usr/bin/nemo-desktop
sudo cp -rf build-output/nemo-autorun-software /usr/bin/nemo-autorun-software
sudo cp -rf build-output/nemo-connect-server /usr/bin/nemo-connect-server
sudo cp -rf build-output/nemo-open-with /usr/bin/nemo-open-with
sudo cp -rf build-output/nemo-extensions-list /usr/lib/x86_64-linux-gnu/nemo/nemo-extensions-list
sudo cp -rf libnemo-private/org.nemo.gschema.xml /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

run_build:
pkill nemo; sleep 1; build-output/nemo

# =============================================================================
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,24 @@ Nemo v1.0.0 had the following features as described by the developers:
9. Full navigation options (back, forward, up, refresh)
10. Ability to toggle between the path entry and the path breadcrumb widgets
11. Many more configuration options

Build from source
====
The easiest way to build Nemo is with
[Docker](https://docs.docker.com/get-docker/)
and
[Docker Compose](https://docs.docker.com/compose/install/).

```bash
make build
```

Compiled output is written to `./build-output/`.

> **Note:** Because the build runs inside a Docker container,
the `./build-output/` and `./build/` directories and their
contents will be owned by `root`. To restore ownership to your
user, run:
> ```bash
> make fix_permissions
> ```
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
build:
build:
dockerfile: Dockerfile
context: .
volumes:
- .:/src
- ./build-output:/src/build/src
command: bash -c "rm -rf /src/build/src/* && meson setup build --prefix=/usr && ninja -C build"