Skip to content

Commit

Permalink
grailgui most demos now build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dov Kruger authored and Dov Kruger committed Nov 25, 2020
1 parent 761271d commit 384ca8b
Show file tree
Hide file tree
Showing 1,321 changed files with 304,651 additions and 0 deletions.
113 changes: 113 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# first, ignore all
# * #NO BECAUSE IT KILLS LOTS OF LIBRARY CODE!
external/xerces-c-3.2.2
#unignore all with extensions
!*.*
!configure

#unignore all directories
!*/

#unignore README and Makefiles and .gitignore just in case
!README
!Makefile
!.gitignore

# Prerequisites
*.d

Expand All @@ -24,9 +39,107 @@
*.lai
*.la
*.a
libs/libgrail.a
*.lib

# Executables
*.exe
*.out
*.app

#ignore emacs backup files or temp files
*~
\#*

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/
build/
# ! NOT FROM CMAKE -- our own custom makefile output directory!

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser


autogen
disass
main
demo1
demo2
demo3
testwin
ParseCSP
TagMap.cc
CompiledWebLoadOpCodes.hh
CompiledWebPointerOpCodes.cc
*.cml

codesummary
*.png
.vscode/* # in general we don't want your vscode settings, manually override when you need to
lib/*
BIGMAP.png
errlog

7 changes: 7 additions & 0 deletions Grail_Workspace.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# main makefile for grail, partially a tutorial
# in order to build grail, first set the following environment variables in your .profile
#
# export GRAIL=~/git/proj/Grail # this is my path, add your own
# export PATH=$GRAIL/bin:$PATH
#
# then run make in this top-level directory
#
include ${GRAIL}/proj/settings.mk

grail:
@echo $(grail)
cd $(opengl) && make
cd $(csp) && make
cd $(test) && make # && grailparser test.grail this should generate out.cml (binary html)

quickClean:
rm -rf ${GRAIL}/build ${GRAIL}/libs -f
@# -f for remove files even if they dont exist ... ie don't throw an error because it's already clean.

clean:
cd $(util) && make clean ; cd $(csp) && make clean; cd $(opengl) && make clean ; cd ${GRAIL}/test && make clean

# after this, any demos should work
# example testDrawing
# example testGraph

38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Peter's Windows Port

## Getting Set Up - Windows

1. [Install MSYS2](https://www.msys2.org/)
2. Run MSYS2: `MSYS2 MinGW 64-bit` from the Windows Start Menu.

- Make sure you are running the correct executable or else you will have trouble with the C++ compiler not recognizing your system correctly.

3. `pacman -S git nano make cmake mingw64/mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-gcc mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib mingw-w64-x86_64-freetype mingw-w64-x86_64-glfw bison flex`

- If you are having troubles: the full list I installed was: `pacman -S git nano make cmake mingw64/mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-gcc mingw-w64-x86_64-toolchain mingw-w64-x86_64-zlib mingw-w64-x86_64-freetype mingw-w64-x86_64-glfw bison flex python pkg-config mingw-w64-x86_64-gcc mingw-w64-x86_64-eigen3 mingw-w64-x86_64-qt5`

4. Edit `~/.bashrc` to include `export GRAIL=/path/to/GRAIL` and `export PATH=$PATH:$GRAIL/bin` on the following line. `source ~/.bashrc` the first time.

- Example: `/c/Users/USERNAME/Documents/GitHub/Grail`
5. Install PLibSys

1. Download from [PLibSys Releases](https://github.com/saprykin/plibsys/releases/). Get Latest `Source Code (zip)`
2. Decompress Locally
3. Run `cmake CMakeLists.txt`
4. `make`
5. `make install` (need sudo in linux)

## Getting Set Up - Linux

1. Install Dependencies: `sudo apt install libglfw3-dev libfreetype-dev flex bison`

## Compiling

1. `cd $GRAIL/ ; make`

## Running

1. Update `$GRAIL/test/Makefile` to compile the file you want to compile.
2. `cd $GRAIL/test/ && testDrawing`

- Cursors and other features might not work for other tests as they are not 100% Linux/Windows compatible yet.
25 changes: 25 additions & 0 deletions Windows_Instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Windows Setup
[comment]: <> (Need to pull in the getting started on windows instructions for MSys2 and installing the various packages)
## Windows Terminal MSys2 Integration
1. Open the `Microsoft Store` app and search for `Windows Terminal`.
2. Install the first result by `Microsoft Corporation`.
3. Launch the app.
4. In the top bar, click on the downwards facing arrow, and then `Settings`.
5. VSCode or another editor should pop up with a `settings.json` file.
6. Copy the following into `list`:
```
{
"closeOnExit": true,
"commandline": "cmd.exe /c \"set MSYSTEM=MINGW64&& C:\\msys64\\usr\\bin\\bash.exe --login\"",
"fontFace": "Source Code Pro for Powerline",
"fontSize": 12,
"guid": "{09dc5eef-6840-4050-ae69-21e55e6a2e63}",
"historySize": 9001,
"icon": "C:\\\\msys64\\msys2.ico",
"name": "MSYS2",
"padding": "0, 0, 0, 0",
"snapOnInput": true
}
```
7. Modify the code snippet to match your install path of MSys2. If you did not use custom install paths, then this should not affect you.
8. Save and Close the file, go back to Windows Terminal, Click on the new MSys2 that pops up in the same menu where you found the settings.
4 changes: 4 additions & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
17 changes: 17 additions & 0 deletions conf/Grail.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
app {
localstorage: /var/grail/storage;
maxstorageperapp: 10MB;
apps-may-request-more: true;
blacklist:
}
cloud { // this should be in user's local file
server: drive.google.com;
userid: dkruger;
repobackup: 1UJo5yykf0fH6YRzgG1L5Tw4Smvm7yJZv/view?usp=sharing
}

style {
default: std.css; // the css used by most users
impairedvision: impairedvision.css; // styles for visually impaired users
print: print.css; // styles for printing out pages
}
22 changes: 22 additions & 0 deletions conf/actionmap.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#prefixes
0 regular action
1 secure, do not allow remote to execute
2 ask user for password to allow interactively

#parameters, families of functions
0 no parameters
1 1 integer parameter
2 2 integer parameters
3 1 string parameter

1000
QUIT
NEW_TAB
CLOSE_TAB
DUPLICATE_TAB
NEXT_TAB
PREV_TAB
CLOSE_ALL_TABS
SPLIT_WINDOW_HORIZONTALLY
SPLIT_WINDOW_VERTICALLY

12 changes: 12 additions & 0 deletions conf/csp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# This file configures CSP to create a web server that responds to CSP on port 8000
#

port 8000 # Port range is 0 - (2^16)-1, int will suffice
protocol http # could be enums
buffer 64k # type memory
passwd fillthisin
base c:/bin/csp/data # this depends on os, base for all directory
logfile 1.log
loglevel WARN # display anything WARN or above
language en # use ISO codes to switch languages
47 changes: 47 additions & 0 deletions conf/en/errors.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Error Reading File
Error Writing File
BZIP_FORMAT_CORRUPT,
BZIP_READ,
BZIP_WRITE,
OUTOF_MEMORY,
MULTIPLY_DEFINED,
UNDEFINED,
UNDEFINED_CLASS,
UNDEFINED_TYPE,
INITIALIZE_FREETYPE,
FONT_LOAD, // problem loading a font
FONT_LOAD_GLYPH, // load a single glyph in a font
DIR_NOT_FOUND,
EXPECTED_U32,
EXPECTED_I32,
EXPECTED_F32,
IMAGE_LOAD,
MISSING_SHADER,
FONT_SIZE_LOAD,
BAD_DATE,
BAD_PROTOCOL,
FILE_NOT_FOUND,
PERMISSION_DENIED,
PERMISSION_NOWRITE,
PERMISSION_NOEXEC,
PERMISSION_NOREAD,
DISK_FAILURE,
OUT_OF_DISK,
CONNECTION_FAILURE,
CERTIFICATE_EXPIRED,
CERTIFICATE_INVALIDATED,
CLIENT_INVALID,
SERVER_INVALID,
REPOSITORY_TAMPERED,
CLIENT_UPDATE,
GETADDRINFO,
SOCKET,
SETSOCKOPT,
SOCKET_BIND,
NO_BIND,
LISTEN,
SIGACTION,
ILLEGAL_SERVLETID,
CANNOT_CLOSE,
IOEXCEPTION
};
7 changes: 7 additions & 0 deletions conf/fonts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
6000 1500
#TIMES Times-serif/TIMES.ttf 20,20,40
TIMES Times-serif/TIMES.ttf 10,2,40
MATH TeXGyre/LatinModernMath/latinmodern-math.otf 10,10,40
CENTENNIAL Centennial-serif/Centennial.ttf 10,10,40
MONO Google/Cutive_Mono/CutiveMono-Regular.ttf 10,10,40
SANS Google/Noto-sans/NotoSansHK-Regular.otf 10,10,40
5 changes: 5 additions & 0 deletions conf/fonts.conf.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TIMES Times-serif/TIMES.ttf 8 40
MATH TeXGyre/LatinModernMath/latinmodern-math.otf 8 40
CENTENNIAL Centennial-serif/Centennial.ttf 8 40
MONO Google/Cutive_Mono/CutiveMono-Regular.ttf 8 40
SANS Google/Noto-sans/NotoSansHK-Regular.otf 8 40
Loading

0 comments on commit 384ca8b

Please sign in to comment.