speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
296 stars 36 forks source link

add nsitemplate_win.txt #487

Closed Demosteneus closed 1 year ago

Demosteneus commented 1 year ago

Adding nsitemplate_win.txt for Windows. The existing one was failing on windows due to the different path format.

Also adjusted the go code in sphelper.go to only use the new template when running on windows.

pgundlach commented 1 year ago

Can you tell me what the second patch (build_sp.py) does? This looks like mingw specialties which could be included in sphelper if necessary.

Demosteneus commented 1 year ago

I just created a small python script that helps me with the build on Windows. It asks for 3 inputs:

  1. mingw executable location
  2. location of lua "include" directory (C headers)
  3. location for luatex

Then it makes a back-up of sphelper/buildlib/buildlib.go (buildlib.go_old) and updates the hardcoded paths in this part:

cmd = exec.Command("/usr/bin/x86_64-w64-mingw32-gcc", "-shared", "-o", filepath.Join(dylibbuild, "luaglue.dll"), "luaglue.c", "-I/usr/include/lua5.3/", "-L/luatex-bin/luatex/windows/amd64/default/", "-llua53w64", "-llibsplib", "-L"+dylibbuild)

Then it reverts buildlib.go_old to the original state buildlib.go

I didn't really want to add these last 2 commits to this pull request... I still have to learn how to ignore some commits... This file was supposed to be only for me.... I suppose you also have your automated scripts for build/distribution creation.

pgundlach commented 1 year ago

what I use use pretty much just a call to rake dist (https://github.com/speedata/publisher/blob/develop/Rakefile#L142) and this calls sphelper dist

So if there are some generic instructions for mignw that I could/should integrate, I'd be happy to do so. (But I think another pull request should be opened then)

I have already merged this pull request, so this can be closed (not uploaded yet).