unixwork / xnedit

A fast and classic X11 text editor, based on NEdit, with full unicode support and antialiased text rendering.
Other
82 stars 12 forks source link

package for Windows #34

Open efa opened 3 years ago

efa commented 3 years ago

hi, I want try to create a package for Windows, with all the dependancies. Is not much difficult using the very old version from Cygwin, but I want to generate your version.

At first I want try native compile using MSYS2, then try to crosscompile using MXE. Some one has already tryed to do that? In case, any hints? thank you

unixwork commented 3 years ago

I have not tried to compile xnedit on windows. I have no experience with Cygwin, but I guess, if nedit worked with cygwin, xnedit should work too.

I don't think msys2 will work, because it doesn't provide a posix compatible environment.

1div0 commented 3 years ago

@efa try nedit-ng

unixwork commented 3 years ago

@1div0 do you know if unicode support for nedit-ng is in active development?

efa commented 3 years ago

unicode is the main argument I'm asking for xnedit on Windows.

About nedit-ng (current git does not have Unicode support), I tryed to generate it with MINGW, the standalone package (with QT and all deps) is not less than 160 MB, while for comparison Notepad++ is 10 MB, so I cannot consider it an easy replacement

1div0 commented 3 years ago

@1div0 do you know if unicode support for nedit-ng is in active development?

I intended to implement it, but recently have no time and motivation for that. So sorry.

efa commented 3 years ago

once solved some troubles, I will try to package the Cygwin binaries

eteran commented 3 years ago

@efa nedit-ng author here :-).

I can say that Unicode is definitely on my radare, but it is not the current focus of development. Since NG is basically a complete port, there are some small areas that are not a perfect reproduction of the classic NEdit5 behavior.

Since NG is targetting being the "official NEdit 6.0", the current focus of development is to fix these small issues and then use 6.1 for larger changes.

Regarding package size, I would recommend at the very least building with visual-studio community edition. Using that approach and the Qt tools for getting a "complete package", NG was about 22MB (including Qt dependencies) for the 2019.2 release. So it definitely shouldn't be 160MB! (I'm guessing that you included ALL of Qt, not just the few components NG needs?).

Anyway, we'll get there, but for now, if Unicode is the prime feature you need, xnedit is a great option for you (though I'll certainly welcome you as a user when Unicode support arrives in NG ;-) ).

efa commented 3 years ago

I will open an Issue on https://github.com/eteran/nedit-ng to avoid pollution here https://github.com/eteran/nedit-ng/issues/312

efa commented 3 years ago

Running in Cygwin is always OK. I generated the first Cygwin package with all the dependencies:

D:\installer\xnedit>
  135.187 cygbrotlicommon-1.dll
   47.123 cygbrotlidec-1.dll
   67.603 cygbz2-1.dll
  185.363 cygexpat-1.dll
  256.531 cygfontconfig-1.dll
  720.915 cygfreetype-6.dll
   73.747 cyggcc_s-seh-1.dll
   82.963 cygICE-6.dll
1.030.675 cygiconv-2.dll
   42.515 cygintl-8.dll
  642.067 cygjpeg-8.dll
  509.459 cygpcre-1.dll
  189.459 cygpng16-16.dll
   29.203 cygSM-6.dll
   27.155 cyguuid-1.dll
3.618.249 cygwin1.dll
1.192.979 cygX11-6.dll
   12.819 cygXau-6.dll
  137.747 cygxcb-1.dll
   21.011 cygXdmcp-6.dll
   60.947 cygXext-6.dll
   78.355 cygXft-2.dll
2.292.755 cygXm-4.dll
   89.619 cygXmu-6.dll
   65.555 cygXpm-4.dll
   38.419 cygXrender-1.dll
  351.263 cygXt-6.dll
   85.011 cygz.dll
   29.184 xnc.exe
1.444.864 xnedit.exe
30 File     13.558.742 byte

now running the executable doesn't complaint about missing DLL. But running outside Cygwin in a CMD sandbox, miss something of font configuration:

D:\installer\xnedit>xnedit.exe
Fontconfig error: Cannot load default config file
Cannot open default font

can you figure out what is missing?

unixwork commented 3 years ago

Usually on unix fontconfig config is at /etc/fonts/. Additionally you need the actual fonts from /usr/share/fonts/

