Skip to content

Commit 39c5dd2

Browse files
committed
Linux stuff pt.2
1 parent 1341c88 commit 39c5dd2

File tree

11 files changed

+33
-30
lines changed

11 files changed

+33
-30
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,29 +62,31 @@ $ ./go
6262

6363
Principia will launch if everything was successful. Note that the compilation might take up to 10 minutes depending on your system.
6464

65-
## Building on Linux (Debian)
65+
## Building on Linux
6666

67-
Install dependencies:
67+
Install dependencies (example is for Debian-based packages):
6868

69-
$ sudo apt-get install automake libgtk2.0-dev libgl-dev libxss-dev libxxf86vm-dev libasound2-dev libudev-dev valgrind
69+
$ sudo apt-get install automake libgtk2.0-dev libgl-dev libxss-dev libxxf86vm-dev libasound2-dev libudev-dev valgrind
7070

7171
Navigate to the build-linux directory and start the building process:
7272

73-
$ cd build-linux;
73+
$ cd build-linux;
74+
$ ./autogen.sh
75+
$ ./configure
76+
$ ./go
7477

75-
$ ./autogen.sh
78+
If everything goes well, Principia will start by default unless `--silent` is passed to the `go` script.
7679

77-
$ ./configure
80+
### Packaging for Linux
81+
When building Principia for packaging, you would want to use the following command to replace the above. It will clean the source tree, build a release version and not automatically run Principia.
7882

79-
$ ./go
83+
./go --clean --release --silent
8084

81-
If everything goes well, Principia will start but then freeze at the loading screen due some uninitialize directories. Terminate Principia by replying 'y' in the gdb prompt in the terminal, then in the same terminal, go up a directory and launch it from the parent directory instead:
8285

83-
$ cd ..
8486

85-
$ build-linux/apparatus2
87+
Right now Principia needs to be installed with its executable next to the data directories. Putting all of that in `/opt/principia/` and symlinking `/usr/bin/principia` => `/opt/principia/principia` should do for now.
8688

87-
(this bug will be fixed in short)
89+
The `build-linux` directory contains desktop files and an usable icon, which can be installed into `/usr/share/applications/` and `/usr/share/pixmaps` respectively. `principia-url-handler.desktop` is for handling principia:// protocol links and is confirmed to work on at least Firefox and Chromium.
8890

8991
## Building for Android (on Linux)
9092

build-linux/data-pc

Lines changed: 0 additions & 1 deletion
This file was deleted.

build-linux/data-pc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../data-pc/

build-linux/data-shared

Lines changed: 0 additions & 1 deletion
This file was deleted.

build-linux/data-shared

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../data-shared/

build-linux/go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,8 @@ if [ "$run" -eq "1" ]; then
148148
elif [ "$debug" -eq "4" ]; then # --leak
149149
valgrind --suppressions=./valgrind.supp --tool=memcheck --leak-check=full --show-possibly-lost=yes --track-origins=yes ./apparatus2
150150
elif [ "$debug" -eq "1" ]; then
151-
cd ../
152-
gdb -ex run -ex quit build-linux/apparatus2
151+
gdb -ex run -ex quit ./apparatus2
153152
else
154-
cd ../
155-
build-linux/apparatus2
153+
./apparatus2
156154
fi
157155
fi

build-linux/uri_associate_gnome.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

build-screenshot-linux/autogen.sh

100644100755
File mode changed.

build-screenshot-linux/data-pc

Lines changed: 0 additions & 1 deletion
This file was deleted.

build-screenshot-linux/data-pc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../data-pc/

0 commit comments

Comments
 (0)