Home Building DHTML Scripting Using Diaperglu Documention Key Script Commands Reference C Library API Reference Handy References About License Contact Forth Draft Standard
Building on Mac OS X 64 bit Windows   Testing on Mac OS X on 64 bit Windows   Running on Mac OS X on 64 bit Windows   Sample Scripts on Mac OS X on 64 bit Windows

Building diaperglu on Mac OS X

  • Open a terminal
  • Change directories to the /diaperglu64/macosx subdirectory (e.g. cd /Users/yourname/Desktop/Diaperglu64/macosx12.6.3)
  • Compile diaperglu and remove temporary files (type the words sudo make and hit return. sudo is required on newer versions of Mac Os because make is writing a shared library.)

This makes 5 files:

  • libdiaperglu.dylib
  • diaperglulinked
  • testdiaperglulinked
  • testosapi
  • diaperglu

Building nodiaperglu on Mac OS X

  • Open a terminal
  • Change directories to the /diaperglu64/macosx subdirectory (e.g. cd /Users/yourname/Desktop/Diaperglu64/MacOsX12.6.3)
  • Compile nodiaperglu and remove temporary files (type the words sudo make -f makefilenodiaper and hit return. sudo is required on newer versions of Mac Os because make is writing a shared library.)

This makes 5 files:

  • libnodiaperglu.dylib
  • nodiaperglulinked
  • testnodiaperglulinked
  • testnodiaperosapi
  • nodiaperglu

Building diaperglu on 64 bit Windows

  • If you have Visual Studio 2019 with C++ installed, you can:
  • Open a Visual Studio x64 Native Tools Command Prompt from the start menu. The Visual Studio command prompt is required to run the Visual Studio command line tools. (You need the 64 bit tools.)
  • Change directories to the /DiaperGlu64/Win64MSVC2019 subdirectory (e.g. cd /Users/yourname/Desktop/DiaperGlu64/Win64MSVC2019)
  • Compile diaperglu and remove temporary files (type the word nmake and hit return.

This makes 8 files:

  • diapergluosapi.dll
  • diapergluosapi.lib
  • libdiaperglu.dll
  • libdiaperglu.lib
  • diaperglulinked
  • testdiaperglulinked
  • testosapi
  • diaperglu

Testing on Mac OS X

Change back to the directory where you did the make for Diaperglu if needed.

Run operating system api tests. (./testosapi ./testnodiaperosapi) This test prints out whether or not each test succeeded or failed.

Run the functional tests. (./testdiaperglulinked ./testnodiaperglulinked) This test prints out one line for each function tested that looks like:

 testing dg_popbufferdword

If any errors occur, a message is printed out that looks like:

 FAIL! function name some test case - expected something but got something else.

Or the test may crash, usually indicating a bad memory access in a function. A couple times during the test, it will ask you to input key strokes. If all goes well, there will be no fail messages or crashes, and you will see one line for each function tested.

Testing on 64 bit Windows

Change back to the directory where you did the nmake for Diaperglu if needed.

Run operating system api test. (testosapi) This test prints out whether or not each test succeeded or failed.

Run the functional test. (testdiaperglulinked) This test prints out one line for each function tested that looks like:

 testing dg_popbufferdword

If any errors occur, a message is printed out that looks like:

 FAIL! function name some test case - expected something but got something else.

Or the test may crash, usually indicating a bad memory access in a function. A couple times during the test, it will ask you to input key strokes. If all goes well, there will be no fail messages or crashes, and you will see one line for each function tested.

Running Diaperglu on Mac OS X

./diaperglu from command line - enters Forth standard shell

./diaperglu scriptfilename from command line - interprets script file scriptfilename

http://www.yourwebsite.com/cgi-bin/diaperglu

- under apache, interprets noscript.dglu if it exist, or sends a default message page indicating no script file was specified.

http://www.yourwebsite.com/cgi-bin/diaperglu?scriptfilename

- interprets scriptfilename if scriptfilename exists. Your script file is responsible for sending the html header in addition to the rest of the page contents

- sends a default message page indicating the error opening the script file

Running Diaperglu on 64 bit Windows

diaperglu from command line - enters Forth standard shell

diaperglu scriptfilename from command line - interprets script file scriptfilename

Running the sample command line scripts on Mac OS X

Change back to the directory where you did the make for Diaperglu if needed.

You can either enter ./diaperglu from command line to enter the Forth standard shell, then type in lines like $" samplescripts/helloworld.dglu" INCLUDEFILE$" to run a sample script or run the script from the command line using one of these:

./diaperglu samplescripts/helloworld.dglu - script that prints out hello world!

./diaperglu samplescripts/testcodex86.dglu - tests the 64 bit assembler

./diaperglu samplescripts/testdiaperglu.dglu - tests the core Diaperglu script commands

./diaperglu samplescripts/testglulinking.dglu - tests the linking function of the linker

./diaperglu samplescripts/testmakeexportglulist.dglu - tests making an export glu list

./diaperglu samplescripts/TestMath.dglu - tests loading the system math shared library and calling some floating point functions

For these samples in subdirectories: asmimportusingld, dg2dgraphicsdylib, helloword64exe, higherlevelasm, lifenglulib, sampleasmdylib, testmakedoto, and testmakedylib; you can cd into the subdirectory and do sudo make to build and test the samples.

If you want to run the DiaperGluLifeApplication, you'll need to double click on the DiaperGluLifeApplication.xcodeproj file to open the project. Then, and I'm sorry about this, you'll need to edit the DiaperGluLifeApplication.m file to change the mylocalpath variable to have you're local path. More complete instructions are in the file. You need to do this because of Mac security precautions around using shared libraries. Then just click the play arrow in the top menu bar. Mac OS X will pop up a permission thing telling you the demo wants to access files in the local directories. This is to load the shared library because it isn't installed in one of the standard locations for shared libraries. If you give permission you get to see the demo.

Running the sample command line scripts on 64 bit Windows

Change back to the directory where you did the make for Diaperglu if needed.

You can either enter diaperglu from command line to enter the Forth standard shell, then type in lines like $" samplescripts/helloworld.dglu" INCLUDEFILE$" to run a sample script or run the script from the command line using one of these:

diaperglu samplescripts/helloworld.dglu - script that prints out hello world!

For these samples in subdirectories: asmimportusingld and testmakedoto; you can cd into the subdirectory and do nmake to build and test the samples.

Releasing a version of Diaperglu

This is for the me so I do not have to remember what I do to spin a release.

  • Change license, version, and date comment in all source files - this includes architecture specific subdirectories. And the directory names in this file.
  • Rebuild for all platforms. Run test scripts. Verify operation under Apache.
  • Change license, version, and date comment in about.htm
  • Change shared object library version in makefiles.
  • Remove hidden files.
  • Make .tgz archive using this command on Mac OS X: tar cvfz DiaperGlu64dateversion.tgz DiaperGlu64/
  • Make .zip archive using Vista. Remember that a Mac OS X .zip does not unzip gracefully on Vista
  • Test opening archives on all platforms. Check file permissions. Remember that .zip does not save permissions so .zip is only for Win32
  • Put archives on rainbarrel.com website.
  • Update entry in the Free Software Directory.
  • Notify Forth.org