However I don't know the cygwin directory structure.

efa commented 3 years ago

Cygwin use the same directory structure. I added the file: .config\fontconfig\fonts.conf and defined the env var: >set FONTCONFIG_PATH=.config\fontconfig and now the error is reduced to:

D:\installer\xnedit>xnedit.exe
Cannot open default font
unixwork commented 3 years ago

The actual font is missing, which should be in /usr/share/fonts/

efa commented 3 years ago

this as simple doesn't work. I'm working on it

efa commented 3 years ago

do not start neither with:

D:\installer\xnedit>xnedit.exe -font DejaVuSansMono
Cannot open default font
efa commented 3 years ago

I had to figure why fontconfig doesn't find the default font. I had the fonts in:

D:\installer\xnedit>dir usr\share\fonts\dejavu

06/08/2019  11:29                36 .uuid
06/09/2016  19:29           577.708 DejaVuMathTeXGyre.ttf
06/09/2016  19:29           705.684 DejaVuSans-Bold.ttf
06/09/2016  19:29           643.292 DejaVuSans-BoldOblique.ttf
06/09/2016  19:29           355.376 DejaVuSans-ExtraLight.ttf
06/09/2016  19:29           635.416 DejaVuSans-Oblique.ttf
06/09/2016  19:29           757.076 DejaVuSans.ttf
06/09/2016  19:29           665.028 DejaVuSansCondensed-Bold.ttf
06/09/2016  19:29           611.836 DejaVuSansCondensed-BoldOblique.ttf
06/09/2016  19:29           599.292 DejaVuSansCondensed-Oblique.ttf
06/09/2016  19:29           680.264 DejaVuSansCondensed.ttf
06/09/2016  19:29           331.992 DejaVuSansMono-Bold.ttf
06/09/2016  19:29           253.580 DejaVuSansMono-BoldOblique.ttf
06/09/2016  19:29           251.932 DejaVuSansMono-Oblique.ttf
06/09/2016  19:29           340.712 DejaVuSansMono.ttf
06/09/2016  19:29           356.088 DejaVuSerif-Bold.ttf
06/09/2016  19:29           347.460 DejaVuSerif-BoldItalic.ttf
06/09/2016  19:29           345.996 DejaVuSerif-Italic.ttf
06/09/2016  19:29           380.132 DejaVuSerif.ttf
06/09/2016  19:29           331.244 DejaVuSerifCondensed-Bold.ttf
06/09/2016  19:29           346.508 DejaVuSerifCondensed-BoldItalic.ttf
06/09/2016  19:29           345.324 DejaVuSerifCondensed-Italic.ttf
06/09/2016  19:29           346.664 DejaVuSerifCondensed.ttf
              23 File     10.208.640 byte
efa commented 3 years ago

I also tryed to create a file: .Xresources and load it with: D:\installer\xnedit>xrdb -merge .Xresources check it is loaded with:

D:\installer\xnedit>xrdb -q
nedit*faceName: DejaVuSansMono
nedit*faceSize: 11
xnedit*faceName:        DejaVuSansMono
xnedit*faceSize:        11

Note: I'm not sure if I had to use nedit or xnedit in X resource file, so used both

but the results from: D:\installer\xnedit>fc-match DejaVuSansMono is empty and running xnedit the error is always "Cannot open default font"

I tryed to run 'xeyes' and it start, but that do not use fonts.

unixwork commented 3 years ago

fc-match must show something, otherwise it will not work in xnedit

In the fonts.conf there should be one or multiple

elements specifying the directories, where fonts are stored. For example:

<dir prefix="xdg">fonts</dir>

this does specify, that the fonts are loaded from $XDG_DATA_HOME/fonts

efa commented 3 years ago

I tryed to re-package Nedit5.5 (the oldest available with Cygwin) @32 and 64bit, and it work easily (seems it do not depend on fontconfig config files, so always start). Then I tryed to package Nedit5.6 (the newest available with Cygwin) @32 and 64bit, and it wont start. It depend on fontconfig config files. After some trouble, enabling Fontconfig debug, I understood the local fonts directory must be called .fonts and not fonts, finally I got it start. The same experience is needed with xnedit, I imagine it is derived from Nedit 5.6 Now it start, but on first start it do not find the monospace font, it is using Arial:

