You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(208) |
Nov
(108) |
Dec
(114) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(160) |
Feb
(184) |
Mar
(149) |
Apr
(148) |
May
(168) |
Jun
(144) |
Jul
(194) |
Aug
(47) |
Sep
(40) |
Oct
(44) |
Nov
(54) |
Dec
(30) |
2005 |
Jan
(77) |
Feb
(77) |
Mar
(69) |
Apr
(22) |
May
(21) |
Jun
(4) |
Jul
(3) |
Aug
(1) |
Sep
(11) |
Oct
(26) |
Nov
|
Dec
(10) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(7) |
Jun
(11) |
Jul
(59) |
Aug
(51) |
Sep
(34) |
Oct
(6) |
Nov
(4) |
Dec
(24) |
2007 |
Jan
(102) |
Feb
(69) |
Mar
(50) |
Apr
(56) |
May
(198) |
Jun
(119) |
Jul
(51) |
Aug
(48) |
Sep
(49) |
Oct
(87) |
Nov
(107) |
Dec
(79) |
2008 |
Jan
(46) |
Feb
(32) |
Mar
(60) |
Apr
(15) |
May
(39) |
Jun
(60) |
Jul
(30) |
Aug
(26) |
Sep
(11) |
Oct
(26) |
Nov
(50) |
Dec
(56) |
2009 |
Jan
(55) |
Feb
(7) |
Mar
(8) |
Apr
(21) |
May
(15) |
Jun
(13) |
Jul
(20) |
Aug
(14) |
Sep
(19) |
Oct
(6) |
Nov
(3) |
Dec
(7) |
2010 |
Jan
(4) |
Feb
(9) |
Mar
(1) |
Apr
|
May
(13) |
Jun
(1) |
Jul
(4) |
Aug
(11) |
Sep
(11) |
Oct
(23) |
Nov
(16) |
Dec
(33) |
2011 |
Jan
(49) |
Feb
(33) |
Mar
(12) |
Apr
(73) |
May
(44) |
Jun
(71) |
Jul
(14) |
Aug
(3) |
Sep
(12) |
Oct
|
Nov
(44) |
Dec
(25) |
2012 |
Jan
(36) |
Feb
(28) |
Mar
(7) |
Apr
|
May
(21) |
Jun
(14) |
Jul
(7) |
Aug
|
Sep
(8) |
Oct
(18) |
Nov
(25) |
Dec
(59) |
2013 |
Jan
(30) |
Feb
(30) |
Mar
(14) |
Apr
(7) |
May
(91) |
Jun
(11) |
Jul
(5) |
Aug
(4) |
Sep
(21) |
Oct
(6) |
Nov
|
Dec
(4) |
2014 |
Jan
(6) |
Feb
(5) |
Mar
(3) |
Apr
(2) |
May
(7) |
Jun
|
Jul
(3) |
Aug
(2) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
(8) |
2015 |
Jan
(7) |
Feb
(2) |
Mar
(77) |
Apr
(23) |
May
(69) |
Jun
(26) |
Jul
(2) |
Aug
(4) |
Sep
(2) |
Oct
(7) |
Nov
(9) |
Dec
(17) |
2016 |
Jan
(5) |
Feb
(1) |
Mar
(18) |
Apr
(57) |
May
(134) |
Jun
(96) |
Jul
(52) |
Aug
(76) |
Sep
(26) |
Oct
(49) |
Nov
(44) |
Dec
(23) |
2017 |
Jan
(72) |
Feb
(13) |
Mar
(29) |
Apr
(19) |
May
(61) |
Jun
(75) |
Jul
(58) |
Aug
(165) |
Sep
(62) |
Oct
(23) |
Nov
(41) |
Dec
(11) |
2018 |
Jan
(18) |
Feb
(16) |
Mar
(20) |
Apr
(56) |
May
(28) |
Jun
(49) |
Jul
(37) |
Aug
(15) |
Sep
(32) |
Oct
(11) |
Nov
(10) |
Dec
(11) |
2019 |
Jan
(50) |
Feb
(12) |
Mar
(26) |
Apr
(12) |
May
(6) |
Jun
|
Jul
(6) |
Aug
|
Sep
(10) |
Oct
(1) |
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(12) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
(39) |
Mar
(31) |
Apr
|
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
(1) |
Feb
(1) |
Mar
(19) |
Apr
(2) |
May
(4) |
Jun
(14) |
Jul
(11) |
Aug
(7) |
Sep
(7) |
Oct
(18) |
Nov
(5) |
Dec
|
2024 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
|
From: <sba...@us...> - 2023-06-03 04:51:12
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/9f559346b239a12928207bdf446697a364d0eb00/ The following commit(s) were added to refs/heads/master by this push: new 9f559346 Rename 'icon' to 'generic-icon' in the mime-info file 9f559346 is described below commit 9f559346b239a12928207bdf446697a364d0eb00 Author: Alberto Garcia <be...@ig...> AuthorDate: Sat Jun 3 06:49:18 2023 +0200 Rename 'icon' to 'generic-icon' in the mime-info file The Freedesktop theme spec says that icons are first searched in the current theme, then in its parents and finally in the default "hicolor" theme. "hicolor" is where Fuse installs its icons, however if generic-icon is not specified in fuse.xml then it defaults to application-x-generic. This means that if the current theme provides an icon named application-x-generic it will be used instead of the ZX Spectrum one. Fixes bug #494 --- data/fuse.xml.in | 72 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/data/fuse.xml.in b/data/fuse.xml.in index a5e215c6..e5acf207 100644 --- a/data/fuse.xml.in +++ b/data/fuse.xml.in @@ -5,17 +5,17 @@ <magic> <match type="string" offset="0" value="Compressed Square Wave\x1a"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.csw"/> </mime-type> <mime-type type="application/x-spectrum-dck"> <comment>ZX Spectrum cartridge</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.dck"/> </mime-type> <mime-type type="application/x-spectrum-d80"> <comment>ZX Spectrum disk</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.d40"/> <glob pattern="*.d80"/> </mime-type> @@ -25,7 +25,7 @@ <match type="string" offset="0" value="MV - CPCEMU Disk-File\x0d\x0aDisk-Info\x0d\x0a"/> <match type="string" offset="0" value="EXTENDED CPC DSK File\x0d\x0aDisk-Info\x0d\x0a"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.dsk"/> </mime-type> <mime-type type="application/x-spectrum-fdi"> @@ -33,7 +33,7 @@ <magic> <match type="string" offset="0" value="FDI"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.fdi"/> </mime-type> <mime-type type="application/x-spectrum-hdf"> @@ -41,42 +41,42 @@ <magic> <match type="string" offset="0" value="RS-IDE\x1a"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.hdf"/> </mime-type> <mime-type type="application/x-spectrum-img"> <comment>ZX Spectrum disk</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.img"/> </mime-type> <mime-type type="application/x-spectrum-ltp"> <comment>ZX Spectrum tape</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.ltp"/> </mime-type> <mime-type type="application/x-spectrum-mdr"> <comment>ZX Spectrum microdrive</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.mdr"/> </mime-type> <mime-type type="application/x-spectrum-mgt"> <comment>ZX Spectrum disk</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.mgt"/> </mime-type> <mime-type type="application/x-spectrum-mgtsnp"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.mgtsnp"/> </mime-type> <mime-type type="application/x-spectrum-opd"> <comment>ZX Spectrum disk</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.opd"/> </mime-type> <mime-type type="application/x-spectrum-opu"> <comment>ZX Spectrum disk</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.opu"/> </mime-type> <mime-type type="application/x-spectrum-pzx"> @@ -84,7 +84,7 @@ <magic> <match type="string" offset="0" value="PZXT"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.pzx"/> </mime-type> <mime-type type="application/x-spectrum-raw"> @@ -92,12 +92,12 @@ <magic> <match type="string" offset="0" value="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Raw tape sample"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.raw"/> </mime-type> <mime-type type="application/x-spectrum-rom"> <comment>ZX Spectrum cartridge</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.rom"/> </mime-type> <mime-type type="application/x-spectrum-rzx"> @@ -105,7 +105,7 @@ <magic> <match type="string" offset="0" value="RZX!"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.rzx"/> </mime-type> <mime-type type="application/x-spectrum-sad"> @@ -113,7 +113,7 @@ <magic> <match type="string" offset="0" value="Aley's disk backup"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.sad"/> </mime-type> <mime-type type="application/x-spectrum-scl"> @@ -121,43 +121,43 @@ <magic> <match type="string" offset="0" value="SINCLAIR"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.scl"/> </mime-type> <mime-type type="application/x-spectrum-slt"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.slt"/> </mime-type> <mime-type type="application/x-spectrum-sna"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.sna"/> <glob pattern="*.snapshot"/> </mime-type> <mime-type type="application/x-spectrum-s"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.s"/> </mime-type> <mime-type type="application/x-spectrum-snp"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.snp"/> </mime-type> <mime-type type="application/x-spectrum-sp"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.sp"/> </mime-type> <mime-type type="application/x-spectrum-spc"> <comment>ZX Spectrum tape</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.spc"/> </mime-type> <mime-type type="application/x-spectrum-sta"> <comment>ZX Spectrum tape</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.sta"/> </mime-type> <mime-type type="application/x-spectrum-szx"> @@ -165,7 +165,7 @@ <magic> <match type="string" offset="0" value="ZXST"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.szx"/> <glob pattern="*.zx-state"/> </mime-type> @@ -175,12 +175,12 @@ <match type="string" offset="0" value="TD"/> <match type="string" offset="0" value="td"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.td0"/> </mime-type> <mime-type type="application/x-spectrum-tap"> <comment>ZX Spectrum tape</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.tap"/> </mime-type> <mime-type type="application/x-spectrum-trd"> @@ -188,7 +188,7 @@ <magic> <match type="string" offset="0" value="SINCLAIR"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.trd"/> </mime-type> <mime-type type="application/x-spectrum-tzx"> @@ -196,7 +196,7 @@ <magic> <match type="string" offset="0" value="ZXTape!\x1a"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.tzx"/> </mime-type> <mime-type type="application/x-spectrum-udi"> @@ -204,12 +204,12 @@ <magic> <match type="string" offset="0" value="UDI!"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.udi"/> </mime-type> <mime-type type="application/x-spectrum-z80"> <comment>ZX Spectrum snapshot</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.z80"/> </mime-type> <mime-type type="application/x-spectrum-zxs"> @@ -217,7 +217,7 @@ <magic> <match type="string" offset="0" value="SNAP"/> </magic> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.zxs"/> </mime-type> ##LIBSPECTRUM_HAVE_AUDIOFILE_BEGIN## @@ -233,7 +233,7 @@ ##LIBSPECTRUM_HAVE_ZLIB_BEGIN## <mime-type type="application/x-spectrum-compressed"> <comment>ZX Spectrum compressed</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.csw.gz"/> <glob pattern="*.dck.gz"/> <glob pattern="*.mgtsnp.gz"/> @@ -261,7 +261,7 @@ ##LIBSPECTRUM_HAVE_BZ2_BEGIN## <mime-type type="application/x-spectrum-compressed-bz2"> <comment>ZX Spectrum compressed</comment> - <icon name="application-x-spectrum"/> + <generic-icon name="application-x-spectrum"/> <glob pattern="*.csw.bz2"/> <glob pattern="*.dck.bz2"/> <glob pattern="*.mgtsnp.bz2"/> |
From: <sba...@us...> - 2023-06-03 04:37:45
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/97175c357fbaefd0c17445c855b7b03746a9f9d9/ The following commit(s) were added to refs/heads/master by this push: new 97175c3 Move "for" loop initial declaration 97175c3 is described below commit 97175c357fbaefd0c17445c855b7b03746a9f9d9 Author: Sergio Baldoví <ser...@gm...> AuthorDate: Sat Jun 3 06:37:19 2023 +0200 Move "for" loop initial declaration Not allowed in C89 mode. Fix the build with old gcc versions. --- dsnap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dsnap.c b/dsnap.c index 512d71c..e7446bb 100644 --- a/dsnap.c +++ b/dsnap.c @@ -390,11 +390,14 @@ static void write_header( libspectrum_buffer *buffer, libspectrum_snap *snap, libspectrum_word sp ) { + short padding; + short b; + /* Header has 128B, but only last 24 bytes are used. Content before is irrelevant. Less by 10 chars - signature to flag snaphost created by fuse */ libspectrum_buffer_write( buffer, LIBSPECTRUM_DSNAP_SIGNATURE, strlen(LIBSPECTRUM_DSNAP_SIGNATURE) ); - short padding = LIBSPECTRUM_DSNAP_HEADER_LENGTH - 24 - strlen(LIBSPECTRUM_DSNAP_SIGNATURE) ; - for (short b=0; b < padding; b++) { + padding = LIBSPECTRUM_DSNAP_HEADER_LENGTH - 24 - strlen(LIBSPECTRUM_DSNAP_SIGNATURE); + for( b=0; b < padding; b++ ) { libspectrum_buffer_write_byte( buffer, 0 ); } |
From: <sba...@us...> - 2023-06-03 04:27:41
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse-utils. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse-utils/ci/39c6edf464d91eed810d98007db1dc35c3e1aedd/ The following commit(s) were added to refs/heads/master by this push: new 39c6edf audiofile.m4 file updated by autoupdate 39c6edf is described below commit 39c6edf464d91eed810d98007db1dc35c3e1aedd Author: Sergio Baldoví <ser...@gm...> AuthorDate: Sat Jun 3 06:21:23 2023 +0200 audiofile.m4 file updated by autoupdate --- m4/audiofile.m4 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/m4/audiofile.m4 b/m4/audiofile.m4 index 86176c5..aa4b732 100644 --- a/m4/audiofile.m4 +++ b/m4/audiofile.m4 @@ -49,7 +49,7 @@ AC_ARG_ENABLE(audiofiletest, [ --disable-audiofiletest Do not try to comp sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_audiofiletest" = "xyes" ; then AC_LANG_SAVE - AC_LANG_C + AC_LANG([C]) ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS" @@ -59,7 +59,7 @@ dnl Now check if the installed Audio File Library is sufficiently new. dnl (Also checks the sanity of the results of audiofile-config to some extent.) dnl rm -f conf.audiofiletest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -113,7 +113,7 @@ int main () } } -],, no_audiofile=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_audiofile=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" AC_LANG_RESTORE @@ -137,14 +137,13 @@ END else echo "*** Could not run Audio File Library test program; checking why..." AC_LANG_SAVE - AC_LANG_C + AC_LANG([C]) CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS" LIBS="$LIBS $AUDIOFILE_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <audiofile.h> -], [ return 0; ], - [ cat <<END +]], [[ return 0; ]])],[ cat <<END *** The test program compiled, but did not run. This usually means that *** the run-time linker is not finding Audio File Library or finding the *** wrong version of Audio File Library. @@ -158,8 +157,7 @@ END *** you may also be able to get things to work by modifying *** LD_LIBRARY_PATH. END - ], - [ echo "*** The test program failed to compile or link. See the file config.log" + ],[ echo "*** The test program failed to compile or link. See the file config.log" echo "*** for the exact error that occured. This usually means the Audio File" echo "*** Library was incorrectly installed or that you have moved the Audio" echo "*** File Library since it was installed. In the latter case, you may want" |
From: <sba...@us...> - 2023-06-03 04:27:04
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/a71be9fc787ac3b860e58c13bc6acef4ff765ce5/ The following commit(s) were added to refs/heads/master by this push: new a71be9f Remove obsolete AC_HEADER_STDC macro a71be9f is described below commit a71be9fc787ac3b860e58c13bc6acef4ff765ce5 Author: Sergio Baldoví <ser...@gm...> AuthorDate: Sat Jun 3 06:15:11 2023 +0200 Remove obsolete AC_HEADER_STDC macro audiofile.m4 file updated by autoupdate --- configure.ac | 1 - m4/audiofile.m4 | 16 +++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index b66f1ad..3671eac 100644 --- a/configure.ac +++ b/configure.ac @@ -85,7 +85,6 @@ AC_PATH_PROG(PERL, perl) AC_SUBST(PERL) dnl Checks for header files. -AC_HEADER_STDC AC_CHECK_HEADERS(stdint.h strings.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. diff --git a/m4/audiofile.m4 b/m4/audiofile.m4 index 86176c5..aa4b732 100644 --- a/m4/audiofile.m4 +++ b/m4/audiofile.m4 @@ -49,7 +49,7 @@ AC_ARG_ENABLE(audiofiletest, [ --disable-audiofiletest Do not try to comp sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_audiofiletest" = "xyes" ; then AC_LANG_SAVE - AC_LANG_C + AC_LANG([C]) ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS" @@ -59,7 +59,7 @@ dnl Now check if the installed Audio File Library is sufficiently new. dnl (Also checks the sanity of the results of audiofile-config to some extent.) dnl rm -f conf.audiofiletest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -113,7 +113,7 @@ int main () } } -],, no_audiofile=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_audiofile=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" AC_LANG_RESTORE @@ -137,14 +137,13 @@ END else echo "*** Could not run Audio File Library test program; checking why..." AC_LANG_SAVE - AC_LANG_C + AC_LANG([C]) CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS" LIBS="$LIBS $AUDIOFILE_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include <audiofile.h> -], [ return 0; ], - [ cat <<END +]], [[ return 0; ]])],[ cat <<END *** The test program compiled, but did not run. This usually means that *** the run-time linker is not finding Audio File Library or finding the *** wrong version of Audio File Library. @@ -158,8 +157,7 @@ END *** you may also be able to get things to work by modifying *** LD_LIBRARY_PATH. END - ], - [ echo "*** The test program failed to compile or link. See the file config.log" + ],[ echo "*** The test program failed to compile or link. See the file config.log" echo "*** for the exact error that occured. This usually means the Audio File" echo "*** Library was incorrectly installed or that you have moved the Audio" echo "*** File Library since it was installed. In the latter case, you may want" |
From: <sba...@us...> - 2023-06-03 04:26:01
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/1b3d1335403f24615af057bd6548b67625de1ad7/ The following commit(s) were added to refs/heads/master by this push: new 1b3d1335 Replace obsolete autoconf macros 1b3d1335 is described below commit 1b3d1335403f24615af057bd6548b67625de1ad7 Author: Sergio Baldoví <ser...@gm...> AuthorDate: Sat Jun 3 06:11:18 2023 +0200 Replace obsolete autoconf macros - Remove AC_CHECK_INCLUDES_DEFAULT macro. Improves compatibility with older autoconf versions. AC_INCLUDES_DEFAULT are implicitly checked by LT_INIT and AC_CHECK_HEADERS macros. - Remove unused AC_PROG_EGREP macro. - ax_string_strcasecmp.m4 file updated from upstream. - gtk-2.0.m4 file updated by autoupdate. - sdl.m4 file updated from upstream. --- configure.ac | 10 ---- m4/ax_string_strcasecmp.m4 | 12 ++-- m4/gtk-2.0.m4 | 12 ++-- m4/sdl.m4 | 137 +++++++++++++++++++++++---------------------- 4 files changed, 81 insertions(+), 90 deletions(-) diff --git a/configure.ac b/configure.ac index 8b24b015..84f53989 100644 --- a/configure.ac +++ b/configure.ac @@ -86,16 +86,6 @@ AC_SUBST(YFLAGS) dnl Check for big endianness AC_C_BIGENDIAN -dnl Checks for header files. -m4_warn([obsolete], -[The preprocessor macro `STDC_HEADERS' is obsolete. - Except in unusual embedded environments, you can safely include all - ISO C90 headers unconditionally.])dnl -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. -AC_CHECK_INCLUDES_DEFAULT -AC_PROG_EGREP - AC_CHECK_HEADERS( libgen.h \ siginfo.h \ diff --git a/m4/ax_string_strcasecmp.m4 b/m4/ax_string_strcasecmp.m4 index a5f2101f..bf463652 100644 --- a/m4/ax_string_strcasecmp.m4 +++ b/m4/ax_string_strcasecmp.m4 @@ -31,17 +31,17 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 8 +#serial 9 AU_ALIAS([ETR_STRING_STRCASECMP], [AX_STRING_STRCASECMP]) AC_DEFUN([AX_STRING_STRCASECMP], [ AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [ - AC_TRY_LINK( - [ #include <string.h> ], - [ strcasecmp("foo", "bar"); ], - ac_cv_string_strcasecmp=yes, - ac_cv_string_strcasecmp=no) + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include <string.h>]], + [[strcasecmp("foo", "bar");]])], + [ac_cv_string_strcasecmp=yes], + [ac_cv_string_strcasecmp=no]) ]) if test x"$ac_cv_string_strcasecmp" = "xyes" diff --git a/m4/gtk-2.0.m4 b/m4/gtk-2.0.m4 index cc3b71a5..9a9d6e37 100644 --- a/m4/gtk-2.0.m4 +++ b/m4/gtk-2.0.m4 @@ -76,7 +76,7 @@ dnl Now check if the installed GTK+ is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.gtktest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <gtk/gtk.h> #include <stdio.h> #include <stdlib.h> @@ -147,7 +147,7 @@ main () } return 1; } -],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_gtk=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -169,11 +169,10 @@ main () ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <gtk/gtk.h> #include <stdio.h> -], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK+ or finding the wrong" echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -181,8 +180,7 @@ main () echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" diff --git a/m4/sdl.m4 b/m4/sdl.m4 index ead3f15e..2c83863a 100644 --- a/m4/sdl.m4 +++ b/m4/sdl.m4 @@ -5,13 +5,13 @@ # stolen from Manish Singh # Shamelessly stolen from Owen Taylor -# Taken from SDL 1.2.7 by PAK 2004/07/07 +# Taken from SDL 1.2.15 by SBG 2023/04/23 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS dnl AC_DEFUN([AM_PATH_SDL], -[dnl +[dnl dnl Get the cflags and libraries from the sdl-config script dnl AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], @@ -21,82 +21,78 @@ AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program], , enable_sdltest=yes) - if test x$sdl_exec_prefix != x ; then - sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix" - if test x${SDL_CONFIG+set} != xset ; then + min_sdl_version=ifelse([$1], ,1.2.0,$1) + + if test "x$sdl_prefix$sdl_exec_prefix" = x ; then + PKG_CHECK_MODULES([SDL], [sdl >= $min_sdl_version], + [sdl_pc=yes], + [sdl_pc=no]) + else + sdl_pc=no + if test x$sdl_exec_prefix != x ; then + sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix" + if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config - fi - fi - if test x$sdl_prefix != x ; then - sdl_args="$sdl_args --prefix=$sdl_prefix" - if test x${SDL_CONFIG+set} != xset ; then + fi + fi + if test x$sdl_prefix != x ; then + sdl_config_args="$sdl_config_args --prefix=$sdl_prefix" + if test x${SDL_CONFIG+set} != xset ; then SDL_CONFIG=$sdl_prefix/bin/sdl-config - fi + fi + fi fi - AC_REQUIRE([AC_CANONICAL_HOST]) - PATH="$prefix/bin:$prefix/usr/bin:$PATH" - AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) - min_sdl_version=ifelse([$1], ,0.11.0,$1) - AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) - no_sdl="" - if test "$SDL_CONFIG" = "no" ; then - no_sdl=yes + if test "x$sdl_pc" = xyes ; then + no_sdl="" + SDL_CONFIG="pkg-config sdl" else - SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` - SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` + as_save_PATH="$PATH" + if test "x$prefix" != xNONE && test "$cross_compiling" != yes; then + PATH="$prefix/bin:$prefix/usr/bin:$PATH" + fi + AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) + PATH="$as_save_PATH" + AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) + no_sdl="" + + if test "$SDL_CONFIG" = "no" ; then + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags` + SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs` - sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_sdltest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" + sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_sdltest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_CXXFLAGS="$CXXFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" dnl dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl-config to some extent dnl rm -f conf.sdltest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> -#include <string.h> #include "SDL.h" -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - int main (int argc, char *argv[]) { int major, minor, micro; - char *tmp_version; + FILE *fp = fopen("conf.sdltest", "w"); - /* This hangs on some systems (?) - system ("touch conf.sdltest"); - */ - { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); } + if (fp) fclose(fp); - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_sdl_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + if (sscanf("$min_sdl_version", "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_sdl_version"); exit(1); } @@ -119,16 +115,21 @@ int main (int argc, char *argv[]) } } -],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi +]])], [], [no_sdl=yes], [echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_sdl" = x ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi fi if test "x$no_sdl" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) + ifelse([$2], , :, [$2]) else - AC_MSG_RESULT(no) if test "$SDL_CONFIG" = "no" ; then echo "*** The sdl-config script installed by SDL could not be found" echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in" @@ -140,8 +141,9 @@ int main (int argc, char *argv[]) else echo "*** Could not run SDL test program, checking why..." CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> #include "SDL.h" @@ -149,7 +151,7 @@ int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main -], [ return 0; ], +]], [[ return 0; ]])], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" @@ -164,6 +166,7 @@ int main(int argc, char *argv[]) echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" + CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" fi fi |
From: <sba...@us...> - 2023-05-18 05:05:52
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/93c6cd556f374f75fce3d97b196a2274d1b513da/ The following commit(s) were added to refs/heads/master by this push: new 93c6cd55 feat: Added build definition for SDL 1 UI + Sound on Windows new e3abbdff Merge request #23: Add GitHub workflow for SDL 1 UI + sound 93c6cd55 is described below commit 93c6cd556f374f75fce3d97b196a2274d1b513da Author: Miroslav Ďurčík <743...@us...> AuthorDate: Tue May 16 21:55:03 2023 +0200 feat: Added build definition for SDL 1 UI + Sound on Windows Modified GitHub build workflow files for Windows and so introduced configuration with SDL UI (widget) + SDL Sound Small fixes within the sub workflow file. https://sourceforge.net/p/arki55-fuse-mod/tickets/12/ --- .github/workflows/build_windows.yml | 13 +++++++++++++ .github/workflows/build_windows_sub.yml | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 7d9c00c4..3a03777b 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -65,3 +65,16 @@ jobs: verify_ui: "win32" verify_libxml2: "no" verify_audio: "null" + + # SDL 1 UI + Sound + sdl-ui-sdl-sound: + name: "Fuse SDL 1 UI + sound (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + dependencies: "mingw64-i686-SDL" + configure_params: "--without-win32 --with-sdl --disable-sdl2 --with-audio-driver=sdl" + verify_ui: "sdl" + verify_libxml2: "no" + verify_audio: "sdl" + verify_other: "Using SDL 2: no" diff --git a/.github/workflows/build_windows_sub.yml b/.github/workflows/build_windows_sub.yml index 7859aa5a..2b476082 100644 --- a/.github/workflows/build_windows_sub.yml +++ b/.github/workflows/build_windows_sub.yml @@ -41,6 +41,8 @@ jobs: CPPFLAGS: "-I/usr/local/i686-w64-mingw32/include" LDFLAGS: "-L/usr/local/i686-w64-mingw32/lib" PKG_CONFIG_LIBDIR: "/usr/local/i686-w64-mingw32/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" + # In case of SDL + SDL_CONFIG: "/usr/i686-w64-mingw32/sys-root/mingw/bin/sdl-config" steps: - name: (1) Prepare environment run: | @@ -139,8 +141,10 @@ jobs: shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' - if: ${{ inputs.verify_other }} run: | + cd ${GITHUB_WORKSPACE} + .github/scripts/in_config.sh "${{ inputs.verify_other }}" - shell: bash + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' - name: (9) Make run: | |
From: <sba...@us...> - 2023-05-18 04:55:41
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/69793e332bf8a1f4e1fe14a0e1e3afa1ee98bfa7/ The following commit(s) were added to refs/heads/master by this push: new 69793e33 fix: Update cross-compiling for WII new 8dade2e8 Merge request #22: Fix cross-compiling for WII 69793e33 is described below commit 69793e332bf8a1f4e1fe14a0e1e3afa1ee98bfa7 Author: Miroslav Ďurčík <743...@us...> AuthorDate: Wed May 3 22:48:09 2023 +0200 fix: Update cross-compiling for WII Multiple changes, fixes needed to make cross compiling for WII fork again: - Make sure GEKKO constant is set from configure. - Explicit defining of GEKKO constant removed from wiijoystick.c and wiimouse.c (as it is set from configure). - Function clock_gettime (wii only) has changed its signature, needing 2 parameters now. I made a best guess here and chose CLOCK_REALTIME as the first parameter. - In WII mode most of optional stuff is turned off. Sockets including. However some code was still requiring winsock2.h. Wrapped it into ifdef HAVE_SOCKETS. - compat_dir variable does not need WII specific type override. - Added missing key mappings based on build failure. Some keys cannot be mapped 1:1, so leaving them at the end. They will not be mapped. - Removing compatibility file dir.c for WII, as it has now standard POSIX dir related functions. - Updated github workflow file, fixed path to allow cross-compiling. Also added checks to make sure cross-compiling was active. - Installing missing packages bison, flex https://sourceforge.net/p/arki55-fuse-mod/tickets/11/ --- .github/workflows/build_wii.yml | 2 +- .github/workflows/build_wii_sub.yml | 30 ++++++++++++++++--- compat.h | 11 ++++--- compat/Makefile.am | 2 +- compat/wii/dir.c | 48 ------------------------------ compat/wii/timer.c | 6 ++-- fuse.c | 3 +- ui/wii/wiijoystick.c | 1 - ui/wii/wiikeysyms.h | 58 ++++++++++++++++++++++++++++++++----- ui/wii/wiimouse.c | 2 -- 10 files changed, 87 insertions(+), 76 deletions(-) diff --git a/.github/workflows/build_wii.yml b/.github/workflows/build_wii.yml index 378ff773..66d91384 100644 --- a/.github/workflows/build_wii.yml +++ b/.github/workflows/build_wii.yml @@ -47,4 +47,4 @@ jobs: dependencies: "" configure_params: "--with-wii" verify_ui: "wii" - verify_audio: "oss" + verify_audio: "wii" diff --git a/.github/workflows/build_wii_sub.yml b/.github/workflows/build_wii_sub.yml index 9ac83566..7993292c 100644 --- a/.github/workflows/build_wii_sub.yml +++ b/.github/workflows/build_wii_sub.yml @@ -49,6 +49,13 @@ jobs: echo "Available devkitPro packages:" dkp-pacman -Sl dkp-libs echo "" + + echo "WII specific libraries:" + find $DEVKITPRO -maxdepth 2 -type d + echo "" + + # Override path to allow cross-compiling (add to file) + echo "$DEVKITPPC/bin" >> $GITHUB_PATH - name: (2) Install dependencies if: @@ -58,6 +65,7 @@ jobs: sudo apt-get update sudo apt-get -y install --no-install-recommends \ wget tar autoconf automake libtool \ + bison flex \ ${{ inputs.dependencies }} && \ sudo rm -rf /var/lib/apt/lists/* echo "Done." @@ -86,6 +94,7 @@ jobs: run: ./autogen.sh - name: (7) Configure for WII + id: run-configure run: | ./configure \ --target=powerpc-eabi \ @@ -94,20 +103,33 @@ jobs: --without-gpm \ --without-libxml2 \ --without-x \ + CFLAGS="-g -I$DEVKITPPC/include -I$DEVKITPRO/libogc/include -DGEKKO" \ + LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float \ + -Wl,-Map,fuse.elf.map -L$DEVKITPPC/lib \ + -L$DEVKITPRO/libogc/lib/wii" \ + LIBS="-lfat -lwiiuse -lbte -logc -lm" \ ${{ inputs.configure_params }} \ |& tee ./configure.out + - name: Check config.log (on failure) + if: failure() && steps.run-configure.outcome != 'success' + run: | + echo "Reading config.log file .." + cat config.log + - name: (8) Verify output from configure # Most of the tested strings are common for all WII builds # Only the strings related to UI selection differ run: | + .github/scripts/in_config.sh "checking whether we are cross compiling... yes" + .github/scripts/in_config.sh "checking for powerpc-eabi-gcc... powerpc-eabi-gcc" .github/scripts/in_config.sh "Fuse options" .github/scripts/in_config.sh "zlib support: no" .github/scripts/in_config.sh "libxml2 support: no" .github/scripts/in_config.sh "libpng support: no" - .github/scripts/in_config.sh "Spectranet support: yes" - .github/scripts/in_config.sh "SpeccyBoot support: yes" - .github/scripts/in_config.sh "TTX2000 S support: yes" + .github/scripts/in_config.sh "Spectranet support: no" + .github/scripts/in_config.sh "SpeccyBoot support: no" + .github/scripts/in_config.sh "TTX2000 S support: no" .github/scripts/in_config.sh "Desktop integration: no" .github/scripts/in_config.sh "User interface: ${{ inputs.verify_ui }}" @@ -126,7 +148,7 @@ jobs: fi - name: (10) Install - run: sudo make install + run: make install - name: (11) Finish run: | diff --git a/compat.h b/compat.h index 931fea15..0d142805 100644 --- a/compat.h +++ b/compat.h @@ -130,12 +130,7 @@ int compat_is_absolute_path( const char *path ); int compat_get_next_path( path_context *ctx ); typedef FILE* compat_fd; - -#ifndef GEKKO typedef DIR* compat_dir; -#else /* #ifndef GEKKO */ -typedef DIR_ITER* compat_dir; -#endif /* #ifndef GEKKO */ extern const compat_fd COMPAT_FILE_OPEN_FAILED; @@ -184,7 +179,11 @@ int compat_get_tap( const char *interface_name ); #define COMPAT_ECONNREFUSED WSAECONNREFUSED typedef SOCKET compat_socket_t; typedef SOCKADDR compat_sockaddr; -#else /* #ifndef WIN32 */ +#elif GEKKO +/* no sockets under WII, just define the minimum + to feed the below compat_ declarations */ +typedef int compat_socket_t; +#else /* #ifndef WIN32 && GEKKO */ #include <sys/socket.h> #include <netdb.h> #include <errno.h> diff --git a/compat/Makefile.am b/compat/Makefile.am index 4647ef3b..c279317d 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -83,7 +83,7 @@ endif ## Wii routines if COMPAT_WII fuse_SOURCES += \ - compat/wii/dir.c \ + compat/unix/dir.c \ compat/unix/file.c \ compat/wii/osname.c \ compat/wii/paths.c \ diff --git a/compat/wii/dir.c b/compat/wii/dir.c deleted file mode 100644 index 709c5b29..00000000 --- a/compat/wii/dir.c +++ /dev/null @@ -1,48 +0,0 @@ -/* dir.c: Directory-related compatibility routines - Copyright (c) 2009 Philip Kendall - - This program 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 2 of the License, or - (at your option) any later version. - - This program 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 this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - Author contact information: - - E-mail: phi...@sh... - -*/ - -#include "config.h" - -#include "compat.h" - -compat_dir -compat_opendir( const char *path ) -{ - return diropen( path ); -} - -compat_dir_result_t -compat_readdir( compat_dir directory, char *path, size_t length ) -{ - struct stat fstat; - - int done = dirnext( directory, path, &fstat ); - - return done ? COMPAT_DIR_RESULT_END : COMPAT_DIR_RESULT_OK; -} - -int -compat_closedir( compat_dir directory ) -{ - return dirclose( directory ); -} diff --git a/compat/wii/timer.c b/compat/wii/timer.c index bef5018d..afaa60d1 100644 --- a/compat/wii/timer.c +++ b/compat/wii/timer.c @@ -26,20 +26,18 @@ #include <errno.h> #include <string.h> #include <unistd.h> +#include <time.h> #include "compat.h" #include "ui/ui.h" -/* FIXME: where should we get this prototype from? */ -extern int clock_gettime(struct timespec *tp); - double compat_timer_get_time( void ) { int error; struct timespec tp; - error = clock_gettime(&tp); + error = clock_gettime(CLOCK_REALTIME, &tp); if( error ) { ui_error( UI_ERROR_ERROR, "%s: error getting time: %s", __func__, strerror( errno ) ); return -1; diff --git a/fuse.c b/fuse.c index 8ecfb260..95f1f34d 100644 --- a/fuse.c +++ b/fuse.c @@ -46,7 +46,8 @@ #endif /* #if defined UI_SDL || (defined USE_JOYSTICK && !defined HAVE_JSW_H && (defined UI_X || defined UI_GTK) ) */ #ifdef GEKKO -#include <fat.h> +/* #include <fat.h> + that requires disc_io.h which does not exist for wii? */ #endif /* #ifdef GEKKO */ #ifdef HAVE_LIB_XML2 diff --git a/ui/wii/wiijoystick.c b/ui/wii/wiijoystick.c index 5e92eae5..aa17cb9a 100644 --- a/ui/wii/wiijoystick.c +++ b/ui/wii/wiijoystick.c @@ -27,7 +27,6 @@ #include "ui/ui.h" #include "ui/uijoystick.h" -#define GEKKO #include <wiiuse/wpad.h> typedef enum { diff --git a/ui/wii/wiikeysyms.h b/ui/wii/wiikeysyms.h index 7a7bfef2..9aa3aabf 100644 --- a/ui/wii/wiikeysyms.h +++ b/ui/wii/wiikeysyms.h @@ -54,7 +54,7 @@ enum { WII_KEY_X, WII_KEY_Y, WII_KEY_Z, - + WII_KEY_0 = 0x1E, WII_KEY_1, WII_KEY_2, WII_KEY_3, @@ -64,23 +64,23 @@ enum { WII_KEY_7, WII_KEY_8, WII_KEY_9, - WII_KEY_0, - - WII_KEY_RETURN, + WII_KEY_RETURN = 0x28, WII_KEY_ESCAPE, WII_KEY_BACKSPACE, WII_KEY_TAB, WII_KEY_SPACE, WII_KEY_MINUS, WII_KEY_EQUAL, - + WII_KEY_BRACKETLEFT, + WII_KEY_BRACKETRIGHT, + /* Unknown */ + /* Right Backslash */ WII_KEY_SEMICOLON = 0x33, WII_KEY_APOSTROPHE, - + WII_KEY_ASCIITILDE, WII_KEY_COMMA = 0x36, WII_KEY_PERIOD, WII_KEY_SLASH, - WII_KEY_CAPS_LOCK = 0x39, WII_KEY_F1, WII_KEY_F2, @@ -94,7 +94,9 @@ enum { WII_KEY_F10, WII_KEY_F11, WII_KEY_F12, - + /* Print screen (0x46) */ + /* Scroll lock */ + /* Pause/Break */ WII_KEY_INSERT = 0x49, WII_KEY_HOME, WII_KEY_PAGE_UP, @@ -105,6 +107,46 @@ enum { WII_KEY_LEFT, WII_KEY_DOWN, WII_KEY_UP, + /* Num lock (0x53) */ + /* Numpad / */ + WII_KEY_ASTERISK = 0x55, /* Numpad * */ + /* Numpad - */ + WII_KEY_PLUS = 0x57, /* Numpad + */ + /* Numpad Enter */ + /* Numpad 1 (0x59) */ + /* Numpad 2 */ + /* Numpad 3 */ + /* Numpad 4 */ + /* Numpad 5 */ + /* Numpad 6 */ + /* Numpad 7 */ + /* Numpad 8 */ + /* Numpad 9 */ + /* Numpad 0 */ + /* Numpad Period (0x63) */ + /* Left Backslash */ + /* Menu Key (0x65) */ + + /* impossible mapping */ + WII_KEY_AMPERSAND, + WII_KEY_ASCIICIRCUM, + WII_KEY_AT, + WII_KEY_BACKSLASH, + WII_KEY_BAR, + WII_KEY_BRACELEFT, + WII_KEY_BRACERIGHT, + WII_KEY_COLON, + WII_KEY_DEAD_CIRCUMFLEX, + WII_KEY_DOLLAR, + WII_KEY_EXCLAM, + WII_KEY_GREATER, + WII_KEY_LESS, + WII_KEY_PERCENT, + WII_KEY_PARENLEFT, + WII_KEY_PARENRIGHT, + WII_KEY_QUESTION, + WII_KEY_QUOTEDBL, + WII_KEY_UNDERSCORE, }; diff --git a/ui/wii/wiimouse.c b/ui/wii/wiimouse.c index c578879e..514a56ed 100644 --- a/ui/wii/wiimouse.c +++ b/ui/wii/wiimouse.c @@ -32,8 +32,6 @@ #include <unistd.h> #include <string.h> -#define GEKKO - #include <wiiuse/wpad.h> #include "fuse.h" |
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/d36545de5631823a86a4e9968698491ea2caf3f5/ The following commit(s) were added to refs/heads/master by this push: new d36545de Added support for loading .S snapshot files (D40's snapshots when extracted from floppy) https://sourceforge.net/u/arki55/tickets/1/ new dbd89b53 Merge request #12: support for loading .S snapshot files d36545de is described below commit d36545de5631823a86a4e9968698491ea2caf3f5 Author: Miroslav Durcik / Arki55 <mir...@gm...> AuthorDate: Wed Nov 9 20:20:48 2022 +0100 Added support for loading .S snapshot files (D40's snapshots when extracted from floppy) https://sourceforge.net/u/arki55/tickets/1/ --- configure.ac | 10 +++++++++- data/fuse.xml.in | 5 +++++ ui/gtk/fileselector.c | 6 ++++-- ui/win32/fileselector.c | 4 ++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 30645db3..8b24b015 100644 --- a/configure.ac +++ b/configure.ac @@ -87,7 +87,15 @@ dnl Check for big endianness AC_C_BIGENDIAN dnl Checks for header files. -AC_HEADER_STDC +m4_warn([obsolete], +[The preprocessor macro `STDC_HEADERS' is obsolete. + Except in unusual embedded environments, you can safely include all + ISO C90 headers unconditionally.])dnl +# Autoupdate added the next two lines to ensure that your configure +# script's behavior did not change. They are probably safe to remove. +AC_CHECK_INCLUDES_DEFAULT +AC_PROG_EGREP + AC_CHECK_HEADERS( libgen.h \ siginfo.h \ diff --git a/data/fuse.xml.in b/data/fuse.xml.in index 1d99f916..a5e215c6 100644 --- a/data/fuse.xml.in +++ b/data/fuse.xml.in @@ -135,6 +135,11 @@ <glob pattern="*.sna"/> <glob pattern="*.snapshot"/> </mime-type> + <mime-type type="application/x-spectrum-s"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.s"/> + </mime-type> <mime-type type="application/x-spectrum-snp"> <comment>ZX Spectrum snapshot</comment> <icon name="application-x-spectrum"/> diff --git a/ui/gtk/fileselector.c b/ui/gtk/fileselector.c index fc2b2896..1ade639e 100644 --- a/ui/gtk/fileselector.c +++ b/ui/gtk/fileselector.c @@ -319,7 +319,8 @@ add_filter_snapshot_files( GtkFileFilter *filter ) gtk_file_filter_add_pattern( filter, "*.sp" ); gtk_file_filter_add_pattern( filter, "*.szx" ); gtk_file_filter_add_pattern( filter, "*.z80" ); - gtk_file_filter_add_pattern( filter, "*.zx-state" ); + gtk_file_filter_add_pattern( filter, "*.zx-state" ); + gtk_file_filter_add_pattern( filter, "*.s" ); gtk_file_filter_add_pattern( filter, "*.MGTSNP" ); gtk_file_filter_add_pattern( filter, "*.SLT" ); @@ -329,7 +330,8 @@ add_filter_snapshot_files( GtkFileFilter *filter ) gtk_file_filter_add_pattern( filter, "*.SP" ); gtk_file_filter_add_pattern( filter, "*.SZX" ); gtk_file_filter_add_pattern( filter, "*.Z80" ); - gtk_file_filter_add_pattern( filter, "*.ZX-STATE" ); + gtk_file_filter_add_pattern( filter, "*.ZX-STATE" ); + gtk_file_filter_add_pattern( filter, "*.S" ); } static void diff --git a/ui/win32/fileselector.c b/ui/win32/fileselector.c index 995772d1..88692469 100644 --- a/ui/win32/fileselector.c +++ b/ui/win32/fileselector.c @@ -38,7 +38,7 @@ static char *current_folder; between UIs */ static LPCTSTR file_filter = TEXT( "Supported Files\0" -"*.mgtsnp;*.slt;*.sna;*.snapshot;*.snp;*.sp;*.szx;*.z80;*.zx-state;" +"*.mgtsnp;*.slt;*.sna;*.snapshot;*.snp;*.sp;*.szx;*.z80;*.zx-state;*.s;" "*.csw;*.ltp;*.pzx;*.raw;*.spc;*.sta;*.tzx;*.tap;*.wav;" "*.d40;*.d80;*.dsk;*.fdi;*.img;*.mgt;*.opd;*.opu;*.sad;*.scl;*.td0;*.trd;*.udi;" "*.dck;*.rom;*.hdf;*.mdr;*.fmf;*.rzx;" @@ -75,7 +75,7 @@ static LPCTSTR file_filter = TEXT( "Recording Files (*.rzx)\0" "*.rzx\0" "Snapshot Files (*.szx;*.z80;*.sna;...)\0" -"*.mgtsnp;*.slt;*.sna;*.snapshot;*.snp;*.sp;*.szx;*.z80;*.zx-state\0" +"*.mgtsnp;*.slt;*.sna;*.snapshot;*.snp;*.sp;*.szx;*.z80;*.zx-state;*.s\0" "Tape Files (*.tap;*.tzx;*.pzx;*.wav;*.csw;...)\0" "*.csw;*.ltp;*.pzx;*.raw;*.spc;*.sta;*.tzx;*.tap;*.wav\0" "\0" ); |
From: <sba...@us...> - 2023-05-04 04:55:48
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/4c639b3e6eeb910f0dbf09e225c7ecf50e58bdc4/ The following commit(s) were added to refs/heads/master by this push: new 4c639b3 feat: Added loading and saving of .S snapshot files as extracted from D40's/D80's floppy images 4c639b3 is described below commit 4c639b3e6eeb910f0dbf09e225c7ecf50e58bdc4 Author: Miroslav Ďurčík <743...@us...> AuthorDate: Tue Apr 25 21:10:37 2023 +0200 feat: Added loading and saving of .S snapshot files as extracted from D40's/D80's floppy images For more info see <https://sourceforge.net/p/arki55-fuse-mod/tickets/1/> --- Makefile.am | 1 + doc/libspectrum.txt | 3 +- dsnap.c | 497 ++++++++++++++++++++++++++++++++++++++++++++++++++++ internals.h | 6 + libspectrum.c | 2 + libspectrum.h.in | 3 + snapshot.c | 7 + 7 files changed, 518 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 9fb8e77..c57da85 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,6 +41,7 @@ libspectrum_la_SOURCES = bzip2.c \ rzx.c \ sna.c \ snp.c \ + dsnap.c \ snapshot.c \ snap_accessors.c \ sp.c \ diff --git a/doc/libspectrum.txt b/doc/libspectrum.txt index 714d95d..adbe594 100644 --- a/doc/libspectrum.txt +++ b/doc/libspectrum.txt @@ -312,6 +312,7 @@ LIBSPECTRUM_ID_SNAPSHOT_SP A .sp snapshot LIBSPECTRUM_ID_SNAPSHOT_SZX A .szx snapshot (as used by Spectaculator) LIBSPECTRUM_ID_SNAPSHOT_Z80 A .z80 snapshot LIBSPECTRUM_ID_SNAPSHOT_ZXS A .zxs snapshot (as used by zx32) +LIBSPECTRUM_ID_SNAPSHOT_DSNAP A .S snapshot (as used by D40/D80) LIBSPECTRUM_ID_TAPE_CSW A .csw tape image LIBSPECTRUM_ID_TAPE_TAP A `normal' (Z80-style) .tap tape image @@ -897,7 +898,7 @@ snapshot to specify the creator of the file. This can be NULL, in which case no information will be written. Currently, only the .szx format will make any use of this information. -The only formats for which serialisation is supported are .sna, .szx +The only formats for which serialisation is supported are .sna, .szx, .s and .z80. Tape functions diff --git a/dsnap.c b/dsnap.c new file mode 100644 index 0000000..512d71c --- /dev/null +++ b/dsnap.c @@ -0,0 +1,497 @@ +/* dsnap.c: [UTF-8 file] + Routines for handling Didaktik D40/D80 snapshot files (when extracted from floppy image). + D40's snapshot creates files on disk with name like SNAPSHOT00.S .. SNAPSHOT99.S . + Thou only 7 of them fit on a 40 track (D40) and 14 on an 80 track floppy (D80). + + Technical details of how the SNAP button works can be found in books: + - "Komentovany vypis MDOSu" by Kvaksoft from 1995. + - "Rutiny ROM D40" by Proxima from 1993 + + Limitations, specs of this format: + - Only supporting/saving 48KB spectrum/didaktik. + - On real HW registers are stored into D40's DRAM (last 128 bytes), not affecting standard RAM. + - Size of file is always #C080 (49280), starting address is #3F80 (16256). + - Does not save register "R". IFF1/IFF2 considered together. IM0 not supported. + - Data is stored into the head (before 16K) as stack. SP address first, followed by registers. + - Order of saving registers: comments below + - You can use the app RIDE v.1.4.3 to export and import files from and into .d40 floppy images. + Just make sure to have at least "R" attribute for newly imported file(s), or it will not work. + + Written by (c) 2022 Miroslav Ďurčík (mir...@gm...) + (with some code lines copied from other files in this lib) + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author (of FUSE in general) contact information: + + E-mail: phi...@sh... +*/ + +#include "config.h" + +#include <string.h> + +#include "internals.h" + +/* Parity flag in F reg. */ +#define FLAG_P 0x04 + +/* Length = 128 bytes + 48K */ +#define LIBSPECTRUM_DSNAP_HEADER_LENGTH 128 + +/* File header - to mark snapshot created by FUSE from real HW */ +const char * const LIBSPECTRUM_DSNAP_SIGNATURE = "DSNAP@FUSE"; + +static int identify_machine( size_t buffer_length, libspectrum_snap *snap ); +static int libspectrum_dsnap_read_header( const libspectrum_byte *buffer, + size_t buffer_length, + libspectrum_snap *snap ); +static int libspectrum_dsnap_read_data( const libspectrum_byte *buffer, + size_t buffer_length, + libspectrum_snap *snap ); + +static void +write_header( libspectrum_buffer *buffer, libspectrum_snap *snap, + libspectrum_word sp ); +static libspectrum_error +write_48k_dsnap( libspectrum_buffer *buffer, libspectrum_snap *snap, + libspectrum_word *new_sp ); +static void +write_page( libspectrum_buffer *buffer, libspectrum_snap *snap, int page ); + +libspectrum_error +internal_dsnap_read( libspectrum_snap *snap, + const libspectrum_byte *buffer, size_t buffer_length ) +{ + int error; + + error = identify_machine( buffer_length, snap ); + if( error != LIBSPECTRUM_ERROR_NONE ) return error; + + error = libspectrum_dsnap_read_header( buffer, buffer_length, snap ); + if( error != LIBSPECTRUM_ERROR_NONE ) return error; + + error = libspectrum_dsnap_read_data( + &buffer[LIBSPECTRUM_DSNAP_HEADER_LENGTH], + buffer_length - LIBSPECTRUM_DSNAP_HEADER_LENGTH, snap ); + if( error != LIBSPECTRUM_ERROR_NONE ) return error; + + return LIBSPECTRUM_ERROR_NONE; +} + +static int +identify_machine( size_t buffer_length, libspectrum_snap *snap ) +{ + switch( buffer_length ) { + case 49280: + libspectrum_snap_set_machine( snap, LIBSPECTRUM_MACHINE_48 ); + break; + default: + libspectrum_print_error( LIBSPECTRUM_ERROR_CORRUPT, + "libspectrum_dsnap_identify: Only 48K machines supported. Size must be 49280." ); + return LIBSPECTRUM_ERROR_CORRUPT; + } + + return LIBSPECTRUM_ERROR_NONE; +} + +/** + * Read header part (128B) of Didaktik's snapshot. + * Registers are stored like stack from 16K-2 downwards: + * SP, AF, BC, DE, HL, (EXX, EX AF,AF') AF, BC, DE, HL, IX, IY, IReg + */ +static int +libspectrum_dsnap_read_header( const libspectrum_byte *buffer, + size_t buffer_length, libspectrum_snap *snap ) +{ + if( buffer_length < LIBSPECTRUM_DSNAP_HEADER_LENGTH ) { + libspectrum_print_error( + LIBSPECTRUM_ERROR_CORRUPT, + "libspectrum_dsnap_read_header: not enough data in buffer" + ); + return LIBSPECTRUM_ERROR_CORRUPT; + } + + /* Program's SP is at end of header */ + libspectrum_word offset = LIBSPECTRUM_DSNAP_HEADER_LENGTH; + libspectrum_snap_set_sp ( snap, buffer[offset-2] + buffer[offset-2 +1]*0x100 ); + + /* Current registers first */ + libspectrum_snap_set_a ( snap, buffer[offset-4 +1] ); + libspectrum_snap_set_f ( snap, buffer[offset-4 +0] ); + libspectrum_snap_set_bc ( snap, buffer[offset-6] + buffer[offset-6 +1]*0x100 ); + libspectrum_snap_set_de ( snap, buffer[offset-8] + buffer[offset-8 +1]*0x100 ); + libspectrum_snap_set_hl ( snap, buffer[offset-10] + buffer[offset-10 +1]*0x100 ); + + /* Shadow registers next */ + libspectrum_snap_set_a_ ( snap, buffer[offset-12 +1] ); + libspectrum_snap_set_f_ ( snap, buffer[offset-12 +0] ); + libspectrum_snap_set_bc_( snap, buffer[offset-14] + buffer[offset-14 +1]*0x100 ); + libspectrum_snap_set_de_( snap, buffer[offset-16] + buffer[offset-16 +1]*0x100 ); + libspectrum_snap_set_hl_( snap, buffer[offset-18] + buffer[offset-18 +1]*0x100 ); + + /* IX, IY only once, have no shadow copies */ + libspectrum_snap_set_ix ( snap, buffer[offset-20] + buffer[offset-20 +1]*0x100 ); + libspectrum_snap_set_iy ( snap, buffer[offset-22] + buffer[offset-22 +1]*0x100 ); + + /* The last one is I register, interrupt vector + if to use IM1 or IM2 + DI/EI + Note: "AF" Word is read from -24 . F is checked for "PE" condition, + then A is copied to I and compared to 63 (operation changes F). + Source of PE flag was operation LD A,I before which copies IFF2 to Parity. */ + libspectrum_byte interrupt_flag1 = buffer[offset-24]; /* F */ + libspectrum_byte interrupt_flag2 = buffer[offset-24 +1]; /* A */ + + libspectrum_snap_set_i ( snap, interrupt_flag2 ); + + if (interrupt_flag2 == 63) { + /* Not IM 2 */ + libspectrum_snap_set_im( snap, 1 ); + } else { + /* It is IM 2 */ + libspectrum_snap_set_im( snap, 2 ); + } + + if ( interrupt_flag1 & FLAG_P ) { + /* Allow interrupts ( PE condition flag on F ) */ + libspectrum_snap_set_iff1( snap, 1); + libspectrum_snap_set_iff2( snap, 1); + } else { + /* I would assume default is 0, but debugging showed other wise */ + libspectrum_snap_set_iff1( snap, 0); + libspectrum_snap_set_iff2( snap, 0); + } + + /* Activate melodik. No idea how to make it optional. */ + libspectrum_snap_set_melodik_active( snap, 1 ); + + /* + PC is in loaded program's stack - will be set when data is loaded + libspectrum_snap_set_pc ( snap, 0 ); + + Not supported by this format: + libspectrum_snap_set_r ( snap, xxx ); + */ + + return LIBSPECTRUM_ERROR_NONE; +} + +/** + * Read data part of Didaktik's snapshot. Whole 48Kb. + */ +static int +libspectrum_dsnap_read_data( const libspectrum_byte *buffer, + size_t buffer_length, libspectrum_snap *snap ) +{ + int error; + libspectrum_word sp, offset; + + /* Standard 48K (0xC000) is to be read */ + if( buffer_length < 0xc000 ) { + libspectrum_print_error( + LIBSPECTRUM_ERROR_CORRUPT, + "libspectrum_dsnap_read_data: not enough data in buffer" + ); + return LIBSPECTRUM_ERROR_CORRUPT; + } + + switch( libspectrum_snap_machine( snap ) ) { + + case LIBSPECTRUM_MACHINE_48: + + sp = libspectrum_snap_sp( snap ); + if( sp < 0x4000 || sp == 0xffff ) { + libspectrum_print_error( + LIBSPECTRUM_ERROR_CORRUPT, + "libspectrum_dsnap_read_data: SP invalid (0x%04x)", sp + ); + return LIBSPECTRUM_ERROR_CORRUPT; + } + + /* Rescue PC from the stack */ + offset = sp - 0x4000; + libspectrum_snap_set_pc( snap, buffer[offset] + 0x100 * buffer[offset+1] ); + + /* Increase SP as PC has been unstacked */ + libspectrum_snap_set_sp( snap, libspectrum_snap_sp( snap ) + 2 ); + + /* And split the pages up */ + error = libspectrum_split_to_48k_pages( snap, buffer ); + if( error != LIBSPECTRUM_ERROR_NONE ) return error; + + break; + + default: + libspectrum_print_error( LIBSPECTRUM_ERROR_LOGIC, + "libspectrum_dsnap_read_data: only 48k machine supported" ); + return LIBSPECTRUM_ERROR_LOGIC; + } + + return LIBSPECTRUM_ERROR_NONE; +} + +/** + * Create snapshot compatible with Didaktik's snap button. + */ +libspectrum_error +libspectrum_dsnap_write( libspectrum_buffer *buffer, int *out_flags, + libspectrum_snap *snap, int in_flags GCC_UNUSED ) +{ + libspectrum_word snap_sp; + libspectrum_buffer *buffer_mem; + libspectrum_error error = LIBSPECTRUM_ERROR_NONE; + + /* Minor info loss already due to "R" register missing, etc.. */ + *out_flags = LIBSPECTRUM_FLAG_SNAPSHOT_MINOR_INFO_LOSS; + + /* We don't store +D info at all */ + if( libspectrum_snap_plusd_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't store Beta info at all */ + if( libspectrum_snap_beta_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't store Opus info at all */ + if( libspectrum_snap_opus_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save IDE interface info at all */ + if( libspectrum_snap_zxatasp_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + if( libspectrum_snap_zxcf_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + if( libspectrum_snap_simpleide_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + if( libspectrum_snap_divide_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the Interface 2 ROM at all */ + if( libspectrum_snap_interface2_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the Timex Dock at all */ + if( libspectrum_snap_dock_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save custom ROMs at all */ + if( libspectrum_snap_custom_rom( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save AY interfaces at all */ + if( libspectrum_snap_fuller_box_active( snap ) || + libspectrum_snap_melodik_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the Specdrum state at all */ + if( libspectrum_snap_specdrum_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the Spectranet state at all */ + if( libspectrum_snap_spectranet_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the uSource state at all */ + if( libspectrum_snap_usource_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the DISCiPLE state at all */ + if( libspectrum_snap_disciple_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save complete Didaktik80 state (2KB). D40's snapshot contains + last 128 bytes of FDD's DRAM, only for sake of saving registers. */ + if( libspectrum_snap_didaktik80_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the Covox state at all */ + if( libspectrum_snap_covox_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the Multiface state at all */ + if( libspectrum_snap_multiface_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the MMC state at all */ + if( libspectrum_snap_divmmc_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + if( libspectrum_snap_zxmmc_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + /* We don't save the TTX2000S state at all */ + if( libspectrum_snap_ttx2000s_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + + buffer_mem = libspectrum_buffer_alloc(); + + switch( libspectrum_snap_machine( snap ) ) { + case LIBSPECTRUM_MACHINE_48_NTSC: + case LIBSPECTRUM_MACHINE_48: + /* Only 48K machine supported */ + error = write_48k_dsnap( buffer_mem, snap, &snap_sp ); + break; + + case LIBSPECTRUM_MACHINE_16: + case LIBSPECTRUM_MACHINE_TC2048: + case LIBSPECTRUM_MACHINE_TC2068: + case LIBSPECTRUM_MACHINE_TS2068: + case LIBSPECTRUM_MACHINE_128: + case LIBSPECTRUM_MACHINE_128E: + case LIBSPECTRUM_MACHINE_PENT: + case LIBSPECTRUM_MACHINE_PENT512: + case LIBSPECTRUM_MACHINE_PENT1024: + case LIBSPECTRUM_MACHINE_PLUS2: + case LIBSPECTRUM_MACHINE_PLUS2A: + case LIBSPECTRUM_MACHINE_PLUS3: + case LIBSPECTRUM_MACHINE_PLUS3E: + case LIBSPECTRUM_MACHINE_SCORP: + case LIBSPECTRUM_MACHINE_SE: + libspectrum_print_error( LIBSPECTRUM_ERROR_LOGIC, + "Only 48k machine supported by Didaktik SNAP format!" ); + libspectrum_buffer_free( buffer_mem ); + return LIBSPECTRUM_ERROR_LOGIC; + + default: + libspectrum_print_error( LIBSPECTRUM_ERROR_LOGIC, + "Emulated machine type is set to 'unknown'!" ); + libspectrum_buffer_free( buffer_mem ); + return LIBSPECTRUM_ERROR_LOGIC; + } + + if( error ) { + libspectrum_buffer_free( buffer_mem ); + return error; + } + + write_header( buffer, snap, snap_sp ); + libspectrum_buffer_write_buffer( buffer, buffer_mem ); + libspectrum_buffer_free( buffer_mem ); + + return LIBSPECTRUM_ERROR_NONE; +} + +/** + * Write header part of Didaktik's snapshot (128B). + * Registers are stored like stack from 16K-2 downwards: + * SP, AF, BC, DE, HL, (swap regs) AF, BC, DE, HL, IX, IY, I+EI/DI + */ +static void +write_header( libspectrum_buffer *buffer, libspectrum_snap *snap, + libspectrum_word sp ) +{ + /* Header has 128B, but only last 24 bytes are used. Content before is irrelevant. + Less by 10 chars - signature to flag snaphost created by fuse */ + libspectrum_buffer_write( buffer, LIBSPECTRUM_DSNAP_SIGNATURE, strlen(LIBSPECTRUM_DSNAP_SIGNATURE) ); + short padding = LIBSPECTRUM_DSNAP_HEADER_LENGTH - 24 - strlen(LIBSPECTRUM_DSNAP_SIGNATURE) ; + for (short b=0; b < padding; b++) { + libspectrum_buffer_write_byte( buffer, 0 ); + } + + /* The last one (when pushing into stack from the end of header) is I register, + interrupt vector + if to use IM1 or IM2 + DI/EI + + If interrupts allowed (EI), then write 4 ("PE" bit on F reg.), else just 0. + Source of PE is operation LD A,I which sets IFF2 to Parity flag. */ + if ( libspectrum_snap_iff2 ( snap ) == 1 ) { + libspectrum_buffer_write_byte( buffer, FLAG_P ); + } else { + libspectrum_buffer_write_byte( buffer, 0 ); + } + + /* If mode 2: I reg. is written, else "63" + mode 1 assumed */ + if ( libspectrum_snap_im( snap ) == 0x02 ) { + libspectrum_buffer_write_byte( buffer, libspectrum_snap_i ( snap ) ); + } else { + libspectrum_buffer_write_byte( buffer, 63 ); + } + + + /* IX, IY only once, have no shadow copies */ + libspectrum_buffer_write_word( buffer, libspectrum_snap_iy ( snap ) ); + libspectrum_buffer_write_word( buffer, libspectrum_snap_ix ( snap ) ); + + /* Shadow registers next */ + libspectrum_buffer_write_word( buffer, libspectrum_snap_hl_ ( snap ) ); + libspectrum_buffer_write_word( buffer, libspectrum_snap_de_ ( snap ) ); + libspectrum_buffer_write_word( buffer, libspectrum_snap_bc_ ( snap ) ); + libspectrum_buffer_write_byte( buffer, libspectrum_snap_f_ ( snap ) ); + libspectrum_buffer_write_byte( buffer, libspectrum_snap_a_ ( snap ) ); + + /* Current registers */ + libspectrum_buffer_write_word( buffer, libspectrum_snap_hl ( snap ) ); + libspectrum_buffer_write_word( buffer, libspectrum_snap_de ( snap ) ); + libspectrum_buffer_write_word( buffer, libspectrum_snap_bc ( snap ) ); + libspectrum_buffer_write_byte( buffer, libspectrum_snap_f ( snap ) ); + libspectrum_buffer_write_byte( buffer, libspectrum_snap_a ( snap ) ); + + /* Program's SP is at end of header */ + libspectrum_buffer_write_word( buffer, sp ); + + /* + PC is stored into snapp'ed app's stack in function write_48k_dsnap() + libspectrum_snap_pc ( snap ); + + Not supported by this format: + libspectrum_buffer_write_byte( buffer, libspectrum_snap_r ( snap ) ); + */ +} + +static libspectrum_error +write_48k_dsnap( libspectrum_buffer *buffer, libspectrum_snap *snap, + libspectrum_word *new_sp ) +{ + libspectrum_byte *stack, *memory_base; + size_t offset; + libspectrum_word new_stack_address; + + /* Must have somewhere in RAM to store PC */ + if( libspectrum_snap_sp( snap ) < 0x4002 ) { + libspectrum_print_error( LIBSPECTRUM_ERROR_INVALID, + "SP is too low (0x%04x) to stack PC", + libspectrum_snap_sp( snap ) ); + return LIBSPECTRUM_ERROR_INVALID; + } + + offset = libspectrum_buffer_get_data_size( buffer ); + + write_page( buffer, snap, 5 ); + write_page( buffer, snap, 2 ); + write_page( buffer, snap, 0 ); + + memory_base = libspectrum_buffer_get_data( buffer ) + offset; + + /* Place PC on the stack */ + new_stack_address = libspectrum_snap_sp( snap ) - 2; + stack = &( memory_base[ new_stack_address - 0x4000 ] ); + libspectrum_write_word( &stack, libspectrum_snap_pc( snap ) ); + + /* Store the new value of SP */ + *new_sp = new_stack_address; + + return LIBSPECTRUM_ERROR_NONE; +} + + +static void +write_page( libspectrum_buffer *buffer, libspectrum_snap *snap, int page ) +{ + libspectrum_byte *ram; + + ram = libspectrum_snap_pages( snap, page ); + if( ram ) { + libspectrum_buffer_write( buffer, ram, 0x4000 ); + } else { + libspectrum_buffer_set( buffer, 0xff, 0x4000 ); + } +} diff --git a/internals.h b/internals.h index 67b3ea8..02957d4 100644 --- a/internals.h +++ b/internals.h @@ -182,6 +182,12 @@ libspectrum_error libspectrum_sna_write( libspectrum_buffer *buffer, int *out_flags, libspectrum_snap *snap, int in_flags ); libspectrum_error +internal_dsnap_read( libspectrum_snap *snap, + const libspectrum_byte *buffer, size_t buffer_length ); +libspectrum_error +libspectrum_dsnap_write( libspectrum_buffer *buffer, int *out_flags, + libspectrum_snap *snap, int in_flags ); +libspectrum_error libspectrum_snp_read( libspectrum_snap *snap, const libspectrum_byte *buffer, size_t buffer_length ); libspectrum_error diff --git a/libspectrum.c b/libspectrum.c index 55ba4aa..c8d9323 100644 --- a/libspectrum.c +++ b/libspectrum.c @@ -513,6 +513,7 @@ libspectrum_identify_file_raw( libspectrum_id_t *type, const char *filename, /* Peter McGavin's Spectrum Emulator on the Amiga used .snapshot for sna snaps */ { LIBSPECTRUM_ID_SNAPSHOT_SNA, "snapshot", 3, NULL, 0, 0, 0 }, + { LIBSPECTRUM_ID_SNAPSHOT_DSNAP, "s", 3, NULL, 0, 0, 0 }, { LIBSPECTRUM_ID_SNAPSHOT_SNP, "snp", 3, NULL, 0, 0, 0 }, { LIBSPECTRUM_ID_SNAPSHOT_SP, "sp", 3, "\x53\x50\0", 0, 3, 1 }, { LIBSPECTRUM_ID_SNAPSHOT_SZX, "szx", 3, "ZXST", 0, 4, 4 }, @@ -720,6 +721,7 @@ libspectrum_identify_class( libspectrum_class_t *libspectrum_class, case LIBSPECTRUM_ID_SNAPSHOT_SZX: case LIBSPECTRUM_ID_SNAPSHOT_Z80: case LIBSPECTRUM_ID_SNAPSHOT_ZXS: + case LIBSPECTRUM_ID_SNAPSHOT_DSNAP: *libspectrum_class = LIBSPECTRUM_CLASS_SNAPSHOT; return 0; case LIBSPECTRUM_ID_TAPE_TAP: diff --git a/libspectrum.h.in b/libspectrum.h.in index 8c11f44..812d4de 100644 --- a/libspectrum.h.in +++ b/libspectrum.h.in @@ -259,6 +259,9 @@ typedef enum libspectrum_id_t { LIBSPECTRUM_ID_SCREEN_MLT, /* .mlt screen file */ + /* Below here, present only in FUTURE version */ + LIBSPECTRUM_ID_SNAPSHOT_DSNAP, /* .S snapshot (D40/D80) */ + } libspectrum_id_t; /* And 'classes' of file */ diff --git a/snapshot.c b/snapshot.c index e6f47d8..b00ae8e 100644 --- a/snapshot.c +++ b/snapshot.c @@ -94,6 +94,9 @@ libspectrum_snap_read( libspectrum_snap *snap, const libspectrum_byte *buffer, case LIBSPECTRUM_ID_SNAPSHOT_PLUSD: error = libspectrum_plusd_read( snap, buffer, length ); break; + case LIBSPECTRUM_ID_SNAPSHOT_DSNAP: + error = internal_dsnap_read( snap, buffer, length ); break; + case LIBSPECTRUM_ID_SNAPSHOT_SNA: error = internal_sna_read( snap, buffer, length ); break; @@ -163,6 +166,10 @@ libspectrum_snap_write_buffer( libspectrum_buffer *buffer, int *out_flags, error = libspectrum_sna_write( buffer, out_flags, snap, in_flags ); break; + case LIBSPECTRUM_ID_SNAPSHOT_DSNAP: + error = libspectrum_dsnap_write( buffer, out_flags, snap, in_flags ); + break; + case LIBSPECTRUM_ID_SNAPSHOT_SZX: error = libspectrum_szx_write( buffer, out_flags, snap, creator, in_flags ); break; |
From: <sba...@us...> - 2023-04-14 16:54:21
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/53f26587c07d05c6091512ca98eae124ca8caf2e/ The following commit(s) were added to refs/heads/master by this push: new 53f26587 Fixed handling of multiple monitors on win32 UI 53f26587 is described below commit 53f26587c07d05c6091512ca98eae124ca8caf2e Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Thu Apr 13 21:14:24 2023 +0200 Fixed handling of multiple monitors on win32 UI (fixes bug #491) --- ui/win32/win32ui.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/ui/win32/win32ui.c b/ui/win32/win32ui.c index 55d8f272..c0141a70 100755 --- a/ui/win32/win32ui.c +++ b/ui/win32/win32ui.c @@ -1076,7 +1076,7 @@ win32ui_window_resize( HWND hWnd, WPARAM wParam, LPARAM lParam ) static BOOL win32ui_window_resizing( HWND hWnd, WPARAM wParam, LPARAM lParam ) { - RECT *selr, wr, cr, statr, or; + RECT *selr, wr, cr, statr; int width, height, w_ofs, h_ofs, w_max, h_max; selr = (RECT *)lParam; @@ -1088,11 +1088,17 @@ win32ui_window_resizing( HWND hWnd, WPARAM wParam, LPARAM lParam ) h_ofs = ( wr.bottom - wr.top ) - ( cr.bottom - cr.top ); if( settings_current.statusbar ) h_ofs += ( statr.bottom - statr.top ); + /* Determine current screen from window */ + MONITORINFO mi; + mi.cbSize = sizeof (MONITORINFO); + if (!GetMonitorInfoA(MonitorFromWindow(fuse_hWnd, MONITOR_DEFAULTTONEAREST), &mi)) { + return FALSE; + } + /* max scaler size in desktop workarea */ - SystemParametersInfo( SPI_GETWORKAREA, 0, &or, 0 ); - w_max = ( or.right - or.left ) - w_ofs + DISPLAY_ASPECT_WIDTH / 2; + w_max = ( mi.rcWork.right - mi.rcWork.left ) - w_ofs + DISPLAY_ASPECT_WIDTH / 2; w_max /= DISPLAY_ASPECT_WIDTH; - h_max = ( or.bottom - or.top ) - h_ofs + DISPLAY_SCREEN_HEIGHT / 2; + h_max = ( mi.rcWork.bottom - mi.rcWork.top ) - h_ofs + DISPLAY_SCREEN_HEIGHT / 2; h_max /= DISPLAY_SCREEN_HEIGHT; if( w_max < h_max ) { @@ -1159,7 +1165,7 @@ win32ui_window_resizing( HWND hWnd, WPARAM wParam, LPARAM lParam ) void win32ui_fuse_resize( int width, int height ) { - RECT wr, cr, statr, or; + RECT wr, cr, statr; int w_ofs, h_ofs; /* Calculate decorations before resizing */ @@ -1171,12 +1177,18 @@ win32ui_fuse_resize( int width, int height ) h_ofs = ( wr.bottom - wr.top ) - ( cr.bottom - cr.top ); if( settings_current.statusbar ) h_ofs += ( statr.bottom - statr.top ); + /* Determine current screen from window */ + MONITORINFO mi; + mi.cbSize = sizeof (MONITORINFO); + if (!GetMonitorInfoA(MonitorFromWindow(fuse_hWnd, MONITOR_DEFAULTTONEAREST), &mi)) { + return; + } + /* Set position inside workarea */ - SystemParametersInfo( SPI_GETWORKAREA, 0, &or, 0 ); - if( wr.left + width + w_ofs > or.right ) wr.left = or.right - width - w_ofs; - if( wr.top + height + h_ofs > or.bottom ) wr.top = or.bottom - height - h_ofs; - if( wr.left < or.left ) wr.left = or.left; - if( wr.top < or.top ) wr.top = or.top; + if( wr.left + width + w_ofs > mi.rcWork.right ) wr.left = mi.rcWork.right - width - w_ofs; + if( wr.top + height + h_ofs > mi.rcWork.bottom ) wr.top = mi.rcWork.bottom - height - h_ofs; + if( wr.left < mi.rcWork.left ) wr.left = mi.rcWork.left; + if( wr.top < mi.rcWork.top ) wr.top = mi.rcWork.top; MoveWindow( fuse_hWnd, wr.left, wr.top, width + w_ofs, |
From: <sba...@us...> - 2023-04-09 05:31:40
|
This is an automated email from the git hooks/post-receive-user script. sbaldovi pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/dad3ee2f00429758e34ec1ac2f273e15ab46c529/ The following commit(s) were added to refs/heads/master by this push: new dad3ee2f Suppress maximizing on win32 UI dad3ee2f is described below commit dad3ee2f00429758e34ec1ac2f273e15ab46c529 Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Tue Apr 4 22:27:33 2023 +0200 Suppress maximizing on win32 UI Suppressing doubleclick message on title bar to not do window maximizing (fixes bug #488). --- ui/win32/win32ui.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/win32/win32ui.c b/ui/win32/win32ui.c index 5f1d9ef5..55d8f272 100755 --- a/ui/win32/win32ui.c +++ b/ui/win32/win32ui.c @@ -182,6 +182,10 @@ fuse_window_proc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) if( paused ) menu_machine_pause( 0 ); return 0; + case WM_NCLBUTTONDBLCLK: + /* Don't allow double click on title bar, suppressing window maximizing */ + return 0; + case WM_ENTERMENULOOP: case WM_ENTERSIZEMOVE: { |
From: <al...@us...> - 2023-03-19 19:03:47
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/c5e6e6194e153cd21366a9908c8ad14cd583d4bf/ The following commit(s) were added to refs/heads/master by this push: new c5e6e619 Arki55 T6 - Describing file format in options.dat new 844574de Merge /u/arki55/fuse/ branch arki55/features/T6-options-dat-description into master c5e6e619 is described below commit c5e6e6194e153cd21366a9908c8ad14cd583d4bf Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Dec 18 00:14:09 2022 +0100 Arki55 T6 - Describing file format in options.dat --- ui/options.dat | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/ui/options.dat b/ui/options.dat index 2916ef01..450e505d 100644 --- a/ui/options.dat +++ b/ui/options.dat @@ -1,3 +1,52 @@ +# options.dat: Data file for options dialog boxes +# Copyright (c) 2001-2013 Philip Kendall, Marek Januszewski, Stuart Brady +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Author contact information: +# +# E-mail: phi...@sh... +# +# File is preprocessed by cpp-perl.pl to apply some .h like conditions (see Makefile.am), +# and then parsed by script Dialog.pm (Perl package Fuse::Dialog). +# +# Format of this file is as follows: +# - Description of this file, comments. Section will be ignored. +# - Blocks of option dialog boxes' data. +# +# Structure of each block: +# - 1x line - keyword for dialog box +# - 1x line - English description for dialog box +# - 1-N lines with options - one line per 1 option +# - 1-2 lines with callbacks +# - Empty line (end of one block) +# +# Structure of option line: +# Type, English translation, setting ID, shortcut key ID [ , Data 1 ] [ , Data 2 ] +# Wrapping some letter in description into () will underline it as hint for key shortcut. +# Setting ID must be defined in file settings.dat (there it defines also type and default value). +# +# Possible types: +# - Entry (input text) - uses data 1: max. length, data 2: label text (only in GTK). +# - Checkbox +# - Combo - uses data 1: Dropdown values separated with "|" . "*" specifies default value. +# +# Callbacks: +# - Postcheck, callback function - Called function should return if to reset machine (see needs_hard_reset). +# - Posthook, callback function - Will be called after settings are saved. +# general General Options Entry, (E)mulation speed, emulation_speed, INPUT_KEY_e, 5, % |
From: <al...@us...> - 2023-03-19 18:47:30
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/3183073ad33323ee0e449fae049ed8c278300448/ commit 3183073ad33323ee0e449fae049ed8c278300448 Author: Miroslav Ďurčík <743...@us...> AuthorDate: Wed Mar 8 22:15:53 2023 +0100 Arki55/features/t9 GitHub build checks fuse ==> arki55/github-workflows (#3) build: Squash merge |
From: <al...@us...> - 2023-03-19 18:47:30
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/f25b134dbba78b74e9e0f1359f03544f1e7c0b88/ commit f25b134dbba78b74e9e0f1359f03544f1e7c0b88 Merge: 2effbd6d 3183073a Author: b'Sergio Baldov\xc3\xad <allura@localhost> AuthorDate: Sun Mar 19 18:47:25 2023 +0000 Merge /u/arki55/fuse/ branch arki55/github-workflows into master https://sourceforge.net/p/fuse-emulator/fuse/merge-requests/16/ .github/scripts/in_config.sh | 8 ++ .github/workflows/build_linux.yml | 117 +++++++++++++++++++++++ .github/workflows/build_linux_sub.yml | 96 +++++++++++++++++++ .github/workflows/build_macos.yml | 107 +++++++++++++++++++++ .github/workflows/build_macos_sub.yml | 118 +++++++++++++++++++++++ .github/workflows/build_wii.yml | 50 ++++++++++ .github/workflows/build_wii_sub.yml | 133 ++++++++++++++++++++++++++ .github/workflows/build_windows.yml | 67 +++++++++++++ .github/workflows/build_windows_sub.yml | 163 ++++++++++++++++++++++++++++++++ 9 files changed, 859 insertions(+) |
From: <al...@us...> - 2023-03-19 18:47:30
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/089c82ce8e2f2dfc54898e9e4ef80c803a9b32eb/ commit 089c82ce8e2f2dfc54898e9e4ef80c803a9b32eb Author: Miroslav Ďurčík <743...@us...> AuthorDate: Sun Mar 5 19:45:34 2023 +0100 Arki55/features/t9 GitHub build checks fuse App ==> arki55/github-workflows https://sourceforge.net/p/arki55-fuse-mod/tickets/9/ feature: GitHub workflow build scripts for FUSE App - for linux, WII, WIN32 and MacOS --- .github/workflows/build_linux.yml | 21 +-- .../{_build_linux_sub.yml => build_linux_sub.yml} | 8 +- .../workflows/{build_linux.yml => build_macos.yml} | 73 ++++----- .../{_build_linux_sub.yml => build_macos_sub.yml} | 68 ++++++--- .github/workflows/build_wii.yml | 50 +++++++ .github/workflows/build_wii_sub.yml | 133 +++++++++++++++++ .github/workflows/build_windows.yml | 67 +++++++++ .github/workflows/build_windows_sub.yml | 163 +++++++++++++++++++++ 8 files changed, 503 insertions(+), 80 deletions(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 3a177eb1..4cd04b26 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -6,18 +6,19 @@ on: [push, pull_request] jobs: libspectrum: - # Reuse libspectrum's build wokflow and artefact + # Reuse libspectrum's build wokflow and artefact (all libs enabled, real glib) name: "Libspectrum lib (Linux)" - uses: arki55/fuse-libspectrum/.github/workflows/build_linux.yml@arki55/github-workflows + uses: arki55/fuse-libspectrum/.github/workflows/build_linux_sub.yml@arki55/github-workflows with: branch: arki55/github-workflows + key: fuse-app # repo name is taken from var.LIBSPECTRUM_REPO # Default build without any configure params (xlib) default-ui: name: "Fuse Default UI (Linux)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: Default dependencies: "libaudiofile-dev" @@ -32,7 +33,7 @@ jobs: null-ui: name: "Fuse NULL UI (Linux)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: "NULL UI" dependencies: "libaudiofile-dev" @@ -43,7 +44,7 @@ jobs: gtk3-ui: name: "Fuse GTK 3 UI (Linux)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: GTK3 UI dependencies: "libaudiofile-dev gtk3.0 libgtk-3-dev" @@ -55,7 +56,7 @@ jobs: sdl1-ui: name: "Fuse SDL 1 UI + sound (Linux)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: SDL1 UI dependencies: "libaudiofile-dev libsdl1.2-dev" @@ -68,7 +69,7 @@ jobs: sdl2-ui: name: "Fuse SDL 2 UI + sound (Linux) (not supported yet)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: SDL2 UI (not supported yet) dependencies: "libaudiofile-dev libsdl2-dev libsdl1.2-dev" @@ -85,7 +86,7 @@ jobs: fb-ui: name: "Fuse FB UI (Linux) (deprecated)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: "FB UI (deprecated)" dependencies: "libaudiofile-dev libgpm-dev" @@ -96,7 +97,7 @@ jobs: xlib-ui: name: "Fuse X-lib UI (Linux) (deprecated)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: X-lib UI (deprecated) dependencies: "libaudiofile-dev" @@ -107,7 +108,7 @@ jobs: gtk2-ui: name: "Fuse GTK 2 UI (Linux) (deprecated)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_linux_sub.yml with: name: GTK2 UI (deprecated) dependencies: "libaudiofile-dev gtk2.0 libgtk2.0-dev" diff --git a/.github/workflows/_build_linux_sub.yml b/.github/workflows/build_linux_sub.yml similarity index 93% copy from .github/workflows/_build_linux_sub.yml copy to .github/workflows/build_linux_sub.yml index d2b1f805..f6cdd446 100644 --- a/.github/workflows/_build_linux_sub.yml +++ b/.github/workflows/build_linux_sub.yml @@ -49,15 +49,13 @@ jobs: - name: (3) Download libspectrum artefact uses: actions/download-artifact@v3 with: - name: libspectrum-compiled-linux + name: libspectrum-installed-linux-fuse-app path: libspectrum - name: (4) Install libspectrum from artefact run: | - cd libspectrum - tar -xvf libspectrum-compiled-linux.tar - sudo make install-strip - cd .. + # Extract (-x) files into /usr/local + sudo tar --directory / -xvf libspectrum/libspectrum-installed-linux.tar echo "Done" - name: (5) Autogen.sh diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_macos.yml similarity index 50% copy from .github/workflows/build_linux.yml copy to .github/workflows/build_macos.yml index 3a177eb1..787071e9 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_macos.yml @@ -1,64 +1,66 @@ -name: Fuse App For Linux -run-name: Build Fuse App for Linux / ${{ github.actor }} / +name: Fuse App For MacOS +run-name: Build Fuse App for MacOS / ${{ github.actor }} / # Executed upon each commit pushed, merge commit in PR on: [push, pull_request] jobs: libspectrum: - # Reuse libspectrum's build wokflow and artefact - name: "Libspectrum lib (Linux)" - uses: arki55/fuse-libspectrum/.github/workflows/build_linux.yml@arki55/github-workflows + # Reuse libspectrum's build wokflow and artefact (all libs enabled, real glib) + name: "Libspectrum lib (MacOS)" + uses: arki55/fuse-libspectrum/.github/workflows/build_macos_sub.yml@arki55/github-workflows with: branch: arki55/github-workflows + key: fuse-app # repo name is taken from var.LIBSPECTRUM_REPO # Default build without any configure params (xlib) default-ui: - name: "Fuse Default UI (Linux)" + name: "Fuse Default UI (MacOS)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: Default - dependencies: "libaudiofile-dev" + dependencies: "" configure_params: "" verify_ui: "xlib" ######################################### -### SUPPORTED Linux UI configurations ### +### SUPPORTED MacOS UI configurations ### ######################################### - # NULL UI + # NULL UI + sound null-ui: - name: "Fuse NULL UI (Linux)" + name: "Fuse NULL UI + sound (MacOS)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: "NULL UI" - dependencies: "libaudiofile-dev" - configure_params: "--with-null-ui" + dependencies: "" + configure_params: "--with-null-ui --with-audio-driver=null" verify_ui: "null" + verify_audio: "null" # GTK 3 UI gtk3-ui: - name: "Fuse GTK 3 UI (Linux)" + name: "Fuse GTK 3 UI (MacOS)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: GTK3 UI - dependencies: "libaudiofile-dev gtk3.0 libgtk-3-dev" + dependencies: "gtk+3" configure_params: "--with-gtk" verify_ui: "gtk" verify_other: "Using GTK 3: yes" # SDL 1 UI + Sound sdl1-ui: - name: "Fuse SDL 1 UI + sound (Linux)" + name: "Fuse SDL 1 UI + sound (MacOS)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: SDL1 UI - dependencies: "libaudiofile-dev libsdl1.2-dev" + dependencies: "sdl12-compat" configure_params: "--with-sdl --disable-sdl2" verify_ui: "sdl" verify_audio: "sdl" @@ -66,51 +68,40 @@ jobs: # SDL 2 UI + Sound (not supported for UI yet) sdl2-ui: - name: "Fuse SDL 2 UI + sound (Linux) (not supported yet)" + name: "Fuse SDL 2 UI + sound (MacOS) (not supported yet)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: SDL2 UI (not supported yet) - dependencies: "libaudiofile-dev libsdl2-dev libsdl1.2-dev" + dependencies: "sdl2 sdl12-compat" configure_params: "--with-sdl" verify_ui: "sdl" verify_audio: "sdl" verify_other: "SDL 2 not supported for the UI, using SDL 1 instead" ########################################## -### DEPRECATED Linux UI configurations ### +### DEPRECATED MacOS UI configurations ### ########################################## - # FB UI (deprecated) - fb-ui: - name: "Fuse FB UI (Linux) (deprecated)" - needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml - with: - name: "FB UI (deprecated)" - dependencies: "libaudiofile-dev libgpm-dev" - configure_params: "--with-fb" - verify_ui: "fb" - # XLIB UI (deprecated) xlib-ui: - name: "Fuse X-lib UI (Linux) (deprecated)" + name: "Fuse X-lib UI (MacOS) (deprecated)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: X-lib UI (deprecated) - dependencies: "libaudiofile-dev" + dependencies: "" configure_params: "--with-x" verify_ui: "xlib" # GTK 2 UI (deprecated) gtk2-ui: - name: "Fuse GTK 2 UI (Linux) (deprecated)" + name: "Fuse GTK 2 UI (MacOS) (deprecated)" needs: [libspectrum] - uses: ./.github/workflows/_build_linux_sub.yml + uses: ./.github/workflows/build_macos_sub.yml with: name: GTK2 UI (deprecated) - dependencies: "libaudiofile-dev gtk2.0 libgtk2.0-dev" + dependencies: "gtk+" configure_params: "--with-gtk --disable-gtk3" verify_ui: "gtk" verify_other: "Using GTK 3: no" diff --git a/.github/workflows/_build_linux_sub.yml b/.github/workflows/build_macos_sub.yml similarity index 56% rename from .github/workflows/_build_linux_sub.yml rename to .github/workflows/build_macos_sub.yml index d2b1f805..1e6733e9 100644 --- a/.github/workflows/_build_linux_sub.yml +++ b/.github/workflows/build_macos_sub.yml @@ -1,6 +1,6 @@ -# Reusable workflow for all Linux builds -name: Fuse App For Linux -run-name: Build Fuse App for Linux / ${{ github.actor }} / +# Reusable workflow for all MacOS builds +name: Fuse App For MacOS +run-name: Build Fuse App for MacOS / ${{ github.actor }} / on: workflow_call: @@ -22,7 +22,7 @@ on: verify_audio: type: string required: false - default: "oss" + default: "coreaudio" verify_other: type: string required: false @@ -31,45 +31,65 @@ on: jobs: build: name: Build App - runs-on: ubuntu-latest + runs-on: macos-latest timeout-minutes: 15 defaults: run: shell: bash steps: - - name: (1) Install dependencies - if: ${{ inputs.dependencies }} + - name: (1) Prepare environment run: | - sudo apt-get update - sudo apt-get install -y ${{ inputs.dependencies }} + echo -n "Current directory: " + pwd + ls -la - name: (2) Check out repository code uses: actions/checkout@v3 - - name: (3) Download libspectrum artefact + - name: (3) Install dependencies + run: | + echo "Inspect if brew installed .." + brew doctor || true + + echo "Upgrade bash (fix |& ) .." + brew install bash + which -a bash + bash --version + sudo sh -c 'echo /usr/local/bin/bash >> /etc/shells' + + echo "Installing dependencies .." + brew install \ + automake \ + audiofile \ + bzip2 \ + libgcrypt \ + glib \ + libxml2 \ + ${{ inputs.dependencies }} + autoreconf -i + + - name: (4) Download libspectrum artefact uses: actions/download-artifact@v3 with: - name: libspectrum-compiled-linux + name: libspectrum-installed-macos-fuse-app path: libspectrum - - name: (4) Install libspectrum from artefact + - name: (5) Install libspectrum from artefact run: | - cd libspectrum - tar -xvf libspectrum-compiled-linux.tar - sudo make install-strip - cd .. + # Extract (-x) files into /usr/local + sudo tar --directory / -xvf libspectrum/libspectrum-installed-macos.tar echo "Done" - - name: (5) Autogen.sh + - name: (6) Autogen.sh run: ./autogen.sh - - name: (6) Configure for Linux + - name: (7) Configure for MacOS run: | ./configure ${{ inputs.configure_params }} \ |& tee ./configure.out - - name: (7) Verify output from configure - # Most of the tested strings are common for all Linux builds + - name: (8) Verify output from configure + # Most of the tested strings are common for all MacOS builds # Only the strings related to UI selection differ run: | .github/scripts/in_config.sh "Fuse options" @@ -77,7 +97,7 @@ jobs: .github/scripts/in_config.sh "libxml2 support: yes" .github/scripts/in_config.sh "libpng support: yes" .github/scripts/in_config.sh "Spectranet support: yes" - .github/scripts/in_config.sh "SpeccyBoot support: yes" + .github/scripts/in_config.sh "SpeccyBoot support: no" .github/scripts/in_config.sh "TTX2000 S support: yes" .github/scripts/in_config.sh "Desktop integration: no" @@ -87,12 +107,12 @@ jobs: run: | .github/scripts/in_config.sh "${{ inputs.verify_other }}" - - name: (7) Make + - name: (9) Make run: make - - name: (8) Install + - name: (10) Install run: sudo make install - - name: (9) Finish + - name: (11) Finish run: | echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_wii.yml b/.github/workflows/build_wii.yml new file mode 100644 index 00000000..378ff773 --- /dev/null +++ b/.github/workflows/build_wii.yml @@ -0,0 +1,50 @@ +name: Fuse App For WII +run-name: Build Fuse App for WII / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact + # Only one case possible - without any libs, fake glib + name: "Libspectrum lib (WII)" + uses: arki55/fuse-libspectrum/.github/workflows/build_wii_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-app + use_zlib: false + use_bzip2: false + use_libgcrypt: false + use_libaudiofile: false + use_fake_glib: true + # repo name is taken from var.LIBSPECTRUM_REPO + +######################################### +### SUPPORTED WII UI configurations ### +######################################### + +### FIXME: Needs "yacc" +# # NULL UI + sound +# null-ui: +# name: "Fuse NULL UI (WII)" +# needs: [libspectrum] +# uses: ./.github/workflows/build_wii_sub.yml +# with: +# name: "NULL UI" +# dependencies: "" +# configure_params: "--with-null-ui --with-audio-driver=null" +# verify_ui: "null" +# verify_audio: "null" + + # WII UI + wii-ui: + name: "Fuse WII UI (WII)" + needs: [libspectrum] + uses: ./.github/workflows/build_wii_sub.yml + with: + name: GTK3 UI + dependencies: "" + configure_params: "--with-wii" + verify_ui: "wii" + verify_audio: "oss" diff --git a/.github/workflows/build_wii_sub.yml b/.github/workflows/build_wii_sub.yml new file mode 100644 index 00000000..9ac83566 --- /dev/null +++ b/.github/workflows/build_wii_sub.yml @@ -0,0 +1,133 @@ +# Reusable workflow for all WII builds +name: Fuse App For WII +run-name: Build Fuse App for WII / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + verify_ui: + type: string + required: true + verify_audio: + type: string + required: false + default: "oss" + verify_other: + type: string + required: false + default: "" + +jobs: + build: + name: Build App + runs-on: ubuntu-latest + timeout-minutes: 15 + container: devkitpro/devkitppc + env: + PKG_CONFIG_PATH: /opt/devkitpro/devkitPPC/lib/pkgconfig + defaults: + run: + shell: bash + steps: + - name: (1) Prepare environment + run: | + echo "Available pacman packages:" + dkp-pacman -Sl + echo "" + + echo "Available devkitPro packages:" + dkp-pacman -Sl dkp-libs + echo "" + + - name: (2) Install dependencies + if: + run: | + echo "Installing dependencies .." + echo "Using devkitpro/devkitppc image" + sudo apt-get update + sudo apt-get -y install --no-install-recommends \ + wget tar autoconf automake libtool \ + ${{ inputs.dependencies }} && \ + sudo rm -rf /var/lib/apt/lists/* + echo "Done." + + - name: (3) Check out repository code + uses: actions/checkout@v3 + + - name: (4) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-wii-fuse-app + path: libspectrum + + - name: (5) Install libspectrum from artefact + run: | + # Extract (-x) files into /opt/devkitpro/devkitPPC/ + echo "Extract libspectrum lib files .." + sudo tar --directory / -xvf libspectrum/libspectrum-installed-wii.tar + + echo "Verify if files are there .." + ls -la -R /opt/devkitpro/devkitPPC/ + + echo "Done" + + - name: (6) Autogen.sh + run: ./autogen.sh + + - name: (7) Configure for WII + run: | + ./configure \ + --target=powerpc-eabi \ + --host=powerpc-eabi \ + --prefix=$DEVKITPPC \ + --without-gpm \ + --without-libxml2 \ + --without-x \ + ${{ inputs.configure_params }} \ + |& tee ./configure.out + + - name: (8) Verify output from configure + # Most of the tested strings are common for all WII builds + # Only the strings related to UI selection differ + run: | + .github/scripts/in_config.sh "Fuse options" + .github/scripts/in_config.sh "zlib support: no" + .github/scripts/in_config.sh "libxml2 support: no" + .github/scripts/in_config.sh "libpng support: no" + .github/scripts/in_config.sh "Spectranet support: yes" + .github/scripts/in_config.sh "SpeccyBoot support: yes" + .github/scripts/in_config.sh "TTX2000 S support: yes" + .github/scripts/in_config.sh "Desktop integration: no" + + .github/scripts/in_config.sh "User interface: ${{ inputs.verify_ui }}" + .github/scripts/in_config.sh "Selected audio driver: ${{ inputs.verify_audio }}" + - if: ${{ inputs.verify_other }} + run: | + .github/scripts/in_config.sh "${{ inputs.verify_other }}" + + - name: (9) Make + run: | + EXEEXT=".elf" make -e + + if [[ ! -f "fuse.elf" ]]; then + echo "Fuse.elf was not created!" + exit -2 + fi + + - name: (10) Install + run: sudo make install + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 00000000..7d9c00c4 --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,67 @@ +name: Fuse App For Windows +run-name: Build Fuse App for Windows / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, fake glib) + name: "Libspectrum lib (Windows)" + uses: arki55/fuse-libspectrum/.github/workflows/build_windows_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-app + # repo name is taken from var.LIBSPECTRUM_REPO + +######################################## +### SUPPORTED Windows configurations ### +######################################## + + # Win32 / 1 + win32-ui-default: + name: "Fuse Win32 UI + libxml2 (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + dependencies: "mingw64-i686-libxml2" + configure_params: "--with-win32" + verify_ui: "win32" + verify_libxml2: "yes" + verify_audio: "directsound" + + # Win32 / 2 + win32-ui-no-libxml2: + name: "Fuse Win32 UI w/o libxml2 (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + dependencies: "" + configure_params: "--with-win32 --without-libxml2" + verify_ui: "win32" + verify_libxml2: "no" + verify_audio: "directsound" + + # Win32 / 3 + win32-ui-win32-sound: + name: "Fuse Win32 UI + win32sound (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + dependencies: "" + configure_params: "--with-win32 --with-audio-driver=win32sound" + verify_ui: "win32" + verify_libxml2: "no" + verify_audio: "win32sound" + + # Win32 / 4 + win32-ui-null-sound: + name: "Fuse Win32 UI + null sound (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + dependencies: "" + configure_params: "--with-win32 --with-audio-driver=null" + verify_ui: "win32" + verify_libxml2: "no" + verify_audio: "null" diff --git a/.github/workflows/build_windows_sub.yml b/.github/workflows/build_windows_sub.yml new file mode 100644 index 00000000..7859aa5a --- /dev/null +++ b/.github/workflows/build_windows_sub.yml @@ -0,0 +1,163 @@ +# Reusable workflow for all Windows builds +name: Fuse App For Windows +run-name: Build Fuse App for windows / ${{ github.actor }} / + +on: + workflow_call: + inputs: + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + verify_ui: + type: string + required: true + verify_audio: + type: string + required: false + default: "directsound" + verify_libxml2: + type: string + required: false + default: "no" + verify_other: + type: string + required: false + default: "" + +jobs: + build: + name: Build App + runs-on: windows-latest + timeout-minutes: 15 + env: + CYGWIN_NOWINPATH: 1 + + # Custom build libraries + CPPFLAGS: "-I/usr/local/i686-w64-mingw32/include" + LDFLAGS: "-L/usr/local/i686-w64-mingw32/lib" + PKG_CONFIG_LIBDIR: "/usr/local/i686-w64-mingw32/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" + steps: + - name: (1) Prepare environment + run: | + cd ${GITHUB_WORKSPACE} + + echo "Adjust autocrlf in git.." + git config --global core.autocrlf input + + echo -n "Current directory: " + pwd + ls -la + shell: bash + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Install Cygwin (32 bit) with libs + uses: cygwin/cygwin-install-action@master + with: + platform: x86 + packages: | + autoconf \ + automake \ + bison \ + flex \ + gcc-core \ + gcc-g++ \ + gettext-devel \ + libtool \ + make \ + mingw64-i686-bzip2 \ + mingw64-i686-gcc-core \ + mingw64-i686-gcc-g++ \ + mingw64-i686-libgcrypt \ + mingw64-i686-libgpg-error \ + mingw64-i686-libpng \ + mingw64-i686-win-iconv \ + mingw64-i686-winpthread \ + mingw64-i686-zlib \ + mingw64-i686-audiofile \ + pkg-config \ + ${{ inputs.dependencies }} + + - name: (4) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-windows-fuse-app + path: libspectrum + + - name: (5) Install libspectrum from artefact + run: | + cd ${GITHUB_WORKSPACE} + # Extract (-x) files into /usr/local (cannot work with root /) + mkdir /usr/local/i686-w64-mingw32 || true + tar --directory /usr/local/i686-w64-mingw32 -xvf libspectrum/libspectrum-installed-windows.tar + echo "Done" + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (6) Autogen.sh + run: | + cd ${GITHUB_WORKSPACE} + echo "Running autogen.sh .." + ./autogen.sh + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (7) Configure for Windows + run: | + cd ${GITHUB_WORKSPACE} + echo "Running configure .." + ./configure \ + --build=i686-pc-cygwin \ + --host=i686-w64-mingw32 \ + --prefix=/usr/local/i686-w64-mingw32 \ + --disable-static \ + ${{ inputs.configure_params }} \ + |& tee ./configure.out + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (8) Verify output from configure + # Most of the tested strings are common for all Windows builds + # Only the strings related to UI selection differ + run: | + cd ${GITHUB_WORKSPACE} + + .github/scripts/in_config.sh "Fuse options" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "Spectranet support: yes" + .github/scripts/in_config.sh "SpeccyBoot support: no" + .github/scripts/in_config.sh "TTX2000 S support: yes" + .github/scripts/in_config.sh "Desktop integration: no" + + .github/scripts/in_config.sh "User interface: ${{ inputs.verify_ui }}" + .github/scripts/in_config.sh "libxml2 support: ${{ inputs.verify_libxml2 }}" + .github/scripts/in_config.sh "Selected audio driver: ${{ inputs.verify_audio }}" + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + - if: ${{ inputs.verify_other }} + run: | + .github/scripts/in_config.sh "${{ inputs.verify_other }}" + shell: bash + + - name: (9) Make + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make .." + make + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (10) Install + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make dist-win32-dir .." + make install dist-win32-dir + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." |
From: <al...@us...> - 2023-03-19 18:47:29
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a change to branch master in repository fuse. from 2effbd6d More accurate emulation of AM29F010B flash ROM. new 382e41a3 build: Supporting bash script for github workflows, used to verify if output from configure script contains certain text. new ef43aa1c arki55 / T9-github-build-checks build: Implemented full workflow for building Fuse APP on Linux. - It reuses build_linux.yml workflow from fuse libspectrum repository. - Split into 2 files : _build_linux_sub.yml with logic and steps for building main Fuse APP - checkout, configure, make, make install, etc. And build_linux with actually triggered workflow upon push and pull_request . - First step is to build libspectrum with its reusable workflow. FOr that purpose repo [...] new 0c515b4c fix: Wrong branch name, was missing bash script new 58ac76a7 fix: Updated in_config.sh as it should be, Checking that a message is at least once in output. new 089c82ce Arki55/features/t9 GitHub build checks fuse App ==> arki55/github-workflows new 3183073a Arki55/features/t9 GitHub build checks fuse ==> arki55/github-workflows (#3) new f25b134d Merge /u/arki55/fuse/ branch arki55/github-workflows into master The 7 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .github/scripts/in_config.sh | 8 ++ .github/workflows/build_linux.yml | 117 +++++++++++++++++++++++ .github/workflows/build_linux_sub.yml | 96 +++++++++++++++++++ .github/workflows/build_macos.yml | 107 +++++++++++++++++++++ .github/workflows/build_macos_sub.yml | 118 +++++++++++++++++++++++ .github/workflows/build_wii.yml | 50 ++++++++++ .github/workflows/build_wii_sub.yml | 133 ++++++++++++++++++++++++++ .github/workflows/build_windows.yml | 67 +++++++++++++ .github/workflows/build_windows_sub.yml | 163 ++++++++++++++++++++++++++++++++ 9 files changed, 859 insertions(+) create mode 100755 .github/scripts/in_config.sh create mode 100644 .github/workflows/build_linux.yml create mode 100644 .github/workflows/build_linux_sub.yml create mode 100644 .github/workflows/build_macos.yml create mode 100644 .github/workflows/build_macos_sub.yml create mode 100644 .github/workflows/build_wii.yml create mode 100644 .github/workflows/build_wii_sub.yml create mode 100644 .github/workflows/build_windows.yml create mode 100644 .github/workflows/build_windows_sub.yml |
From: <al...@us...> - 2023-03-19 18:47:29
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/382e41a3252c2de24fc035c35085e377f6dc4b17/ commit 382e41a3252c2de24fc035c35085e377f6dc4b17 Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 19:46:29 2023 +0100 build: Supporting bash script for github workflows, used to verify if output from configure script contains certain text. --- .github/scripts/in_config.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/scripts/in_config.sh b/.github/scripts/in_config.sh new file mode 100755 index 00000000..d4c15e40 --- /dev/null +++ b/.github/scripts/in_config.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "Looking for line '$1' .." +lines1=(`cat "./configure.out" | grep -c "$1"`) +if [[ "$lines1" -ne "1" ]]; then + echo "Error: Line $1 not found!" + exit 1 +fi +echo "Line '$1' was found." |
From: <al...@us...> - 2023-03-19 18:47:29
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/0c515b4c45ece18d329431e492909fab2afe5671/ commit 0c515b4c45ece18d329431e492909fab2afe5671 Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 20:17:31 2023 +0100 fix: Wrong branch name, was missing bash script --- .github/workflows/build_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index 56f1f307..3a177eb1 100644 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -10,7 +10,7 @@ jobs: name: "Libspectrum lib (Linux)" uses: arki55/fuse-libspectrum/.github/workflows/build_linux.yml@arki55/github-workflows with: - branch: master + branch: arki55/github-workflows # repo name is taken from var.LIBSPECTRUM_REPO # Default build without any configure params (xlib) |
From: <al...@us...> - 2023-03-19 18:47:29
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/58ac76a72e3d9f66d13c241b406b2b60dced110c/ commit 58ac76a72e3d9f66d13c241b406b2b60dced110c Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 20:29:14 2023 +0100 fix: Updated in_config.sh as it should be, Checking that a message is at least once in output. --- .github/scripts/in_config.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/in_config.sh b/.github/scripts/in_config.sh index d4c15e40..d3d03e7b 100755 --- a/.github/scripts/in_config.sh +++ b/.github/scripts/in_config.sh @@ -1,8 +1,8 @@ #!/bin/bash -echo "Looking for line '$1' .." +echo -n "Verify configure line '$1' .. " lines1=(`cat "./configure.out" | grep -c "$1"`) -if [[ "$lines1" -ne "1" ]]; then - echo "Error: Line $1 not found!" +if [[ "$lines1" -lt "1" ]]; then + echo "NOT FOUND" exit 1 fi -echo "Line '$1' was found." +echo "OK" |
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse/ci/ef43aa1c64bcd2fb11c71ca4b3a7c208ba29d001/ commit ef43aa1c64bcd2fb11c71ca4b3a7c208ba29d001 Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 20:11:23 2023 +0100 arki55 / T9-github-build-checks build: Implemented full workflow for building Fuse APP on Linux. - It reuses build_linux.yml workflow from fuse libspectrum repository. - Split into 2 files : _build_linux_sub.yml with logic and steps for building main Fuse APP - checkout, configure, make, make install, etc. And build_linux with actually triggered workflow upon push and pull_request . - First step is to build libspectrum with its reusable workflow. FOr that purpose repo needs to define variable LIBSPECTRUM_REPO - address of libspectrum repo in github. - Libspectrum is built, all files zipped into artifact file, which is then loaded by build subprocess and its content installed (make install) - Libspectrum is built once, then all the dependant various LInux based configurations are built. - Each build variant provides its specific .configure params, what to verify in .configure output, etc. Supporting configurations: - Default built (no params for ./configure) - NULL UI - GTK 3 UI - SDL 1 UI - SDL 2 UI (only checks that it shows not supported yet) Deprecated UIs (as per official site): - GTK 2 UI - Frame Buffer UI - X UI --- .github/workflows/_build_linux_sub.yml | 98 ++++++++++++++++++++++++++++ .github/workflows/build_linux.yml | 116 +++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+) diff --git a/.github/workflows/_build_linux_sub.yml b/.github/workflows/_build_linux_sub.yml new file mode 100644 index 00000000..d2b1f805 --- /dev/null +++ b/.github/workflows/_build_linux_sub.yml @@ -0,0 +1,98 @@ +# Reusable workflow for all Linux builds +name: Fuse App For Linux +run-name: Build Fuse App for Linux / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + verify_ui: + type: string + required: true + verify_audio: + type: string + required: false + default: "oss" + verify_other: + type: string + required: false + default: "" + +jobs: + build: + name: Build App + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + shell: bash + steps: + - name: (1) Install dependencies + if: ${{ inputs.dependencies }} + run: | + sudo apt-get update + sudo apt-get install -y ${{ inputs.dependencies }} + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-compiled-linux + path: libspectrum + + - name: (4) Install libspectrum from artefact + run: | + cd libspectrum + tar -xvf libspectrum-compiled-linux.tar + sudo make install-strip + cd .. + echo "Done" + + - name: (5) Autogen.sh + run: ./autogen.sh + + - name: (6) Configure for Linux + run: | + ./configure ${{ inputs.configure_params }} \ + |& tee ./configure.out + + - name: (7) Verify output from configure + # Most of the tested strings are common for all Linux builds + # Only the strings related to UI selection differ + run: | + .github/scripts/in_config.sh "Fuse options" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libxml2 support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "Spectranet support: yes" + .github/scripts/in_config.sh "SpeccyBoot support: yes" + .github/scripts/in_config.sh "TTX2000 S support: yes" + .github/scripts/in_config.sh "Desktop integration: no" + + .github/scripts/in_config.sh "User interface: ${{ inputs.verify_ui }}" + .github/scripts/in_config.sh "Selected audio driver: ${{ inputs.verify_audio }}" + - if: ${{ inputs.verify_other }} + run: | + .github/scripts/in_config.sh "${{ inputs.verify_other }}" + + - name: (7) Make + run: make + + - name: (8) Install + run: sudo make install + + - name: (9) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 00000000..56f1f307 --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,116 @@ +name: Fuse App For Linux +run-name: Build Fuse App for Linux / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact + name: "Libspectrum lib (Linux)" + uses: arki55/fuse-libspectrum/.github/workflows/build_linux.yml@arki55/github-workflows + with: + branch: master + # repo name is taken from var.LIBSPECTRUM_REPO + + # Default build without any configure params (xlib) + default-ui: + name: "Fuse Default UI (Linux)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: Default + dependencies: "libaudiofile-dev" + configure_params: "" + verify_ui: "xlib" + +######################################### +### SUPPORTED Linux UI configurations ### +######################################### + + # NULL UI + null-ui: + name: "Fuse NULL UI (Linux)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: "NULL UI" + dependencies: "libaudiofile-dev" + configure_params: "--with-null-ui" + verify_ui: "null" + + # GTK 3 UI + gtk3-ui: + name: "Fuse GTK 3 UI (Linux)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: GTK3 UI + dependencies: "libaudiofile-dev gtk3.0 libgtk-3-dev" + configure_params: "--with-gtk" + verify_ui: "gtk" + verify_other: "Using GTK 3: yes" + + # SDL 1 UI + Sound + sdl1-ui: + name: "Fuse SDL 1 UI + sound (Linux)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: SDL1 UI + dependencies: "libaudiofile-dev libsdl1.2-dev" + configure_params: "--with-sdl --disable-sdl2" + verify_ui: "sdl" + verify_audio: "sdl" + verify_other: "Using SDL 2: no" + + # SDL 2 UI + Sound (not supported for UI yet) + sdl2-ui: + name: "Fuse SDL 2 UI + sound (Linux) (not supported yet)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: SDL2 UI (not supported yet) + dependencies: "libaudiofile-dev libsdl2-dev libsdl1.2-dev" + configure_params: "--with-sdl" + verify_ui: "sdl" + verify_audio: "sdl" + verify_other: "SDL 2 not supported for the UI, using SDL 1 instead" + +########################################## +### DEPRECATED Linux UI configurations ### +########################################## + + # FB UI (deprecated) + fb-ui: + name: "Fuse FB UI (Linux) (deprecated)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: "FB UI (deprecated)" + dependencies: "libaudiofile-dev libgpm-dev" + configure_params: "--with-fb" + verify_ui: "fb" + + # XLIB UI (deprecated) + xlib-ui: + name: "Fuse X-lib UI (Linux) (deprecated)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: X-lib UI (deprecated) + dependencies: "libaudiofile-dev" + configure_params: "--with-x" + verify_ui: "xlib" + + # GTK 2 UI (deprecated) + gtk2-ui: + name: "Fuse GTK 2 UI (Linux) (deprecated)" + needs: [libspectrum] + uses: ./.github/workflows/_build_linux_sub.yml + with: + name: GTK2 UI (deprecated) + dependencies: "libaudiofile-dev gtk2.0 libgtk2.0-dev" + configure_params: "--with-gtk --disable-gtk3" + verify_ui: "gtk" + verify_other: "Using GTK 3: no" |
From: <al...@us...> - 2023-03-19 18:44:25
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository fuse-utils. View the commit online: https://sourceforge.net/p/fuse-emulator/fuse-utils/ci/bb96b0153fc2accd12a7b2c3d814cc2ea730dd17/ The following commit(s) were added to refs/heads/master by this push: new bb96b01 Arki55/features/t9 GitHub build checks utils ==> master (#1) new 03350d4 Merge /u/arki55/fuse-utils/ branch arki55/github-workflows into master bb96b01 is described below commit bb96b0153fc2accd12a7b2c3d814cc2ea730dd17 Author: Miroslav Ďurčík <743...@us...> AuthorDate: Wed Mar 8 21:48:20 2023 +0100 Arki55/features/t9 GitHub build checks utils ==> master (#1) * arki55/features/T9-github-build-checks-utils build: GitHub worflow files for building Fuse Utils on multiple platforms: 1) Linux, running on Ubuntu Latest - Builds and packs Libspectrum with all libs enabled + real glib - Builds Fuse Utils with previously built Libspectrum, which is saved as a workflow artefact - Only one build configuration configured 2) Win 32, running on Windows latest, using Cygwin environment and libraries - Builds and packs Libspectrum with all libs enabled + fake glib - Builds Fuse Utils with previously built Libspectrum, which is saved as a workflow artefact - Only one build configuration configured 3) MacOS, running on MacOS latest, using brew libraries - Build and packs Libspectrum with all libs enabled + real glib - Builds Fuse Utils with previously built Libspectrum, which is saved as a workflow artefact - Only one build configuration configured Any compile errors stop workflow. Warnings while building do not. This might be changed later if needed. --- .github/scripts/in_config.sh | 8 ++ .github/workflows/build_linux.yml | 30 +++++++ .github/workflows/build_linux_sub.yml | 77 +++++++++++++++++ .github/workflows/build_macos.yml | 30 +++++++ .github/workflows/build_macos_sub.yml | 99 ++++++++++++++++++++++ .github/workflows/build_windows.yml | 29 +++++++ .github/workflows/build_windows_sub.yml | 144 ++++++++++++++++++++++++++++++++ 7 files changed, 417 insertions(+) diff --git a/.github/scripts/in_config.sh b/.github/scripts/in_config.sh new file mode 100755 index 0000000..d4c15e4 --- /dev/null +++ b/.github/scripts/in_config.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo "Looking for line '$1' .." +lines1=(`cat "./configure.out" | grep -c "$1"`) +if [[ "$lines1" -ne "1" ]]; then + echo "Error: Line $1 not found!" + exit 1 +fi +echo "Line '$1' was found." diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml new file mode 100644 index 0000000..44d7b4b --- /dev/null +++ b/.github/workflows/build_linux.yml @@ -0,0 +1,30 @@ +name: Fuse Utils For Linux +run-name: Build Fuse Utils for Linux / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, real glib) + name: "Libspectrum lib (Linux)" + uses: arki55/fuse-libspectrum/.github/workflows/build_linux_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-utils + # repo name is taken from var.LIBSPECTRUM_REPO + + +######################################### +### SUPPORTED Linux configurations ### +######################################### + + # Default build without any configure params + utils-default: + name: "Fuse Utils Default (Linux)" + needs: [libspectrum] + uses: ./.github/workflows/build_linux_sub.yml + with: + name: Default + dependencies: "libaudiofile-dev" + configure_params: "" diff --git a/.github/workflows/build_linux_sub.yml b/.github/workflows/build_linux_sub.yml new file mode 100644 index 0000000..de0609d --- /dev/null +++ b/.github/workflows/build_linux_sub.yml @@ -0,0 +1,77 @@ +# Reusable workflow for all Linux builds +name: Fuse Utils For Linux +run-name: Build Fuse Utils for Linux / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + +jobs: + build: + name: Build Utils + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + shell: bash + steps: + - name: (1) Install dependencies + if: ${{ inputs.dependencies }} + run: | + sudo apt-get update + sudo apt-get install -y ${{ inputs.dependencies }} + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-linux-fuse-utils + path: libspectrum + + - name: (4) Install libspectrum from artefact + run: | + # Extract (-x) files into /usr/local + sudo tar --directory / -xvf libspectrum/libspectrum-installed-linux.tar + echo "Done" + + - name: (5) Autogen.sh + run: ./autogen.sh + + - name: (6) Configure for Linux + run: | + ./configure ${{ inputs.configure_params }} \ + |& tee ./configure.out + + - name: (7) Verify output from configure + # Most of the tested strings are common for all Linux builds + run: | + .github/scripts/in_config.sh "The Fuse utils are ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libjpeg support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "libspectrum's internal GLib replacement: no" + + - name: (7) Make + run: make + + - name: (8) Install + run: sudo make install + + - name: (9) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml new file mode 100644 index 0000000..99fdc5f --- /dev/null +++ b/.github/workflows/build_macos.yml @@ -0,0 +1,30 @@ +name: Fuse Utils For MacOS +run-name: Build Fuse Utils for MacOS / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, real glib) + name: "Libspectrum lib (MacOS)" + uses: arki55/fuse-libspectrum/.github/workflows/build_macos_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-utils + # repo name is taken from var.LIBSPECTRUM_REPO + + +######################################### +### SUPPORTED MacOS configurations ### +######################################### + + # Default build without any configure params + utils-default: + name: "Fuse Utils Default (Utils)" + needs: [libspectrum] + uses: ./.github/workflows/build_macos_sub.yml + with: + name: Default + dependencies: "" + configure_params: "" diff --git a/.github/workflows/build_macos_sub.yml b/.github/workflows/build_macos_sub.yml new file mode 100644 index 0000000..f8f707a --- /dev/null +++ b/.github/workflows/build_macos_sub.yml @@ -0,0 +1,99 @@ +# Reusable workflow for all MacOS builds +name: Fuse Utils For MacOS +run-name: Build Fuse Utils for MacOS / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + +jobs: + build: + name: Build Utils + runs-on: macos-latest + timeout-minutes: 15 + defaults: + run: + shell: bash + steps: + - name: (1) Prepare environment + run: | + echo -n "Current directory: " + pwd + ls -la + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Install dependencies + run: | + echo "Inspect if brew installed .." + brew doctor || true + + echo "Upgrade bash (fix |& ) .." + brew install bash + which -a bash + bash --version + sudo sh -c 'echo /usr/local/bin/bash >> /etc/shells' + + echo "Installing dependencies .." + brew install \ + automake \ + audiofile \ + bzip2 \ + libgcrypt \ + glib \ + libxml2 \ + ${{ inputs.dependencies }} + autoreconf -i + + - name: (4) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-macos-fuse-utils + path: libspectrum + + - name: (5) Install libspectrum from artefact + run: | + # Extract (-x) files into /usr/local + sudo tar --directory / -xvf libspectrum/libspectrum-installed-macos.tar + echo "Done" + + - name: (6) Autogen.sh + run: ./autogen.sh + + - name: (7) Configure for MacOS + run: | + ./configure ${{ inputs.configure_params }} \ + |& tee ./configure.out + + - name: (8) Verify output from configure + # Most of the tested strings are common for all MacOS builds + run: | + .github/scripts/in_config.sh "The Fuse utils are ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libjpeg support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "libspectrum's internal GLib replacement: no" + + - name: (9) Make + run: make + + - name: (10) Install + run: sudo make install + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 0000000..8d3835b --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,29 @@ +name: Fuse Utils For Windows +run-name: Build Fuse Utils for Windows / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + libspectrum: + # Reuse libspectrum's build wokflow and artefact (all libs enabled, fake glib) + name: "Libspectrum lib (Windows)" + uses: arki55/fuse-libspectrum/.github/workflows/build_windows_sub.yml@arki55/github-workflows + with: + branch: arki55/github-workflows + key: fuse-utils + # repo name is taken from var.LIBSPECTRUM_REPO + +######################################## +### SUPPORTED Windows configurations ### +######################################## + + # Win32 / 1 + utils-win32-default: + name: "Fuse Utils Default (Windows)" + needs: [libspectrum] + uses: ./.github/workflows/build_windows_sub.yml + with: + name: Default + dependencies: "mingw64-i686-libxml2" + configure_params: "" diff --git a/.github/workflows/build_windows_sub.yml b/.github/workflows/build_windows_sub.yml new file mode 100644 index 0000000..af03900 --- /dev/null +++ b/.github/workflows/build_windows_sub.yml @@ -0,0 +1,144 @@ +# Reusable workflow for all Windows builds +name: Fuse Utils For Windows +run-name: Build Fuse Utils for windows / ${{ github.actor }} / + +on: + workflow_call: + inputs: + name: + type: string + required: true + dependencies: + type: string + required: false + default: "" + configure_params: + type: string + required: false + default: "" + +jobs: + build: + name: Build Utils + runs-on: windows-latest + timeout-minutes: 15 + env: + CYGWIN_NOWINPATH: 1 + + # Custom build libraries + CPPFLAGS: "-I/usr/local/i686-w64-mingw32/include" + LDFLAGS: "-L/usr/local/i686-w64-mingw32/lib" + PKG_CONFIG_LIBDIR: "/usr/local/i686-w64-mingw32/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" + steps: + - name: (1) Prepare environment + run: | + cd ${GITHUB_WORKSPACE} + + echo "Adjust autocrlf in git.." + git config --global core.autocrlf input + + echo -n "Current directory: " + pwd + ls -la + shell: bash + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Install Cygwin (32 bit) with libs + uses: cygwin/cygwin-install-action@master + with: + platform: x86 + packages: | + autoconf \ + automake \ + bison \ + flex \ + gcc-core \ + gcc-g++ \ + gettext-devel \ + libtool \ + make \ + mingw64-i686-bzip2 \ + mingw64-i686-gcc-core \ + mingw64-i686-gcc-g++ \ + mingw64-i686-libgcrypt \ + mingw64-i686-libgpg-error \ + mingw64-i686-libjpeg-turbo \ + mingw64-i686-libpng \ + mingw64-i686-win-iconv \ + mingw64-i686-winpthread \ + mingw64-i686-zlib \ + mingw64-i686-audiofile \ + pkg-config \ + ${{ inputs.dependencies }} + + - name: (4) Download libspectrum artefact + uses: actions/download-artifact@v3 + with: + name: libspectrum-installed-windows-fuse-utils + path: libspectrum + + - name: (5) Install libspectrum from artefact + run: | + cd ${GITHUB_WORKSPACE} + # Extract (-x) files into /usr/local (cannot work with root /) + mkdir /usr/local/i686-w64-mingw32 || true + tar --directory /usr/local/i686-w64-mingw32 -xvf libspectrum/libspectrum-installed-windows.tar + echo "Done" + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (6) Autogen.sh + run: | + cd ${GITHUB_WORKSPACE} + echo "Running autogen.sh .." + ./autogen.sh + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (7) Configure for Windows + run: | + cd ${GITHUB_WORKSPACE} + echo "Running configure .." + ./configure \ + --build=i686-pc-cygwin \ + --host=i686-w64-mingw32 \ + --prefix=/usr/local/i686-w64-mingw32 \ + --disable-static \ + ${{ inputs.configure_params }} \ + |& tee ./configure.out + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (8) Verify output from configure + # Most of the tested strings are common for all Windows builds + run: | + cd ${GITHUB_WORKSPACE} + + .github/scripts/in_config.sh "The Fuse utils are ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "libjpeg support: yes" + .github/scripts/in_config.sh "libpng support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "libspectrum's internal GLib replacement: yes" + + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (9) Make + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make .." + make + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (10) Install + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make dist-win32-dir .." + make install dist-win32-dir + shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." |
From: <al...@us...> - 2023-03-19 18:41:15
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a change to branch master in repository libspectrum. from 8c4f2c4 Include <string.h> for 'strlen' and 'memcpy' new cebf596 build: Supporting bash script for github workflows, used to verify if output from configure script contains certain text. new 602af5a arki55/features/T9-github-build-checks (libspectrum) new 7aa7835 arki55/features/T9-github-build-checks (libspectrum) new cd8d100 chore: Correction new e656b23 arki55/features/T9-github-build-checks (libspectrum) new 48b887d arki55/features/T9-github-build-checks (libspectrum) new a52f4af arki55/features/T9-github-build-checks (libspectrum) new 78d8046 arki55/features/T9-github-build-checks (libspectrum) The 8 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .github/scripts/in_config.sh | 8 ++ .github/workflows/build_linux.yml | 120 ++++++++++++++++ .github/workflows/build_linux_sub.yml | 174 +++++++++++++++++++++++ .github/workflows/build_macos.yml | 70 ++++++++++ .github/workflows/build_macos_sub.yml | 177 +++++++++++++++++++++++ .github/workflows/build_wii.yml | 18 +++ .github/workflows/build_wii_sub.yml | 180 ++++++++++++++++++++++++ .github/workflows/build_windows.yml | 56 ++++++++ .github/workflows/build_windows_sub.yml | 239 ++++++++++++++++++++++++++++++++ 9 files changed, 1042 insertions(+) create mode 100755 .github/scripts/in_config.sh create mode 100644 .github/workflows/build_linux.yml create mode 100644 .github/workflows/build_linux_sub.yml create mode 100644 .github/workflows/build_macos.yml create mode 100644 .github/workflows/build_macos_sub.yml create mode 100644 .github/workflows/build_wii.yml create mode 100644 .github/workflows/build_wii_sub.yml create mode 100644 .github/workflows/build_windows.yml create mode 100644 .github/workflows/build_windows_sub.yml |
From: <al...@us...> - 2023-03-19 18:41:15
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/7aa78359f1e8f44cfc0d3edfbde36a80c0f40697/ commit 7aa78359f1e8f44cfc0d3edfbde36a80c0f40697 Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 16:53:14 2023 +0100 arki55/features/T9-github-build-checks (libspectrum) build: NON reusable workflow for building and testing libspectrum on Linux - with fake glib. - At the end it zips all files (including compiled binaries) and uplouads it a workflow artifact. - Executed on push (commits), pull_request (merge commit). - Build configuration used by this script: Platform: Linux zlib support: yes bzip2 support: yes libgcrypt support: yes libaudiofile support: yes Internal GLib replacement: yes --- .github/workflows/build_linux_fake_glib.yml | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/.github/workflows/build_linux_fake_glib.yml b/.github/workflows/build_linux_fake_glib.yml new file mode 100644 index 0000000..70b9967 --- /dev/null +++ b/.github/workflows/build_linux_fake_glib.yml @@ -0,0 +1,70 @@ +name: Libspectrum for Linux (2) +run-name: Build and test Libspectrum for Linux (2) [ all libs, fake glib ] / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + build: + name: Build & Test + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: (1) Prepare git + run: | + echo "Not needed in this build" + + - name: (2) Check out repository code + uses: actions/checkout@v3 + + - name: (3) Install dependencies + run: | + echo "Installing dependencies .." + sudo apt install -y libaudiofile-dev + + - name: (4) Autogen.sh + run: | + echo "Running autogen.sh .." + ./autogen.sh + + - name: (5) Configure for linux (fake glib) + run: | + echo "Running configure (fake glib) .." + ./configure --with-fake-glib | tee ./configure.out + + - name: (6) Verify output from configure + run: | + .github/scripts/in_config.sh "libspectrum is ready to be compiled" + .github/scripts/in_config.sh "zlib support: yes" + .github/scripts/in_config.sh "bzip2 support: yes" + .github/scripts/in_config.sh "libgcrypt support: yes" + .github/scripts/in_config.sh "libaudiofile support: yes" + .github/scripts/in_config.sh "Internal GLib replacement: yes" + + - name: (7) Make + run: | + echo "Running make .." + make + + - name: (8) Install (+sudo) + run: | + echo "Running make install .." + sudo make install + + - name: (9) Run tests + run: | + echo "Bulding and running tests .." + make check + + - name: (10) Upload generated files + uses: actions/upload-artifact@v3 + with: + name: libspectrum-linux-fake-glib + path: | + doc/libspectrum.3 + libspectrum.h + libspectrum.pc + + - name: (11) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." |
From: <al...@us...> - 2023-03-19 18:41:15
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/cebf59647d060cd8a46b3395b54e139bbb8d54db/ commit cebf59647d060cd8a46b3395b54e139bbb8d54db Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Sun Feb 5 16:34:29 2023 +0100 build: Supporting bash script for github workflows, used to verify if output from configure script contains certain text. --- .github/scripts/in_config.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/scripts/in_config.sh b/.github/scripts/in_config.sh new file mode 100755 index 0000000..d3d03e7 --- /dev/null +++ b/.github/scripts/in_config.sh @@ -0,0 +1,8 @@ +#!/bin/bash +echo -n "Verify configure line '$1' .. " +lines1=(`cat "./configure.out" | grep -c "$1"`) +if [[ "$lines1" -lt "1" ]]; then + echo "NOT FOUND" + exit 1 +fi +echo "OK" |
From: <al...@us...> - 2023-03-19 18:41:15
|
This is an automated email from the git hooks/post-receive-user script. allura pushed a commit to branch master in repository libspectrum. View the commit online: https://sourceforge.net/p/fuse-emulator/libspectrum/ci/48b887d8562623bd7cc97ef6534937f18dc20f6f/ commit 48b887d8562623bd7cc97ef6534937f18dc20f6f Author: Miroslav Ďurčík / Arki55 <mir...@gm...> AuthorDate: Wed Feb 15 23:39:08 2023 +0100 arki55/features/T9-github-build-checks (libspectrum) build: Implementing buld & test workflow for platform Windows. - DOne similarly as for Linux before. - Only combinations with fake glib tested. Libspectrum without fake glib not supported under Windows. - Workflows executed on push (commits) and pull requests. - COnfigurable workflow for building library with parameters in reusable build_windows_sub.yml workflow. Will be called from Fuse APP and Fuse utils repos. --- .github/workflows/build_windows.yml | 56 ++++++++ .github/workflows/build_windows_sub.yml | 239 ++++++++++++++++++++++++++++++++ 2 files changed, 295 insertions(+) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 0000000..1b84909 --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,56 @@ +name: Libspectrum for Windows +run-name: Build and test Libspectrum for Windows / ${{ github.actor }} / + +# Executed upon each commit pushed, merge commit in PR +on: [push, pull_request] + +jobs: + # 1. Default = all libs enabled, fake glib is always used + default: + name: "Libspectrum + all libs (Windows)" + uses: ./.github/workflows/build_windows_sub.yml + with: + key: "default" + + # 2. Without zlib + no-zlib: + name: "Libspectrum w/o zlib (Windows)" + uses: ./.github/workflows/build_windows_sub.yml + with: + key: "no-zlib" + use_zlib: false + + # 3. Without bzip2 + no-bzip2: + name: "Libspectrum w/o bzip2 (Windows)" + uses: ./.github/workflows/build_windows_sub.yml + with: + key: "no-bzip2" + use_bzip2: false + + # 4. Without libgcrypt + no-libgcrypt: + name: "Libspectrum w/o libgcrypt (Windows)" + uses: ./.github/workflows/build_windows_sub.yml + with: + key: "no-libgcrypt" + use_libgcrypt: false + + # 5. Without libaudiofile + no-libaudiofile: + name: "Libspectrum w/o libaudiofile (Windows)" + uses: ./.github/workflows/build_windows_sub.yml + with: + key: "no-libaudiofile" + use_libaudiofile: false + + # 6. Without all libs + no-libs: + name: "Libspectrum w/o all libs (Windows)" + uses: ./.github/workflows/build_windows_sub.yml + with: + key: "no-libs" + use_zlib: false + use_bzip2: false + use_libgcrypt: false + use_libaudiofile: false diff --git a/.github/workflows/build_windows_sub.yml b/.github/workflows/build_windows_sub.yml new file mode 100644 index 0000000..fee857c --- /dev/null +++ b/.github/workflows/build_windows_sub.yml @@ -0,0 +1,239 @@ +name: Libspectrum for Windows +run-name: Build and test Libspectrum for Windows / ${{ github.actor }} / + +on: + # Called from fuse app, fuse utils repos + workflow_call: + inputs: + # Name this setup (no spaces please) + key: + type: string + required: true + # Path where to clone + path: + type: string + required: false + default: '.' + # Which branch to checkout + branch: + type: string + required: false + default: "" + # Configure supported libs + use_zlib: + type: boolean + required: false + default: true + use_bzip2: + type: boolean + required: false + default: true + use_libgcrypt: + type: boolean + required: false + default: true + use_libaudiofile: + type: boolean + required: false + default: true + # Repo is taken from var.LIBSPECTRUM_REPO, cannot be passed as input. + +jobs: + build: + name: Build & Test + runs-on: windows-latest + timeout-minutes: 15 + defaults: + run: + shell: bash.exe --login --norc -eo pipefail -o igncr '{0}' + working-directory: ${{ inputs.path || '.' }} + env: + CYGWIN_NOWINPATH: 1 + + # Custom build libraries + CPPFLAGS: "-I/usr/local/i686-w64-mingw32/include" + LDFLAGS: "-L/usr/local/i686-w64-mingw32/lib" + PKG_CONFIG_LIBDIR: "/usr/local/i686-w64-mingw32/lib/pkgconfig:/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig" + # Small help when copying dlls + CYGWIN_LIBDIR: "/usr/i686-w64-mingw32/sys-root/mingw/bin/" + + # Support push and call triggers, set env.variables + LIBSPECTRUM_REPO: ${{ vars.LIBSPECTRUM_REPO || '' }} + LIBSPECTRUM_BRANCH: ${{ inputs.branch || '' }} + LIBSPECTRUM_PATH: ${{ inputs.path || '.' }} + + steps: + - name: (1) Prepare environment + run: | + cd ${GITHUB_WORKSPACE} + + echo "Adjust autocrlf in git.." + git config --global core.autocrlf input + + echo "Libspectrum repo: $LIBSPECTRUM_REPO" + echo "Libspectrum branch: $LIBSPECTRUM_BRANCH" + echo "Libspectrum path: $LIBSPECTRUM_PATH" + + echo "Use lib zlib: ${{ inputs.use_zlib && 'yes' || 'no' }}" + echo "Use lib bzip2: ${{ inputs.use_bzip2 && 'yes' || 'no' }}" + echo "Use lib libgcrypt: ${{ inputs.use_libgcrypt && 'yes' || 'no' }}" + echo "Use lib libaudiofile: ${{ inputs.use_libaudiofile && 'yes' || 'no' }}" + + - name: (2) Check out repository code + uses: actions/checkout@v3 + with: + repository: ${{ env.LIBSPECTRUM_REPO }} + ref: ${{ env.LIBSPECTRUM_BRANCH }} + path: ${{ env.LIBSPECTRUM_PATH }} + + - name: (3) Restore Cygwin packages + id: cygwin-cache-load + uses: actions/cache/restore@v3 + with: + path: | + C:\cygwin-packages + key: cygwin-packages-libspectrum-1 + + - name: (4) Install Cygwin (32 bit) with libs + uses: cygwin/cygwin-install-action@master + with: + platform: x86 + packages: | + audiofile \ + autoconf \ + automake \ + bison \ + flex \ + gcc-core \ + gcc-g++ \ + gettext-devel \ + libtool \ + libaudiofile-devel \ + make \ + mingw64-i686-audiofile \ + mingw64-i686-bzip2 \ + mingw64-i686-gcc-core \ + mingw64-i686-gcc-g++ \ + mingw64-i686-libgcrypt \ + mingw64-i686-libgpg-error \ + mingw64-i686-libpng \ + mingw64-i686-win-iconv \ + mingw64-i686-winpthread \ + mingw64-i686-zlib \ + pkg-config + # All libs are always installed to have just one cache key + + - name: (5) Save Cygwin packages + id: cygwin-cache-save + if: steps.cygwin-cache-load.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: | + C:\cygwin-packages + key: cygwin-packages-libspectrum-1 + + - name: (6) Autogen.sh + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running autogen.sh .." + ./autogen.sh + + - name: (7) Configure for Windows (fake glib) + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running configure .." + ./configure \ + --build=i686-pc-cygwin \ + --host=i686-w64-mingw32 \ + --prefix=/usr/local/i686-w64-mingw32 \ + --disable-static \ + --with-fake-glib \ + ${{ inputs.use_zlib == false && '--without-zlib' || '' }} \ + ${{ inputs.use_bzip2 == false && '--without-bzip2' || '' }} \ + ${{ inputs.use_libgcrypt == false && '--without-libgcrypt' || '' }} \ + ${{ inputs.use_libaudiofile == false && '--without-libaudiofile' || '' }} \ + | tee ./configure.out + + - name: (8) Verify output from configure + run: | + cd ${GITHUB_WORKSPACE} + + .github/scripts/in_config.sh "libspectrum is ready to be compiled" + .github/scripts/in_config.sh "zlib support: ${{ inputs.use_zlib && 'yes' || 'no' }}" + .github/scripts/in_config.sh "bzip2 support: ${{ inputs.use_bzip2 && 'yes' || 'no' }}" + .github/scripts/in_config.sh "libgcrypt support: ${{ inputs.use_libgcrypt && 'yes' || 'no' }}" + .github/scripts/in_config.sh "libaudiofile support: ${{ inputs.use_libaudiofile && 'yes' || 'no' }}" + .github/scripts/in_config.sh "Internal GLib replacement: yes" + + - name: (9) Make + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make .." + make + + - name: (10) Install + run: | + cd ${GITHUB_WORKSPACE} + + echo "Running make install-strip .." + make install-strip + + - name: (11) Copy dependency dlls + run: | + cd ${GITHUB_WORKSPACE} + + echo "Copying mandatory dependency dlls.." + cp ${CYGWIN_LIBDIR}libgcc_s_sjlj-1.dll . + cp ${CYGWIN_LIBDIR}libwinpthread-1.dll . + cp ${CYGWIN_LIBDIR}libgpg-error-0.dll . + cp ${CYGWIN_LIBDIR}libstdc++-6.dll . + + echo "Copying optional dependency dlls.." + ${{ inputs.use_zlib && 'cp ${CYGWIN_LIBDIR}zlib1.dll .' || ''}} + ${{ inputs.use_bzip2 && 'cp ${CYGWIN_LIBDIR}libbz2-1.dll .' || ''}} + ${{ inputs.use_libgcrypt && 'cp ${CYGWIN_LIBDIR}libgcrypt-20.dll .' || ''}} + ${{ inputs.use_libaudiofile && 'cp ${CYGWIN_LIBDIR}libaudiofile-1.dll .' || ''}} + ${{ inputs.use_libaudiofile && 'cp ${CYGWIN_LIBDIR}libFLAC-8.dll .' || ''}} + ${{ inputs.use_libaudiofile && 'cp ${CYGWIN_LIBDIR}libOGG-0.dll .' || ''}} + + echo "Copying own dll.." + cp .libs/libspectrum-9.dll . + + - name: (12) Run tests + id: run-tests + run: | + cd ${GITHUB_WORKSPACE} + + echo "Bulding and running tests .." + make check + + - name: (13) Verbose check tests (on failure) + if: failure() && steps.run-tests.outcome != 'success' + run: | + cd ${GITHUB_WORKSPACE} + + echo "Listing all tests individually .." + test/test.exe + + - name: (14) Pack installed library files + # Need to pack files to maintain permissions + run: | + cd ${GITHUB_WORKSPACE} + + tar -cvf \ + libspectrum-installed-windows.tar \ + -C /usr/local/i686-w64-mingw32/ . + + - name: (15) Upload generated tar file + uses: actions/upload-artifact@v3 + with: + name: libspectrum-installed-windows-${{ inputs.key }} + path: | + libspectrum-installed-windows.tar + + - name: (16) Finish + run: | + echo "🍏 Finishing with status ${{ job.status }}." |