Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Eduap-com/WordMat
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduap-com committed Oct 28, 2021
2 parents e3ff89c + fd3b33a commit d901960
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 14 deletions.
14 changes: 8 additions & 6 deletions How to build WordMat.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ To build do the following:
Be aware that if you are building a new version there are a number of things you must observe. See section *New release checklist*

## Mac
First install [Packages](http://s.sudre.free.fr/Software/Packages/about.html)
First install [Packages](http://s.sudre.free.fr/Software/Packages/about.html) (The program that generates the installer-file)

Currently the Mac folder is missing a file/folder called **maxima.app** in ExternalProgram before it can be compiled as it exceeds the GitHub limit of 100 MB
You can get this file from the most recent installer. It will be placed in the folder: /Library/Application support/Microsoft/Office365/User Content/Add-ins/WordMat/ Then place it in the Mac/ExternalPrograms folder.
Currently the Mac folder is missing a file/folder called **maxima.app** in ExternalProgram before it can be compiled as it exceeds the GitHub limit of 100 MB.
You can get this file from the most recent installer. Then place it in the Mac/ExternalPrograms folder. Once installed, the maxima.app file will be placed in the folder: '/Library/Application support/Microsoft/Office365/User Content/Add-ins/WordMat/' Where Word has execute privileges.
Also the paths in the pkgproj file probably needs to be set manually on a new computer. A work in progress.

To build do the following
Expand Down Expand Up @@ -49,7 +49,7 @@ Whenever a new release is compiled the following checklist must be followed
The default installation of Maxima loads the compiled *maxima.core* file from this location:
*Maxima-sbcl-5.38.1\lib\maxima\5.38.1\binary-sbcl\\*
It is however posible to load maxima, make some changes and save a new maxima.core file.
This makes it must faster to start up Maxima, instead of having to load all special function and settings upon startup.
This makes it much faster to start up Maxima, instead of having to load all special function and settings upon startup.

### Compiling maxima.core on Windows
- In the following use a normal maxima 5.38.1 installation from the programs folder and not from the GitHub repository
Expand Down Expand Up @@ -93,9 +93,11 @@ The version of Maxima used is the most recent version which I could get to work

### Compiling maxima.core on Mac
- In the following use a normal maxima 5.38.0 installation from the programs folder and not from the GitHub repository
- Right click the maxima.app and choose show contents to navigate the contents
- Copy the most recent versions of solvereal.mac and WordMatunitaddon.mac to *maxima.app/Contents/Resourcecs/maxima/share/maxima/5.38.0/share/contrib/*
*Right click maxima.app and choose 'show contents' to navigate the folder*
- Run maxima.app.
from v. 39: 'maxima.app/Contents/Resources/opt/share/maxima/5.43.0/share/contrib/'
- Copy unit.mac to the subfolder unit of the contrib-folder
…- Run maxima.app.
(If it fails to open: Open terminal, right click maxima.app, show contents, navigate to find Resources/maxima.sh, dragn drop maxima.sh to terminal and press enter)
- Run the following commands in the terminal window
```
Expand Down
9 changes: 9 additions & 0 deletions Mac/M1/HelloScript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# HelloScript.sh
# WordMatMaxima cmdline test
#
# Created by Mikael Samsøe Sørensen on 19/10/2021.
# Copyright © 2021 EDUAP. All rights reserved.

echo Hello
Binary file modified Mac/MaximaConnectionDylib/LibMaximaConnection.dylib
100644 → 100755
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>MaximaConnection.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
16 changes: 8 additions & 8 deletions Mac/MaximaConnectionDylib/MaximaConnection/MaximaFunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ long SendToMaxima( char* command)
long VBstrlen(const char *vbstr) // size_t
{
if (vbstr)
return *(((uint32_t*)vbstr)-1);
return *(((uint32_t*)vbstr)-1); // ændret fra 32bit 18/10-2021
return 0;
}

Expand Down Expand Up @@ -402,7 +402,7 @@ long GetLastOutput(char *outstring, long WaitTime)
char *stoptext=malloc(8); // "(%i";
int digits[8];
int p;
int mi;
long mi; // ændret fra int 18/10-2021
int i=0;
if (IsMaximaRunning()<1)
return -1;
Expand All @@ -425,11 +425,10 @@ long GetLastOutput(char *outstring, long WaitTime)
// time_t waittime=(time_t)waittime2;

//int ReadSize=strlen(outstring)+10;
long ReadSize = strlen(outstring); //strlen(outstring); doesn't work for string Malloc'ed
long ReadSize = strlen(outstring); //VBstrlen(outstring); doesn't work for string Malloc'ed
if (ReadSize<1)
return -1;
// const int MaxNoOfReads=1;

char *buffer=malloc(ReadSize+10);
char *ReturnString=malloc(ReadSize+10); //maxnoofread*readsize
time_t StartTime;
Expand Down Expand Up @@ -595,12 +594,13 @@ long StartMaximaWait(const long WaitTime)
return 2; // already running
}
char *outstring=malloc(1010); // simuler en VBstreng
memset(outstring, ' ', 1000); // nulstring streng
outstring[0]=200;
outstring[1]=3; // 512+256
outstring[2]=0;
outstring[3]=0;
outstring[1000]='\0';
outstring[2]='x';
outstring[3]='x';
outstring[968]='\0';

errno=0;
long ern;
ern=StartMaxima();
Expand Down
24 changes: 24 additions & 0 deletions Mac/MaximaConnectionDylib/MaximaConnection/VBATest.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,27 @@ int SetString(char *outstring)
*(outstring-4)=strlen(ts);
return 4;
}
int SetString2(char *outstring)
{
// memset(outstring, '\0', sizeof(outstring)); // nulstring streng
// chrtovbs(ts, outstring);
// outstring[0]='s';
// outstring[1]='r';

*(outstring-1)=0;
*(outstring-2)=0;
*(outstring-3)=0;
*(outstring-4)=5;
*(outstring)='H';
*(outstring+1)='e';
*(outstring+2)='j';
*(outstring+3)='s';
*(outstring+4)='a';
*(outstring+5)=0;
return 5;
}

int GetLength(char *s)
{
return strlen(s);
}
Binary file not shown.
Binary file added Mac/WordMatScripts.scpt
Binary file not shown.

0 comments on commit d901960

Please sign in to comment.