>fc-match mono
arial.ttf: "Arial" "Regular"

As I had understood I had to add an alias in the config file. Lets try

efa commented 3 years ago

bingo:

D:\installer\xnedit_64bit>sh.exe bash.exe: warning: could not find /tmp, please create! sh-4.4$ fc-match mono DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

xnedit_cygwin_package00 now I had to refine a little the start script, as it has all static and absolute paths

efa commented 3 years ago

hi, I ended the first beta of a script to create the Win package.

As now I left many debug prints just to check if and when something fail. It generate an installation directory, with all needed dependancies files, with a batch file to be used to run the executable. The batch file run a bash and a bash script that create all the env vars needed for XNEdit to work well. Those are partly derived from Nedit 5.5 official Win package (the last one released as I know).

I tryed to open the batch from a CMD with nothing in the PATH, from:

there are still some WARN messages (maybe you can help me on this) but it continue and work well. I can't exclude there can be some glithes, but seems to me it is decently stable, and I need more testers to refine further.

So, if you are interested, how can I upload the package (are 5 files)? I prefer a git pull request. Do you prefer to create a new directory for this?

Note: I had to synch to last commit as I'm working with 1.3.0, but I do not expect trouble on this.

efa commented 3 years ago

Just updated to tag v1.3.2

D:\installer\xnedit_64bit>tree /a /f
|   fonts.conf
|   hide.vbs
|   xnc.sh
|   xnedit.bat
|   xnedit.ico
|   XNEdit.lnk
|
+---.xnedit
|       autoload.nm
|       cygspecial.nm
|       nedit.history
|       nedit.rc
|
+---fonts
|   |   .uuid
|   |
|   \---dejavu
|           .uuid
|           DejaVuSansMono-Bold.ttf
|           DejaVuSansMono-BoldOblique.ttf
|           DejaVuSansMono-Oblique.ttf
|           DejaVuSansMono.ttf
|
\---usr
    \---bin
            awk
            bash.exe
            cat.exe
            ctags.exe
            cygbrotlicommon-1.dll
            cygbrotlidec-1.dll
            cygbz2-1.dll
            cygexpat-1.dll
            cygfontconfig-1.dll
            cygfreetype-6.dll
            cyggcc_s-seh-1.dll
            cyggmp-10.dll
            cygICE-6.dll
            cygiconv-2.dll
            cygintl-8.dll
            cygjpeg-8.dll
            cygmpfr-6.dll
            cygncursesw-10.dll
            cygpath.exe
            cygpcre-1.dll
            cygpng16-16.dll
            cygreadline7.dll
            cygsigsegv-2.dll
            cygSM-6.dll
            cyguuid-1.dll
            cygwin1.dll
            cygX11-6.dll
            cygXau-6.dll
            cygxcb-1.dll
            cygXdmcp-6.dll
            cygXext-6.dll
            cygXft-2.dll
            cygXm-4.dll
            cygXmu-6.dll
            cygXpm-4.dll
            cygXrender-1.dll
            cygXt-6.dll
            cygz.dll
            date.exe
            diff.exe
            dos2unix.exe
            echo.exe
            expand.exe
            gawk.exe
            grep.exe
            ls.exe
            nl.exe
            sed.exe
            sleep.exe
            sort.exe
            test.exe
            tr.exe
            unexpand.exe
            wc.exe
            xnc.exe
            xnedit.exe

as now the package is 21 MB and binaries are not stripped

xnedit_cygwin_package01

unixwork commented 3 years ago

Hi,

thanks for the work on the windows package. A pull request would be great. You can place your files to the resources subdirectory, maybe resources/cygwin.

efa commented 3 years ago

I think with https://github.com/unixwork/xnedit/pull/43 you can close this Issue. Or you can leave open the Issue to further discuss future troubles and track other PR I will do, as you want

efa commented 3 years ago

I tested on another PC and work the same.

On 'xnedit.bat' startup, I got this log:

D:\installer\xnedit_64bit>xnedit.bat
Starting 'xnedit.bat' ...
D:\installer\xnedit_64bit
Batch param:
Batch param:
bash.exe: warning: could not find /tmp, please create!
Starting 'xnc.sh' ...
Bash param:
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
PATH=/cygdrive/d/installer/xnedit_64bit/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.
HOME=/cygdrive/c/Users/username
HOME=/cygdrive/c/Users/username
XNEDIT_HOME=/cygdrive/d/installer/xnedit_64bit/.xnedit
DISPLAY=:0
XKEYSYMDB=/cygdrive/d/installer/xnedit_64bit/xkeysymdb
FONTCONFIG_PATH=/cygdrive/d/installer/xnedit_64bit
XDG_DATA_HOME=/cygdrive/d/installer/xnedit_64bit
Run Xnedit without parameters ...
Cannot get X Input Manager

Mostly are my debug prints, but there are two warns:

bash.exe: warning: could not find /tmp, please create!
Cannot get X Input Manager

the first one seems a bug with current Cygwin, and the simple fix does not work, I had to search a fix in them mail list.

Do you have an idea how to fix the "Cannot get X Input Manager"?

As now "xkeysymdb" is not there ($XKEYSYMDB), but copying my file, does not solve.

Note: everything seems work also with those WARNs.

unixwork commented 3 years ago

Hi,

The "Cannot get X Input Manager" is an error message that I've implemented in case the function XmImGetXIM fails. I don't know why it fails, I have to check that.

As a result of this error, some characters can't be typed. Looks like only ASCII works. I will try to fix that.

Everything else seems to work.

efa commented 3 years ago

note: If I run xnedit from inside Cygwin shell I do not get that error. Happen only with the distribution package I have made. So I want to fix that. Should I not be able to insert any non-ASCII characters?

efa commented 3 years ago

I had fixed the error "warning: could not find /tmp, please create!" creating the /tmp inside /usr, I do not know why there, but works

efa commented 3 years ago

exact, no non-ASCII chars can be entered using my distribution package, while in Cygwin shell xnedit works. Here the characters that works with Italian keyboard:

\1234567890'
   qwertyuiop+
asdfghjkl
<zxcvbnm,.-
|!"$%&/()=?^
QWERTYUIOP*{}
ASDFGHJKL
>ZXCVBNM;:_

so miss: £ìèéçò°ù§€

