Skip to content

Commit

Permalink
Merge pull request #56 from adamyg/topic/build-228
Browse files Browse the repository at this point in the history
Topic/build 228
  • Loading branch information
adamyg authored Sep 10, 2023
2 parents 960e687 + d4dcd51 commit c116758
Show file tree
Hide file tree
Showing 394 changed files with 29,863 additions and 11,554 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Checkout submodules
run: |
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
.\support\gmake-42 release build
- name: Package
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: package-${{ matrix.config.toolchain }}
path: mcwin32/bin.${{ matrix.config.toolversion }}/release/*
Expand All @@ -108,3 +108,4 @@ jobs:
with:
files: ./mcwin32/releases/mcwin32-build*-setup.exe
draft: true

153 changes: 117 additions & 36 deletions INSTALL.txt
Original file line number Diff line number Diff line change
@@ -1,68 +1,149 @@

Midnight Commander Win32 Native
Midnight Commander Win32 Native build and installation tools.

Requirements:

o gnu-win32.
o Suitable compiler chain, from one of the following

o Open Watcom 1.9
or Microsoft Visual Studio 2013 (or greater).
o Open Watcom 1.9 or the later 2.0.
o Microsoft Visual Studio 2013 (or greater).
o mingw32/64

o perl.
o Perl - Make system generation and run-time support.

o gtk-win32 (optional).
o Unix binary tools - Make system run-time support.

o Inno Setup.
o InnoSetup - Required for the creation of installation packages.

Required for the creation of installation packages.

Components:

o mcsrc Midnight Commander source (currently 4.8.21),
mc-win32 changes enclosed within "if defined(WIN32)"
and/or //WIN32 comment blocks.
o mcsrc - Midnight Commander source (currently 4.8.29).

mc-win32 changes enclosed within "ifdefined(WIN32)"
and/or are labelled with "//WIN32" comment blocks.

o mcwin32 - Windows specific code and build env.

o mcwin32 Windows specific code and build env.

Build steps:

a. Install the gnuwin32 tool set or similar. (optional) set the
PATH environment variable to include the win32 sub-directory which
contains console versions of several GNU tools, including gmake.
1. binutils

A unix style bintools needs to be available, plus the installation should be
visible within the current PATH.

Examples:

o gnuwin32 [ http://unxutils.sourceforge.net/ ]

Note:
These set of tools are aging, for example the gmake bundled with gnuwin32 is
an older 3.81 release, which wont function correctly. GNU make 4.0 or greater
is required, advise replacing with the bundled 'mcwin32/support/gmake-42.exe'.

o msys2

Note: cygwin is not suitable nor supported.

Source: http://unxutils.sourceforge.net/

b. Compiler installation
2. Compiler installation

Either Open-Watcom, install the current Open Watcom 1.9 installation
or MSVC 2013 or greater is required. The installation should visible
One of the following C/C++ toolchains needs to be available, plus the installation
should be visible within the current PATH.

Suitable distributions include:

o Open Watcom 1.9 or the later 2.0.
o Microsoft Visual Studio 2013 (or greater).
o mingw32/64 [ experimental ].

Note: OpenWatcom is currently utlised for releases.


3. Perl installation

A perl installation needs to be available plus the installation should be visible
within the current PATH.

c. Perl installation
Suitable perl distributions include:

o ActiveState Perl.
o Strawberry Perl.


A perl installation must be available, examples include ActiveState Perl,
Strawberry Perl. The installation should visible within the current PATH.
4. InnoSetup installation, optional

d. For older builds (pre 4.8.19), install the 'all-in-one-bundle' within the
root under the directory 'gtk'.
Install InnoSetup 5.6.x within its default installation path; if modified the
arguments to the support scripts below shall need to tbe adjusted to match,
set the envvar INNO="<install-path>" prior to priming the tree.

Source: http://www.gtk.org/download/win32.php
This package is optional and only required if an installer is being built.

e. Prime the tree; generate makefiles
6.x Inno and later is also an option, but the Installer will only function on Vista
or greater. 6.x and later versions of Inno no longer support Windows 2000, XP, and Server
2003.

cd mcwin32

support\vc2015config.bat
or support\vc2017config.bat
or support\vc2019config.bat
or support\owcconfig.bat

f. Build,
4. Prime the build tree; generate makefiles

[g]make [release]
$ cd mcwin32

g. To create the installer and/or copy the bin tree your install location.
$ support\vc2015config.bat
or $ support\vc2017config.bat
or $ support\vc2019config.bat
or $ support\owcconfig.bat
or $ support\owc20config.bat

start mc-inno-setup.iss
Note:
These scripts execute the perl module makelib.pl which generates Makefiles targeted
for the specified toolchain.


5. Build the entire tree with:

$ gmake release
or $ support\gmake-42 release

Usage:

| make [VERBOSE=1] [release or debug] target
|
| Build one or more of the following targets recursively within each sub-directory
| for the toolchain <toolchains>.
|
| Options:
| VERBOSE - increase run-time diagnostics; suppress stderr filtering.
|
| Targets:
|
| build - build everything.
| package - build package.
| clean - delete everything which can be remade.
| vclean - delete all.
| help - command line usage.


6. To create the installer.

$ support\gmake-42 release package
or $ start mc-inno-setup.iss

Note:
Alternatively zip/copy the bin tree to your desired install location, as the
application is portable.


7. Finally, please review the packaged example alternative configurations as win32
development environments can be problematic, dependent on the host setup:

o .github/workflows, github build actions for latest OWC, MSVC abd MINGW toolchains.

o Appveyor CI integration notes under mcwin32/support.

plus other helper scripts under mcwin32/support.


Last Update: Feb/2023
=end=

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

# Midnight Commander for Windows

## Native Midnight Commander 4.8.28 for Windows/Win32
## Native Midnight Commander 4.8.29 for Windows/Win32

Windows XP+/32 bit native port of GNU Midnight Commander, based on the current 4.8.27 development stream.
Windows XP+/32 bit native port of GNU Midnight Commander, based on the current 4.8.29 development stream.

Supports both the recent Windows 10 plus the prior legacy console, 16 and 256 colour modes are available within either.

Expand Down Expand Up @@ -43,7 +43,7 @@ mcupdater force
Updating older distribution shall require you download from one of the sites listed below or alternatively winget and then update if requried.

```
winget install --id=GNU.MidnightCommander -e
winget install --id=GNU.MidnightCommander -e
```

To utilise *Files transferred over Shell protocol* **(FISH)** over SSH, an ssh client is required, you can either install [Win32-OpenSSH](https://github.com/powershell/Win32-OpenSSH) or [WinXSH](https://github.com/adamyg/winxsh). For legacy RSH based connections [WinXSH](https://github.com/adamyg/winxsh) is needed.
Expand Down
3 changes: 1 addition & 2 deletions mcsrc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*~
*.cache
*.tar.gz
*.orig
ABOUT-NLS
Make.common
Makefile
Expand Down Expand Up @@ -50,4 +49,4 @@ tests/src/editor/test-data.txt
tests/src/vfs/extfs/helpers-list/data/config.sh
mc-version.h
*.old

*.orig
31 changes: 26 additions & 5 deletions mcsrc/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fi
AC_SUBST(MANDOC)
AC_SUBST(MAN_FLAGS)

dnl Check for -z, -L, and -S options to file
dnl Check for -z, -b, -L, and -S options to file
AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
if $HAVE_FILECMD; then
dnl Don't use the file command if it doesn't accept the -z option
Expand All @@ -148,7 +148,22 @@ if $HAVE_FILECMD; then
fi

if test x$mc_cv_file_z = xyes; then
dnl file is used; check -L and -S options
dnl file is used; check -b, -L and -S options

AC_MSG_CHECKING([for -b option to file command])
AC_CACHE_VAL(mc_cv_file_b, [
file -b . > /dev/null 2>&1
if test $? = 0; then
mc_cv_file_b=yes
else
mc_cv_file_b=no
fi
])
AC_MSG_RESULT([$mc_cv_file_b])

if test x$mc_cv_file_b = xyes; then
AC_DEFINE(FILE_B, "-b ", [Define if the file command accepts the -b option])
fi

AC_MSG_CHECKING([for -L option to file command])
AC_CACHE_VAL(mc_cv_file_L, [
Expand Down Expand Up @@ -332,11 +347,13 @@ dnl ############################################################################
case $host_os in
*os400)
AC_PATH_PROG([PERL], [perl], [/QOpenSys/pkgs/bin/perl])
AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/QOpenSys/pkgs/bin/perl])
AC_PATH_PROG([PYTHON], [python], [/QOpenSys/pkgs/bin/python2])
AC_PATH_PROG([RUBY], [ruby], [/QOpenSys/pkgs/bin/ruby])
;;
*)
AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
AC_PATH_PROG([PERL_FOR_BUILD], [perl], [/usr/bin/perl])
AC_PATH_PROG([PYTHON], [python], [/usr/bin/python])
AC_PATH_PROG([RUBY], [ruby], [/usr/bin/ruby])
esac
Expand Down Expand Up @@ -557,7 +574,7 @@ AM_CONDITIONAL([HAVE_GMODULE], [test -n "$g_module_supported" && \
test x"$textmode_x11_support" = x"yes" -o x"$enable_aspell" = x"yes"])

AC_ARG_ENABLE([configure-args],
AS_HELP_STRING([--enable-configure-args], [Handle all compiler warnings as errors]))
AS_HELP_STRING([--enable-configure-args], [Embed ./configure arguments into binaries]))
if test "x$enable_configure_args" != xno; then
AC_DEFINE([ENABLE_CONFIGURE_ARGS], 1, [Define to enable showing configure arguments in help])
AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments])
Expand Down Expand Up @@ -588,7 +605,7 @@ misc/ext.d/misc.sh
misc/ext.d/text.sh
misc/ext.d/web.sh
misc/macros.d/Makefile
misc/mc.ext
misc/mc.ext.ini
src/Makefile
src/consaver/Makefile
Expand Down Expand Up @@ -663,7 +680,6 @@ lib/vfs/Makefile
lib/widget/Makefile
misc/syntax/Makefile
misc/syntax/Syntax
doc/Makefile
Expand All @@ -689,6 +705,11 @@ doc/hlp/sr/Makefile
po/Makefile.in
])

dnl https://stackoverflow.com/questions/30897170/ac-subst-does-not-expand-variable/30932102#30932102
AC_CONFIG_FILES(
[misc/syntax/Syntax], [sed -i -e "s%\${prefix}%$PREFIX%" misc/syntax/Syntax], [export PREFIX=$prefix]
)

AC_CONFIG_FILES([
tests/Makefile
tests/lib/Makefile
Expand Down
2 changes: 1 addition & 1 deletion mcsrc/contrib/README.xterm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ complete reference, see xterm(1) and X Toolkit Intrinsics manual Appendix B.

Please, if you find any problems or errors in this stuff, let me know by
e-mail to
mc-devel@gnome.org.
mc-devel@lists.midnight-commander.org.



Expand Down
11 changes: 0 additions & 11 deletions mcsrc/contrib/dist/Makefile.am

This file was deleted.

1 change: 0 additions & 1 deletion mcsrc/contrib/dist/gentoo/Makefile.am

This file was deleted.

39 changes: 0 additions & 39 deletions mcsrc/contrib/dist/gentoo/README

This file was deleted.

Loading

0 comments on commit c116758

Please sign in to comment.