Forum OpenACS Development: Windows-OpenACS / Visual Studio 2022

Dear all,
this short message is just to let you know that since today (8th of April 2022) my Windows port of Naviserver and OpenACS is based on Visual Studio (Professional) 2022.
https://visualstudio.microsoft.com/vs/

Hope this helps,
Maurizio

Collapse
Posted by Neophytos Demetriou on
Hi Maurizio,

1. Are the build instructions or Windows port of NaviServer online somewhere? I would like to check one of my modules for NaviServer on Windows. It builds fine for Linux, macOS, and Windows (tested with TCL).

2. When I built TCL for Windows, somehow it does not recognize Win64 and it builds for Win32. Here is how I built it. Any suggestions?

Collapse
Posted by Andrew Piskorski on
Neophytos, I think Maurizio has a different way, but the standard Windows build instructions are at the top of Makefile.win32. That's how I do it. Pay attention to the comments at the top saying which variables you may need to edit. Then run it. I do this:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
z: & cd Z:\src\web\ns-head-pub\naviserver
nmake -f Makefile.win32 clean-core clean-mod
nmake -f Makefile.win32 all-core all-mod

However, I don't think there are any docs telling you how to install the other Windows libraries that Naviserver wants. There are other options, but here's what I use:

  • Install ActiveTcl, e.g. into C:\P\Tcl-64-8.6.12\.
  • Install Win32OpenSSL, e.g. into C:\P\OpenSSL-Win64-3.1.4\.
  • In the System Environment Variables, manually add those to your PATH, e.g. add C:\P\Tcl-64-8.6.12\bin and C:\P\OpenSSL-Win64-3.1.4\bin
  • You can build and manually install Zlib if you want, but Naviserver will run without it.
Collapse
Posted by Andrew Piskorski on
On building Tcl on Windows, I notice that you're not running vcvars64.bat (nor anything else like it) before you call nmake. That's probably the problem.
Collapse
Posted by Andrew Piskorski on
If you want Zlib, the official Zlib on Github looks as if it includes compiled binaries, but AFAICT it actually does not; its zlib1213.zip contains only source code, no executables. Zlib is easy to build from source, but doesn't include any automated way to install it, so I did that by hand.

Note that I happen to use a Z: drive which is a Samba share running on Linux. Obviously you can just do everything on your C: native Windows drive, but you'll need to tweak my instructions.

  1. Build zlib from source:
    "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
    z: & cd Z:\src\web\zlib-1.2.13
    nmake -f win32/Makefile.msc
    
  2. Fix permissions on the Linux disk side:
    cd /usr/local/src/web/zlib-1.2.13/
    find . -type f \( -name "*.exe" -o -name "*.dll" \) -print | sudo xargs chmod 775
    
  3. Install the compiled library files:
    (The xcopy /l option can be helpful to list the copies to be done without actually doing them.)
    mkdir C:\P\include
    mkdir C:\P\lib
    xcopy Z:\src\web\zlib-1.2.13   C:\P\zlib-1.2.13  /s /e /i /k /f
    xcopy C:\P\zlib-1.2.13\*.h     C:\P\include\  /k
    xcopy C:\P\zlib-1.2.13\z*.dll  C:\P\lib\      /k
    xcopy C:\P\zlib-1.2.13\z*.lib  C:\P\lib\      /k
    xcopy C:\P\zlib-1.2.13\z*.pdb  C:\P\lib\      /k
    
Collapse
Posted by Neophytos Demetriou on
Thank you both. I will check these and post if I still have any questions.