- This document is based on https://fsi.cs.fau.de/forum/post/153663.
- I personally use and recommend the Chocolatey package manager on Windows. It is in no way required to follow these instructions, though. Just replace every
cup <software-name> -y
by manually looking up the vendor's site on the Internet, downloading the installer and running it.
UNRESOLVED PROBLEM: Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpgf in java.library.path
Recommended file structure:
your-path
|
|- LBS
| |-- GF
| | |-- ...
| |
| |-- GF-Scala # the GF-MMT bridge
| | |-- ...
| |
| |-- MMT
| | |-- ...
| |
| |-- mmt.jar
| |
-
Windows subsystem for Linux (= WSL)
- Open the Microsoft Store app and search for "Ubuntu". Install it.
- Open Ubuntu from the start menu and choose your username and password.
- If you encounter the error
0x8007007e
, try one of the following suggestions and retry opening the Ubuntu app thereafter:-
Open the start menu and search for "Windows Features". Run it and activate "Windows Subsystem for Linux (Beta)".
After installing it, restart your PC. -
Ensure you have the latest Windows version. This includes Windows Updates and bigger updates such as the Windows 10 Fall Creators Update.
The latter requires multiple hours to install. Only do it if you know what you are doing and have backups ready at your finger tips! -
If none of the things mentioned above works, you might want to start investigating from these links:
-
-
Install/upgrade JDK 8:
cup jdk8 -y
.
Verify thatjava -version
returns the new version in your console if the command above updated it. If the old version still appears, you might want to try Chocolatey's commandrefreshenv
in your console. -
Install/upgrade Git:
cup git -y
. -
jEdit
-
Install jEdit: http://jedit.org/index.php?page=download. [Chocolatey package exists, but is outdated.]
You might want to manually create a desktop shortcut linking toC:\Program Files\jEdit x.y.z\jedit.exe
as well. -
Follow further instructions here: https://uniformal.github.io/doc/setup/jedit.html. (Important: run jEdit at least once before continuing!)
-
-
MMT
- Download the latest
mmt.jar
binary and put it intoyour-path/mmt.jar
: https://github.com/UniFormal/MMT/releases/ - Create the directory
your-path/MMT
- Open a console in
your-path
and runjava -jar mmt.jar :setup
.
- When asked, specify the full path to
your-path/MMT
as the installation directory. - You might encounter TLS handshake failures when the setup tries to install the jEdit plugin. Ignore them, you can fix them manually by the next step.
- Open jEdit, go to Plugins → Plugin Manager and check whether a plugin called MMTPlugin exists and is activated, i.e. checked. If not, check it and wait a little for possible warnings/required dependencies you have to fulfill as well.
- When asked, specify the full path to
- Download the latest
-
GF
-
Open a console in
your-path/LBS
and run the following commands:git config --global core.autocrlf false git clone --depth=1 https://github.com/GrammaticalFramework/GF.git
The first line forbids Git to convert line endings of cloned files to CRLF on Windows. This is strictly necessary because otherwise
autoreconf -i
in a later step fails withAC_CONFIG_MACRO_DIR([M4]) conflicts with ACLOCAL_AMFLAGS=-I M4".
TODO Pull Request .gitattributes
-
Now open an Ubuntu console. All subsequent commands in this block have to be run inside that Ubuntu console unless otherwise noted.
-
Run the following commands:
sudo apt-get update sudo apt-get install autoconf automake libtool libtool-bin make
-
cd /mnt/c/your-path/GF/src/runtime/c
-
Follow the Linux instructions under https://github.com/GrammaticalFramework/GF/blob/master/src/runtime/c/INSTALL
However, be sure to runmake install
with sudo, i.e.sudo make install
. -
sudo apt-get install default-jdk
-
cd /mnt/c/your-path/GF/src/runtime/java
-
Again, follow the Linux instructions under https://github.com/GrammaticalFramework/GF/blob/master/src/runtime/java/INSTALL
However, be sure to runmake install
with sudo, i.e.sudo make install
. That command should also print the final path tojpgf.jar
. Verify that it is indeed/usr/local/lib
, otherwise some paths below probably need to be adjusted.
-
-
GF-MMT bridge (with IntelliJ)
cup intellijidea-ultimate -y
(free registration for students)- Run
git clone https://github.com/UniFormal/GFScala
inside theyour-path
directory. - Open IntelliJ, choose Create New Project → Scala → IDEA.
- Choose the path
your-path/GFScala
. - If you could not see Scala, you have to install it from the main screen with Configure → Plugins → Install JetBrains plugins → Scala.
- Configure your JDK if needed. The path is most probably
C:\Program Files\Java\jdk1.8.xyz_uvw
. - If not available, create a new Scala-SDK with exactly the version 2.11.8.
- Choose the path
- In the menu choose File → Project Structure → Modules → Dependencies.
- With the green plus, add the following dependencies
- JAR-dependency:
your-path/mmt.jar
- JAR-dependency:
C:\Users\Navid\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_xxxxxxxxxxxxx\LocalState\rootfs\usr\local\lib\jpgf.jar
The exact sequence of x's can probably differ from system to system.
- JAR-dependency: