@@ -713,6 +713,23 @@ ENABLE_AUTO([isatty], [support for isatty()],
713713 AC_SEARCH_LIBS ( [ isatty] , , , [ have_isatty=no] )
714714] )
715715
716+ dnl trying to mimic the default setting
717+ pkgdatadir='${datadir}/${PACKAGE}'
718+
719+ ENABLE_EXPLICIT([ windows-installer] , [ creation of an installer for Windows] ,
720+ [
721+ AC_CHECK_PROG ( [ have_nsis] , [ nsis] , [ yes] , [ no] )
722+ AS_IF ( [ test x$enable_app_bundle = xyes -o x$enable_app_bundle = x] ,
723+ [ WINDOWS_INSTALLER=SoundScapeRenderer-$PACKAGE_VERSION] ,
724+ [ WINDOWS_INSTALLER=$enable_windows_installer] )
725+
726+ dnl WARNING: any user-specified --prefix, --bindir, ... is overwritten!
727+ dnl however, it can still be specified at make time (although kinda useless)!
728+ prefix=$(pwd)/windows-installer
729+ docdir=\${prefix}/Documentation
730+ pkgdatadir=\${prefix}/PkgData
731+ ] )
732+
716733ENABLE_AUTO([ browser-gui] , [ creation of HTML/JavaScript files for browser GUI] ,
717734[
718735 AC_ARG_VAR ( [ YARN] , [ Yarn package manager command] )
@@ -734,14 +751,17 @@ ENABLE_AUTO([browser-gui], [creation of HTML/JavaScript files for browser GUI],
734751 ] )
735752] )
736753
754+ AC_SUBST ( WINDOWS_INSTALLER )
755+ AC_SUBST ( pkgdatadir )
756+
737757AC_SUBST ( OPT_FLAGS )
738758AC_SUBST ( PKG_FLAGS )
739759AC_SUBST ( WARNING_FLAGS )
740760AC_SUBST ( DEBUGGING_FLAGS )
741761
742762dnl List of output files generated by AC_OUTPUT from their respective *.in files
743763AC_CONFIG_FILES ( [ Makefile src/Makefile man/Makefile browser-gui/Makefile] )
744- AC_CONFIG_FILES ( [ tests/Makefile data/Makefile] )
764+ AC_CONFIG_FILES ( [ tests/Makefile data/Makefile data/nsis/Makefile ] )
745765
746766dnl AC_OUTPUT should be the last command (except maybe some status messages)
747767dnl It generates and runs config.status, which in turn creates the Makefiles and
@@ -801,7 +821,13 @@ echo "| Network: legacy/WebSocket/FUDI ......... : $have_ip_interface/$have_webs
801821echo "| Qt GUI/Browser GUI ..................... : $have_gui/$have_browser_gui"
802822echo "|"
803823echo "| Enable debugging/optimization .......... : $have_debugging/$have_optimization"
824+ AS_IF ( [ test x$have_windows_installer = xyes] ,
825+ [
826+ echo "| Installer for Windows .................. : $WINDOWS_INSTALLER"
827+ ] ,
828+ [
804829echo "| Install prefix ......................... : $prefix"
830+ ] )
805831
806832AS_IF ( [ test x$have_ecasound = xyes -a x$have_ecasound_program != xyes] ,
807833[
@@ -815,8 +841,20 @@ AS_IF([test x$have_manpages != xyes],
815841 echo "|> WARNING: help2man was not found!"
816842 echo "|> Disabling building of manpages"
817843] )
844+ AS_IF ( [ test x$have_windows_installer = xyes -a x$have_nsis != xyes] ,
845+ [
846+ echo "|"
847+ echo "|> WARNING: NSIS was not found!"
848+ echo "|> It is needed for creating the Windows installer."
849+ ] )
818850
819851echo "|"
820852echo
853+ AS_IF ( [ test x$have_windows_installer = xyes] ,
854+ [
855+ echo 'If everything looks OK, continue with "make" and "make nsis".'
856+ ] ,
857+ [
821858echo 'If everything looks OK, continue with "make" and "make install".'
859+ ] )
822860echo
0 commit comments