Skip to content

Commit 55c3be0

Browse files
authored
Merge pull request #15 from sucksome/master
Aris for Qt and WebAssembly
2 parents 23587ae + 32e24bf commit 55c3be0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+10987
-7628
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ build-aux
1313
*.o
1414
src/aris
1515
src/.deps
16+
build*
17+
libxml2
18+
qt/*.user
1619

1720
# Generated Documentation
1821
doc/aris/*.html
1922
doc/aris.info
2023
doc/stamp-vti
21-
doc/version.texi
24+
doc/version.texi

AUTHORS

+4
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ The following people contributed to GNU Aris,
1010
and their time and effort are greatly appreciated:
1111

1212
13+
Kovács Zoltán <[email protected]>
14+
Saksham Attri <[email protected]>
15+
Alexander Thaller <[email protected]>
16+
Andreas Ebetshuber <[email protected]>

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project(aris C)
33

44
set(PACKAGE_NAME "GNU Aris")
55
set(PACKAGE "aris")
6-
set(ARIS_VERSION "2.2")
6+
set(ARIS_VERSION "3.0")
77
set(PACKAGE_BUGREPORT "[email protected]")
88

99
set(CMAKE_C_STANDARD 11)

NEWS

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ This NEWS file records important changes.
77
notice and this notice are preserved.
88

99

10+
3.0
11+
12+
* Added a qt version.
13+
14+
* Added support for WebAssembly compilation.
15+
16+
* Fixed up subproof referencing bugs.
17+
18+
* Fixed up On-Screen Keyboard bugs on gtk build.
19+
1020
2.2
1121

1222
* Added undo/redo functionality.

README

-34
This file was deleted.

README.md

+104-18
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,45 @@
11

2-
### GNU Aris distribution
2+
# GNU Aris
33

44
GNU Aris is a logical proof program that provides support for propositional and predicate logic, Boolean algebra, and arithmetical logic in the form of abstract sequences (seqlog). This software is distributed under the GNU General Public License.
55

6-
--------------------
76
Copyright (C) 2012, 2013 Ian Dunn
87

98
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright
109
notice and this notice are preserved.
1110

12-
----
13-
### Table of Contents
11+
## Table of Contents
1412
- [Installation Guide](#installation-guide)
15-
- [Build GNU Aris through source](#build-gnu-aris-through-source)
13+
- [gtk version](#gtk-version)
14+
- [qt version](#qt-version)
15+
- [WebAssembly](#webassembly)
1616
- [Contributing Guide](#contributing-guide)
1717
- [Getting Started](#getting-started)
1818
- [How to Contribute](#how-to-contribute)
1919
- [Report a Bug](#report-a-bug)
2020
- [Contact Us](#contact-us)
2121
- [References](#references)
2222

23-
### Installation Guide
24-
#### Build GNU Aris through source
25-
To build GNU Aris through source, follow the instructions given below. This should work on Linux, Mac or Windows (by using, for example, the MSYS2 toolchain and its MINGW64 environment):
23+
## Installation Guide
24+
Check under `Releases` for Linux/Windows bundles and `AppImages` or visit our [website](https://matek.hu/zoltan/aris) .
2625

27-
1. Clone the Aris repository from https://github.com/kovzol/aris using the command `git clone https://github.com/kovzol/aris`.
26+
Else, to build GNU Aris through source, follow the instructions given below. This should work on Linux, Mac or Windows (by using, for example, the MSYS2 toolchain and its MINGW64 environment):
2827

29-
2. Create a directory named **build** by entering `mkdir build`.
28+
Clone/Download the repository. For example:
29+
```
30+
git clone https://github.com/kovzol/aris
31+
```
3032

31-
3. Change your working directory to this folder: `cd build`.
33+
### gtk version
3234

33-
3. Run the command `cmake ..`. You should see something like this:
35+
1. Follow the steps:
36+
```
37+
mkdir build
38+
cd build
39+
cmake ..
40+
```
41+
42+
2. You should see something like this:
3443
```
3544
-- The C compiler identification is GNU 11.3.0
3645
-- Detecting C compiler ABI info
@@ -44,10 +53,10 @@ To build GNU Aris through source, follow the instructions given below. This shou
4453
-- Found gtk+-3.0, version 3.24.33
4554
-- Configuring done
4655
-- Generating done
47-
-- Build files have been written to: /home/kovzol/workspace/aris/b
56+
-- Build files have been written to: /home/abc/workspace/aris/build/
4857
```
4958

50-
4. Run the command `make`. You should see something like this at the end of the process:
59+
3. Run the command `make`. You should see something like this at the end of the process:
5160
```
5261
[ 88%] Building C object CMakeFiles/aris.dir/src/undo.c.o
5362
[ 92%] Building C object CMakeFiles/aris.dir/src/var.c.o
@@ -56,13 +65,90 @@ To build GNU Aris through source, follow the instructions given below. This shou
5665
[100%] Built target aris
5766
```
5867

59-
5. Launch GNU Aris using `./aris`.
68+
4. Launch using `./aris`.
69+
70+
For further instructions on building and installation ( without `cmake`), refer to the [INSTALL](INSTALL) file.
71+
72+
#### Snap Installation
73+
74+
To install GNU Aris through snap, visit https://snapcraft.io/aris and find the required distribution details according to your system.
75+
76+
### qt version
77+
#### Using `cmake`
78+
79+
##### Linux
80+
Run the following inside `aris/` :
81+
```
82+
cmake -S qt/ -B build-qt/ -DCMAKE_GENERATOR:STRING=Ninja -DCMAKE_BUILD_TYPE:STRING=Release
83+
cmake --build build-qt/ --target all
84+
```
85+
This should generate a binary `aris-qt` inside `build-qt/` , it can be run with `./aris-qt` or you can install to `/usr/local` with:
86+
```
87+
cd build-qt/ && cmake -P cmake_install.cmake
88+
```
89+
To uninstall:
90+
```
91+
cd build-qt/ && xargs rm < install_manifest.txt
92+
```
93+
94+
##### Windows (with MINGW)
95+
96+
Run the following inside `aris/`:
97+
```
98+
mkdir build
99+
cd build
100+
cmake -G "MinGW Makefiles" ..
101+
mingw32-make -j4
102+
```
60103

61-
For further instructions on building and installation, refer to the INSTALL file.
104+
#### Using `qmake`
62105

63-
#### Run a precompiled binary of GNU Aris through snap
106+
Run the following inside `aris/` with appropriate `path/to/qmake`:
107+
```
108+
mkdir build-qt
109+
cd build-qt
110+
path/to/qmake -o Makefile ../qt/aris-qt.pro -spec linux-g++ CONFIG+=qtquickcompiler
111+
```
112+
This should generate a binary `aris-qt` inside `build-qt/` , it can be run with `./aris-qt` .
113+
114+
### WebAssembly
115+
116+
To build to WebAssembly, `Qt 6.5` and `emscripten` version `3.1.25` are required.
117+
Also, since `emscripten` doesn't have support for `libxml2` yet, it would need to be compiled from source.
118+
119+
Follow these steps (after cloning libxml2) to compile `libxml2` :
120+
```
121+
mkdir build
122+
cd libxml2 && autoreconf -if -Wall
123+
cd ../build
124+
path/to/emconfigure ../libxml2/configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no
125+
path/to/emmake make
126+
path/to/emar rcs libxml2.a *.o
127+
```
128+
129+
Now, inside `aris/` run the following:
130+
```
131+
mkdir libxml2
132+
cp path/to/above/created/libxml2.a libxml2/
133+
cp -r path/to/cloned-libxml2/include/libxml/ libxml2/
134+
```
135+
You can customize these paths by editing the `aris-qt.pro` file.
136+
137+
Finally:
138+
139+
```
140+
mkdir build-wasm
141+
cd build-wasm
142+
/path/to/Qt/6.5.0/wasm_singlethread/bin/qmake /path/to/aris/qt/aris-qt.pro -spec wasm-emscripten && /usr/bin/make qmake_all
143+
make -j $(nproc)
144+
```
145+
146+
Now, run:
147+
```
148+
python -m http.server 8000
149+
```
150+
The project can be found at `http://0.0.0.0:8000/` .
64151

65-
To install GNU Aris through snap, visit https://snapcraft.io/aris and find the required distribution details according to your system. For example, for Linux machines, use `sudo snap install aris` to install the Aris and launch it with `aris`.
66152

67153
### Contributing Guide
68154
We welcome contributions to our project and thank you for taking the time to improve it. Here are some guidelines to follow when contributing:

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AC_PREREQ(2.60)
2-
AC_INIT([GNU Aris], [2.2], [[email protected]])
2+
AC_INIT([GNU Aris], [3.0], [[email protected]])
33
AC_CONFIG_AUX_DIR([build-aux])
44
AM_INIT_AUTOMAKE
55

qt/CMakeLists.txt

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(aris-qt VERSION 0.1 LANGUAGES C CXX)
4+
5+
set(CMAKE_AUTOMOC ON)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
add_compile_definitions(WITH_CMAKE)
8+
9+
find_package(Qt6 6.2 REQUIRED COMPONENTS Quick Widgets QuickControls2)
10+
find_package(LibXml2 REQUIRED)
11+
12+
add_executable(aris-qt
13+
../src/aio.h
14+
auxconnector.h
15+
connector.h
16+
goaldata.h
17+
goalmodel.h
18+
goals-qt.h
19+
../src/interop-isar.h
20+
../src/list.h
21+
../src/process.h
22+
../src/proof.h
23+
proofdata.h
24+
proofmodel.h
25+
../src/rules.h
26+
../src/sen-data.h
27+
../src/sexpr-process.h
28+
../src/typedef.h
29+
../src/var.h
30+
../src/vec.h
31+
../src/aio.c
32+
auxconnector.cpp
33+
connector.cpp
34+
goaldata.cpp
35+
goalmodel.cpp
36+
goals-qt.c
37+
../src/interop-isar.c
38+
../src/list.c
39+
main.cpp
40+
../src/process-main.c
41+
../src/process.c
42+
../src/proof.c
43+
proofdata.cpp
44+
proofmodel.cpp
45+
../src/sen-data.c
46+
../src/sexpr-process-bool.c
47+
../src/sexpr-process-equiv.c
48+
../src/sexpr-process-infer.c
49+
../src/sexpr-process-misc.c
50+
../src/sexpr-process-quant.c
51+
../src/sexpr-process.c
52+
../src/var.c
53+
../src/vec.c
54+
)
55+
56+
qt_add_qml_module(aris-qt
57+
URI arisqt
58+
VERSION 1.0
59+
QML_FILES main.qml ProofArea.qml DrawerTools.qml GoalLine.qml KeyButton.qml KeyGroup.qml
60+
RESOURCES
61+
assets/help.png
62+
assets/icon_simple.svg
63+
assets/about.png
64+
assets/font.png
65+
assets/import.png
66+
assets/boolean.png
67+
assets/goal.png
68+
assets/export.png
69+
assets/saveas.png
70+
assets/save.png
71+
assets/folder.png
72+
assets/new.png
73+
assets/eval.png
74+
)
75+
76+
set_target_properties(aris-qt PROPERTIES
77+
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
78+
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
79+
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
80+
MACOSX_BUNDLE TRUE
81+
WIN32_EXECUTABLE TRUE
82+
)
83+
84+
target_link_libraries(aris-qt
85+
PRIVATE Qt6::Quick
86+
PRIVATE Qt6::Widgets
87+
PRIVATE Qt6::QuickControls2
88+
PUBLIC LibXml2::LibXml2
89+
)
90+
91+
install(TARGETS aris-qt
92+
BUNDLE DESTINATION .
93+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
94+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
95+
)

0 commit comments

Comments
 (0)