Skip to content

Commit a27368d

Browse files
authored
Linux build instructions in BUILD.md (#531)
Adds Linux build instructions and corresponding Docker file.
1 parent 07e76e3 commit a27368d

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

BUILD.md

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ The following steps will allow you to compile your own NorthstarLauncher executa
33

44
*This guide assumes you have already installed Northstar as shown in [this page](https://r2northstar.gitbook.io/r2northstar-wiki/installing-northstar/basic-setup)*
55

6+
## Windows
67
### Steps
78
1. **Install Git** from [this link](https://git-scm.com)
89
2. **Clone** the [R2Northstar/NorthstarLauncher](https://github.com/R2Northstar/NorthstarLauncher) repo with submodules using this command `git clone --recurse-submodules https://github.com/R2Northstar/NorthstarLauncher.git`
@@ -39,3 +40,12 @@ Developers who can work a command line may be interested in using [Visual Studio
3940
- Run `cmake . -G "Ninja"` to generate build files.
4041

4142
- Run `cmake --build .` to build the project.
43+
44+
## Linux
45+
### Steps
46+
1. Clone the GitHub repo
47+
2. Use `cd` to navigate to the cloned repo's directory
48+
3. Then, run the following commands in order:
49+
* `docker build --rm -t northstar-build-fedora .`
50+
* `docker run --rm -it -e CC=cl -e CXX=cl --mount type=bind,source="$(pwd)",destination=/build northstar-build-fedora cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -G "Ninja"`
51+
* `docker run --rm -it -e CC=cl -e CXX=cl --mount type=bind,source="$(pwd)",destination=/build northstar-build-fedora cmake --build .`

Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM registry.fedoraproject.org/fedora-toolbox:38
2+
RUN dnf update -y && \
3+
dnf install -y \
4+
git \
5+
wine \
6+
wine-mono \
7+
python3 \
8+
msitools \
9+
python3-simplejson \
10+
python3-six \
11+
cmake \
12+
ninja-build \
13+
make \
14+
samba \
15+
libunwind && \
16+
dnf clean all && \
17+
mkdir /opt/msvc/ /build
18+
19+
RUN git config --global --add safe.directory /build
20+
RUN git clone https://github.com/mstorsjo/msvc-wine && \
21+
./msvc-wine/vsdownload.py --accept-license --dest /opt/msvc/ && \
22+
./msvc-wine/install.sh /opt/msvc/ && \
23+
rm -rf ~/.wine ./msvc-wine/ && \
24+
git config --global --add safe.directory '/build'
25+
ENV PATH="/opt/msvc/bin/x64:${PATH}"
26+
WORKDIR /build/

0 commit comments

Comments
 (0)