Edit menu, Insert Unicode (I tested `=0096, ~=0126 and è=0232) work

unixwork commented 3 years ago

xnedit needs the files from /usr/share/X11/locale, otherwise the input method can't be initialized.

I think the path is hard coded in x11 libs, thefore the installed usr directory needs to be mounted to /usr with the cygwin mount tool.

the following steps were successful: copy share/x11/locale to D:\installer\xnedit_64bit\usr copy mount.exe to D:\installer\xnedit_64bit\usr\bin

add the following line to xnc.sh:

usr/bin/mount D:/installer/xnedit_64bit/usr /usr

efa commented 3 years ago

thank you for test it, and solve the bug. I will try on my systems, maybe tomorrow

efa commented 3 years ago

OK, tested and work.

I saw that to avoid all warn (mount complaint for missing /usr) it is necessary to create a 'usr' directory inside: D:\installer\xnedit_64bit\usr\

So maybe better to rename: D:\installer\xnedit_64bit\usr to something like: D:\installer\xnedit_64bit\cygroot and move other (like 'tmp', 'fonts') subdir inside that. Maybe than, 'share' can go below: D:\installer\xnedit_64bit\cygroot\usr and then, 'fonts' below 'share'

I cannot find a Cygwin deploy guide. Will try and test

efa commented 3 years ago

OT: you probably should copy README in README.md, so github web users understand what is this project

efa commented 3 years ago

tested the new path organization and work, solve both startup warn, and XNEdit can input non ASCII chars. This path tree is more compliant to Filesystem Hierarchy Standard Will do a new git PR for scripts v0.02

unixwork commented 3 years ago

thanks

efa commented 3 years ago

done, see https://github.com/unixwork/xnedit/pull/45

efa commented 3 years ago

as now I copied all files inside '/usr/share/X11/locale', are those all necessary? The unstrip package is now sized 22.3 MB

efa commented 3 years ago

I installed Cygwin on Win10 inside VirtualBox so I can fast test on my Debian

efa commented 3 years ago

next I will add a Windows shortcut generator to the package, Windows users expect it:

"link.vbs":

Set oWS = WScript.CreateObject("WScript.Shell")
sLinkFile = "D:\installer\xnedit_64bit\XNEnit.lnk"
Set oLink = oWS.CreateShortcut(sLinkFile)
    oLink.TargetPath = "D:\installer\xnedit_64bit\xnedit.bat"
 '  oLink.Arguments = ""
 '  oLink.Description = "XNEdit"
 '  oLink.HotKey = "CTRL+ALT+SHIFT+N"
    oLink.IconLocation = "D:\installer\xnedit_64bit\xnedit.ico, 0"
 '  oLink.WindowStyle = "1"
    oLink.WorkingDirectory = "D:\installer\xnedit_64bit"
oLink.Save

I will generate it with know parameters at the end of 'xnedit_pkg', then run with: C:\Windows\System32\wscript.exe "link.vbs"

efa commented 3 years ago

done with https://github.com/unixwork/xnedit/pull/46

efa commented 3 years ago

I disabled debug per default in 'xnedit_pkg', to me seems stable, and removed some prints when debug is off in 'xnedit.bat', see: https://github.com/unixwork/xnedit/pull/47

efa commented 3 years ago

I added a note about XNEdit on Wikipedia: https://en.wikipedia.org/wiki/NEdit

I found in my HDD, the NSI file I used for Nedit 5.5 in 2009: https://en.wikipedia.org/wiki/Nullsoft_Scriptable_Install_System I will adapt to current binaries:

; nedit.nsi
;
; This script is based on example2.nsi, so it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install Nedit into a fixed directory %ProgramFiles%\Nedit
; International version

; nedit.nsi V.0.01.00 2009/02/18: Nedit installer for Win32 systems
; Copyright © 2009 Author: Valerio Messina
; nedit.nsi is part of Nedit multi-purpose text editor http://www.nedit.org/
; nedit.nsi is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; nedit.nsi is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with nedit.nsi. If not, see <http://www.gnu.org/licenses/>.

;--------------------------------
; ToDo: let's choose at least the destination drive letter
;       put macro in ~\.nedit\
;       unistaller should remove custom settings ~\.nedit\* if asked

; Compiler Compression options
SetCompress force
SetCompressor /SOLID lzma

; Name shown in the installer and uninstaller
Name "Nedit multi-purpose text editor"

; The file to write
OutFile "nedit5.5win32setup.exe"

; The default installation directory
InstallDir $PROGRAMFILES\Nedit

; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\Nedit" "Install_Dir"

; Request application privileges for Windows Vista
RequestExecutionLevel admin

;--------------------------------

; Pages
Page components
;Page directory
Page instfiles

UninstPage uninstConfirm
UninstPage instfiles

;--------------------------------

; The stuff to install actions
Section "Nedit (required)"
  SectionIn RO

  ; Set output path to the installation directory.
  SetOutPath "$INSTDIR"

  ; Put files to install there
  File .tcshrc
  File autoload.nm
  File cygspecial.nm
  File GNU-GPL.txt
  ;File Nedit5.5.lnk
  File nedit-98.bat
  ;File NEdit-98.pif
  File nedit.bat
  File nedit.history
  File nedit.ico
  File nedit.pif
  File nedit.rc
  File read.me
  File winclip.nm

  ; Subdirectories
  File /r "contrib"
  File /r "cygwin" ; cygwin1.5.25-15 released Jun 14 2008

  ; SendTo context menu
  CreateShortCut "$SENDTO\Nedit.lnk" "$INSTDIR\nedit.bat" "" "$INSTDIR\nedit.ico" 0

  ; Write the installation path into the registry
  WriteRegStr HKLM SOFTWARE\Nedit "Install_Dir" "$INSTDIR"

  ; Write the uninstall keys for Windows
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nedit" "DisplayName" "Nedit"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nedit" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nedit" "NoModify" 1
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nedit" "NoRepair" 1
  WriteUninstaller "uninstall.exe"
SectionEnd

; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
  CreateDirectory "$SMPROGRAMS\Nedit"
  CreateShortCut "$SMPROGRAMS\Nedit\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\Nedit\Nedit.lnk" "$INSTDIR\nedit.bat" "" "$INSTDIR\nedit.ico" 0
SectionEnd

;--------------------------------

; Uninstaller actions
Section "Uninstall"
  ; Remove files in subdirectories
  Delete "$INSTDIR\cygwin\bin\shell-co\*.*"
  Delete "$INSTDIR\cygwin\bin\c\*.*"
  Delete "$INSTDIR\cygwin\bin\*.*"
  Delete "$INSTDIR\cygwin\*.*"
  Delete "$INSTDIR\contrib\*.*"

  ; Remove files and uninstaller
  Delete "$INSTDIR\.tcshrc"
  Delete "$INSTDIR\autoload.nm"
  Delete "$INSTDIR\cygspecial.nm"
  Delete "$INSTDIR\GNU-GPL.txt"
  ;Delete "$INSTDIR\Nedit5.5.lnk"
  Delete "$INSTDIR\nedit-98.bat"
  ;Delete "$INSTDIR\NEdit-98.pif"
  Delete "$INSTDIR\nedit.bat"
  Delete "$INSTDIR\nedit.history"
  Delete "$INSTDIR\nedit.ico"
  Delete "$INSTDIR\nedit.pif"
  Delete "$INSTDIR\nedit.rc"
  Delete "$INSTDIR\read.me"
  Delete "$INSTDIR\winclip.nm"

  Delete "$INSTDIR\uninstall.exe"

  ; Remove user custom settings
  ;Delete ~\.nedit\autoload.nm   ; keep user configurations
  ;Delete ~\.nedit\cygspecial.nm ; keep user configurations
  ;Delete ~\.nedit\nedit.history ; keep user configurations
  ;Delete ~\.nedit\nedit.rc      ; keep user configurations
  ;Delete ~\.nedit\winclip.nm    ; keep user configurations

  ; Remove shortcuts in start Menu, if any
  Delete "$SMPROGRAMS\Nedit\*.*"

  ; Remove shortcut in SendTo context menu
  Delete "$SENDTO\Nedit.lnk"

  ; Remove directories used
  RMDir /r "$INSTDIR\cygwin"
  RMDir "$INSTDIR\contrib"
  RMDir "$INSTDIR"
  RMDir "$SMPROGRAMS\Nedit"

  ; Remove registry keys
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Nedit"
  DeleteRegKey HKLM SOFTWARE\Nedit
SectionEnd
efa commented 3 years ago

I always get the message "Cannot get X Input Manager" starting XNEdit release of Juni 13, 2021 on Debian 10 too. Unicode text input work as expected Note: Juni is not localized nor in English.

efa commented 3 years ago

currently I'm trying to fix the install path containing spaces, as now do not work, and $ProgramFiles often has spaces. More it require admin privileges, working on that too

efa commented 3 years ago

done in: https://github.com/unixwork/xnedit/pull/48

efa commented 3 years ago

added license and description files Fix: NSIS install to "C:\Program Files" as 64-bit Fix: let open files passed as args in path with spaces done in: https://github.com/unixwork/xnedit/pull/49

efa commented 3 years ago

'xnedit_pkg' can guess 'bin' directory On Cygwin 'make install' call 'xnedit_pkg' done in: https://github.com/unixwork/xnedit/pull/50

unixwork commented 3 years ago

We have a problem with the current Makefile. The cygwin install targets relies on GNU make syntax. I definitely want to support building with BSD or Solaris make, like it was possible before.

Would a separatet install-cygwin target be fine? Another solution would be that make install just calls an install script.

efa commented 3 years ago

already now the make install (for Cygwin only) call an install script. As now I had no access to BSD or Solaris (but I used to work on Sparcstation and Ultrasparc for years, and there I started to use Nedit), and sure, also I want things work on most systems as possible. Please let me understand what is the problem, is the 'ifneq' that is not supported by non-GNU make: ifneq ($(OS),Cygwin) ? Or maybe the # after the else, I think it can confuse most versions of make, also some old gmake.

In the mean time, revert back the Makefile modifications, or, if you prefer, undo my PR and I do another PR for the 'xnedit_pkg' modifications only keeping upstream Makefile.

unixwork commented 3 years ago

Yes, it is the ifneq, and there is no Posix compatible replacement for that.

I think it would be better to have a separate make target, because maybe someone wants to do a normal install in a cygwin environment.

efa commented 3 years ago

the BSD make should support conditionals: https://en.wikipedia.org/wiki/Make_%28software%29#Derivatives Is it the OpenSolaris's make that does not work?

We can leave make install as was before, and use make dist-cygwin and document that to launch 'xnedit_pkg'

Take care that make dist-bin give error on Debian