Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: groovymame diff file line endings format  (Read 2114 times)

0 Members and 1 Guest are viewing this topic.

El Santo

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:September 19, 2018, 05:18:46 pm
  • I want to build my own arcade controls!
groovymame diff file line endings format
« on: September 18, 2018, 04:09:49 pm »
Hi there.

I am a linux user than want to build grooyvmame myself, buy I always get errors related to line endings format when running patch

I have tried with mame sources for windows (mame0200s.exe), mame sources for all platforms (mame0200s.zip), patching with and without --binary, and with diff file as downloaded (with CRLF line terminators) and with a diff file that has been processed with dos2unix. In all cases I (the eight different cases) get errors when patching because line endings format.

Is there a way to apply groovymame patch cleanly on linux? or maybe a full source code already patched ready for download?

Thank you and regards.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: groovymame diff file line endings format
« Reply #1 on: September 19, 2018, 03:36:03 am »
Hi El Santo,

In order to apply the patch you have to convert some files first. Here is the complete command.

Code: [Select]
unix2dos  3rdparty/bgfx/include/bgfx/bgfx.h 3rdparty/bgfx/src/bgfx.cpp 3rdparty/bgfx/src/bgfx_p.h 3rdparty/bgfx/src/config.h 3rdparty/bgfx/src/renderer_d3d11.cpp

ZoOl007

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 161
  • Last login:August 02, 2020, 12:03:38 pm
    • RGBcommander
Re: groovymame diff file line endings format
« Reply #2 on: September 19, 2018, 07:59:10 am »
Hi,

I created a shell script for that purpose. Please find it attached.
Put the diff with the source, copy the script in there, make the script executable and run it. It contains instructions.
Apply patch, build mame.

regards
« Last Edit: September 19, 2018, 08:03:14 am by ZoOl007 »

El Santo

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 2
  • Last login:September 19, 2018, 05:18:46 pm
  • I want to build my own arcade controls!
Re: groovymame diff file line endings format
« Reply #3 on: September 19, 2018, 04:51:27 pm »
Thank you ZoOl007 and Doozer for answering.

With Doozer method, I still can't apply the patch cleanly.

Code: [Select]
$ unix2dos  3rdparty/bgfx/include/bgfx/bgfx.h 3rdparty/bgfx/src/bgfx.cpp 3rdparty/bgfx/src/bgfx_p.h 3rdparty/bgfx/src/config.h 3rdparty/bgfx/src/renderer_d3d11.cpp
unix2dos: convirtiendo archivo 3rdparty/bgfx/include/bgfx/bgfx.h a formato DOS...
unix2dos: convirtiendo archivo 3rdparty/bgfx/src/bgfx.cpp a formato DOS...
unix2dos: convirtiendo archivo 3rdparty/bgfx/src/bgfx_p.h a formato DOS...
unix2dos: convirtiendo archivo 3rdparty/bgfx/src/config.h a formato DOS...
unix2dos: convirtiendo archivo 3rdparty/bgfx/src/renderer_d3d11.cpp a formato DOS...
$ patch -p0 -E <0200_groovymame_017i.diff                                                                            (Stripping trailing CRs from patch; use --binary to disable.)
patching file 3rdparty/bgfx/include/bgfx/bgfx.h
Hunk #1 FAILED at 360 (different line endings).
Hunk #2 FAILED at 1810 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file 3rdparty/bgfx/include/bgfx/bgfx.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file 3rdparty/bgfx/src/bgfx.cpp
Hunk #1 FAILED at 292 (different line endings).
Hunk #2 FAILED at 2817 (different line endings).
Hunk #3 FAILED at 2898 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file 3rdparty/bgfx/src/bgfx.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file 3rdparty/bgfx/src/bgfx_p.h
Hunk #1 FAILED at 178 (different line endings).
Hunk #2 FAILED at 1562 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file 3rdparty/bgfx/src/bgfx_p.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file 3rdparty/bgfx/src/config.h
Hunk #1 FAILED at 179 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file 3rdparty/bgfx/src/config.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file 3rdparty/bgfx/src/renderer_d3d11.cpp
Hunk #1 FAILED at 2 (different line endings).
Hunk #2 FAILED at 1065 (different line endings).
Hunk #3 FAILED at 1248 (different line endings).
Hunk #4 FAILED at 1749 (different line endings).
Hunk #5 FAILED at 1799 (different line endings).
Hunk #6 FAILED at 1819 (different line endings).
Hunk #7 FAILED at 2463 (different line endings).
Hunk #8 FAILED at 2521 (different line endings).
Hunk #9 FAILED at 2556 (different line endings).
9 out of 9 hunks FAILED -- saving rejects to file 3rdparty/bgfx/src/renderer_d3d11.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file scripts/src/emu.lua
Hunk #1 FAILED at 257 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file scripts/src/emu.lua.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file scripts/src/osd/sdl.lua
Hunk #1 FAILED at 41 (different line endings).
Hunk #2 FAILED at 417 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file scripts/src/osd/sdl.lua.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file scripts/src/osd/sdl_cfg.lua
Hunk #1 FAILED at 115 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file scripts/src/osd/sdl_cfg.lua.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file scripts/src/osd/windows.lua
Hunk #1 FAILED at 169 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file scripts/src/osd/windows.lua.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/drivenum.cpp
Hunk #1 FAILED at 277 (different line endings).
Hunk #2 FAILED at 287 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/emu/drivenum.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/drivers/empty.cpp
Hunk #1 FAILED at 50 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/emu/drivers/empty.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/emu.h
Hunk #1 FAILED at 83 (different line endings).
Hunk #2 FAILED at 108 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/emu/emu.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/emuopts.cpp
Hunk #1 FAILED at 85 (different line endings).
Hunk #2 FAILED at 112 (different line endings).
Hunk #3 FAILED at 220 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/emu/emuopts.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/emuopts.h
Hunk #1 FAILED at 72 (different line endings).
Hunk #2 FAILED at 197 (different line endings).
Hunk #3 FAILED at 354 (different line endings).
Hunk #4 FAILED at 452 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file src/emu/emuopts.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/machine.cpp
Hunk #1 FAILED at 134 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/emu/machine.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/machine.h
Hunk #1 FAILED at 257 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/emu/machine.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/sound.cpp
Hunk #1 FAILED at 842 (different line endings).
Hunk #2 FAILED at 1053 (different line endings).
Hunk #3 FAILED at 1065 (different line endings).
Hunk #4 FAILED at 1089 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file src/emu/sound.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/sound.h
Hunk #1 FAILED at 223 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/emu/sound.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/modeline.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/modeline.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/monitor.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/monitor.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/switchres.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/switchres.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/switchres_proto.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/switchres/util.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/video.cpp
Hunk #1 FAILED at 52 (different line endings).
Hunk #2 FAILED at 87 (different line endings).
Hunk #3 FAILED at 241 (different line endings).
Hunk #4 FAILED at 261 (different line endings).
Hunk #5 FAILED at 708 (different line endings).
Hunk #6 FAILED at 930 (different line endings).
Hunk #7 FAILED at 1197 (different line endings).
7 out of 7 hunks FAILED -- saving rejects to file src/emu/video.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/emu/video.h
Hunk #1 FAILED at 30 (different line endings).
Hunk #2 FAILED at 58 (different line endings).
Hunk #3 FAILED at 67 (different line endings).
Hunk #4 FAILED at 159 (different line endings).
Hunk #5 FAILED at 212 (different line endings).
5 out of 5 hunks FAILED -- saving rejects to file src/emu/video.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontend/mame/clifront.cpp
Hunk #1 FAILED at 1721 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/frontend/mame/clifront.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontend/mame/mameopts.h
Hunk #1 FAILED at 29 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/frontend/mame/mameopts.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontend/mame/ui/info.cpp
Hunk #1 FAILED at 395 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/frontend/mame/ui/info.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontend/mame/ui/submenu.cpp
Hunk #1 FAILED at 111 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/frontend/mame/ui/submenu.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontend/mame/ui/ui.cpp
Hunk #1 FAILED at 1373 (different line endings).
Hunk #2 FAILED at 1540 (different line endings).
Hunk #3 FAILED at 1604 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/frontend/mame/ui/ui.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/frontend/mame/ui/ui.h
Hunk #1 FAILED at 77 (different line endings).
Hunk #2 FAILED at 273 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/frontend/mame/ui/ui.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/input/input_module.h
Hunk #1 FAILED at 26 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/input/input_module.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/input/input_sdlcommon.cpp
Hunk #1 FAILED at 279 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/input/input_sdlcommon.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/input/input_windows.cpp
Hunk #1 FAILED at 63 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/input/input_windows.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/lib/osdobj_common.cpp
Hunk #1 FAILED at 55 (different line endings).
Hunk #2 FAILED at 87 (different line endings).
Hunk #3 FAILED at 125 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/modules/lib/osdobj_common.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/lib/osdobj_common.h
Hunk #1 FAILED at 49 (different line endings).
Hunk #2 FAILED at 119 (different line endings).
Hunk #3 FAILED at 150 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/modules/lib/osdobj_common.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/osdwindow.h
Hunk #1 FAILED at 213 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/osdwindow.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/bgfx/chainmanager.cpp
Hunk #1 FAILED at 280 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/render/bgfx/chainmanager.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/d3d/d3dhlsl.h
Hunk #1 FAILED at 282 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/render/d3d/d3dhlsl.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/drawbgfx.cpp
Hunk #1 FAILED at 221 (different line endings).
Hunk #2 FAILED at 273 (different line endings).
Hunk #3 FAILED at 794 (different line endings).
Hunk #4 FAILED at 919 (different line endings).
Hunk #5 FAILED at 931 (different line endings).
5 out of 5 hunks FAILED -- saving rejects to file src/osd/modules/render/drawbgfx.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/drawbgfx.h
Hunk #1 FAILED at 46 (different line endings).
Hunk #2 FAILED at 158 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/osd/modules/render/drawbgfx.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/drawd3d.cpp
Hunk #1 FAILED at 45 (different line endings).
Hunk #2 FAILED at 53 (different line endings).
Hunk #3 FAILED at 180 (different line endings).
Hunk #4 FAILED at 728 (different line endings).
Hunk #5 FAILED at 742 (different line endings).
Hunk #6 FAILED at 751 (different line endings).
Hunk #7 FAILED at 867 (different line endings).
Hunk #8 FAILED at 1176 (different line endings).
Hunk #9 FAILED at 1194 (different line endings).
Hunk #10 FAILED at 1210 (different line endings).
Hunk #11 FAILED at 1293 (different line endings).
Hunk #12 FAILED at 1334 (different line endings).
Hunk #13 FAILED at 1345 (different line endings).
13 out of 13 hunks FAILED -- saving rejects to file src/osd/modules/render/drawd3d.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/drawd3d.h
Hunk #1 FAILED at 67 (different line endings).
Hunk #2 FAILED at 134 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/osd/modules/render/drawd3d.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/drawogl.cpp
Hunk #1 FAILED at 36 (different line endings).
Hunk #2 FAILED at 236 (different line endings).
Hunk #3 FAILED at 566 (different line endings).
Hunk #4 FAILED at 593 (different line endings).
Hunk #5 FAILED at 1373 (different line endings).
Hunk #6 FAILED at 1599 (different line endings).
6 out of 6 hunks FAILED -- saving rejects to file src/osd/modules/render/drawogl.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/render/drawogl.h
Hunk #1 FAILED at 120 (different line endings).
Hunk #2 FAILED at 230 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/osd/modules/render/drawogl.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/sound/direct_sound.cpp
Hunk #1 FAILED at 432 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/sound/direct_sound.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/modules/sound/sdl_sound.cpp
Hunk #1 FAILED at 406 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/modules/sound/sdl_sound.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/osdcore.cpp
Hunk #1 FAILED at 175 (different line endings).
Hunk #2 FAILED at 191 (different line endings).
Hunk #3 FAILED at 200 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/osdcore.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/osdepend.h
Hunk #1 FAILED at 64 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/osdepend.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/sdl/osdsdl.h
Hunk #1 FAILED at 20 (different line endings).
Hunk #2 FAILED at 122 (different line endings).
Hunk #3 FAILED at 140 (different line endings).
Hunk #4 FAILED at 149 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file src/osd/sdl/osdsdl.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/sdl/sdlmain.cpp
Hunk #1 FAILED at 62 (different line endings).
Hunk #2 FAILED at 257 (different line endings).
Hunk #3 FAILED at 414 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/sdl/sdlmain.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/sdl/switchres_sdl.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/sdl/video.cpp
Hunk #1 FAILED at 93 (different line endings).
Hunk #2 FAILED at 109 (different line endings).
Hunk #3 FAILED at 239 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/sdl/video.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/sdl/window.cpp
Hunk #1 FAILED at 80 (different line endings).
Hunk #2 FAILED at 349 (different line endings).
Hunk #3 FAILED at 488 (different line endings).
Hunk #4 FAILED at 581 (different line endings).
4 out of 4 hunks FAILED -- saving rejects to file src/osd/sdl/window.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/sdl/window.h
Hunk #1 FAILED at 73 (different line endings).
Hunk #2 FAILED at 105 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/osd/sdl/window.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_adl.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_adl.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_ati.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_ati.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_ati_family.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_pstrip.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/custom_video_pstrip.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/switchres_windows.cpp
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/video.cpp
Hunk #1 FAILED at 95 (different line endings).
Hunk #2 FAILED at 182 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file src/osd/windows/video.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/window.cpp
Hunk #1 FAILED at 53 (different line endings).
Hunk #2 FAILED at 90 (different line endings).
Hunk #3 FAILED at 320 (different line endings).
Hunk #4 FAILED at 782 (different line endings).
Hunk #5 FAILED at 816 (different line endings).
Hunk #6 FAILED at 830 (different line endings).
Hunk #7 FAILED at 838 (different line endings).
Hunk #8 FAILED at 866 (different line endings).
Hunk #9 FAILED at 880 (different line endings).
Hunk #10 FAILED at 1147 (different line endings).
Hunk #11 FAILED at 1291 (different line endings).
Hunk #12 FAILED at 1739 (different line endings).
Hunk #13 FAILED at 1756 (different line endings).
Hunk #14 FAILED at 1823 (different line endings).
14 out of 14 hunks FAILED -- saving rejects to file src/osd/windows/window.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/window.h
Hunk #1 FAILED at 86 (different line endings).
Hunk #2 FAILED at 121 (different line endings).
Hunk #3 FAILED at 136 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/windows/window.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/winmain.cpp
Hunk #1 FAILED at 45 (different line endings).
Hunk #2 FAILED at 515 (different line endings).
Hunk #3 FAILED at 596 (different line endings).
3 out of 3 hunks FAILED -- saving rejects to file src/osd/windows/winmain.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file src/osd/windows/winmain.h
Hunk #1 FAILED at 258 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file src/osd/windows/winmain.h.rej

With ZoOl007 method I can apply the patch cleanly but only if the diff file is already copied on source directory before running the command, so the diff file is also processed by sourceConvertor.sh, as you said in your post (but I only red after a first failed attempt :-) )

Building now....

Thank you very much and regards.

RobeeJ

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 120
  • Last login:Today at 05:03:50 am
Re: groovymame diff file line endings format
« Reply #4 on: September 20, 2018, 03:36:46 am »
This is what I use each release, based on the following directory structure in Linux, which is a subdir that has the downloaded initial zip file unzipped (it always contains a single file called mame.zip):

Code: [Select]
mame181/
mame181/mame.zip

It includes the suppression patch, which still works, but you can skip steps with that, and editing the makefile (joe is the text editor I use) if you don't want to worry about ARCHOPTS.

Code: [Select]
cp ../suppression_0189u0.txt .
dos2unix 0181_groovymame_016_alpha5.patch
dos2unix suppression_0189u0.txt
mkdir 181
cd 181
unzip ../mame.zip
dos2unix $(grep 'diff -Nru' ../0181_groovymame_016_alpha5.patch | cut -d ' ' -f 4)
patch -p0 -E < ../0181_groovymame_016_alpha5.patch 
dos2unix $(grep 'diff -Nru' ../suppression_0189u0.txt | cut -d ' ' -f 4)
patch -p0 -E < ../suppression_0189u0.txt
joe makefile
screen
make -j4

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: groovymame diff file line endings format
« Reply #5 on: September 21, 2018, 11:06:01 am »

With Doozer method, I still can't apply the patch cleanly.


I am only using patch -p0 --binary and it applies without any issue.

Process:
- create folder and cd into it
- unzip mame0201s.zip
- unzip mame.zip
- unix2dos the files (not dos2unix)
- cat 0200_groovymame_017i.diff | patch -p0 --binary

No rejection at all.

ouput of 'patch -p0 --dry --binary -R' on groovymame 0.201:
Code: [Select]
checking file 3rdparty/bgfx/include/bgfx/bgfx.h
checking file 3rdparty/bgfx/src/bgfx.cpp
checking file 3rdparty/bgfx/src/bgfx_p.h
checking file 3rdparty/bgfx/src/config.h
checking file 3rdparty/bgfx/src/renderer_d3d11.cpp
checking file scripts/src/emu.lua
checking file scripts/src/osd/sdl.lua
checking file scripts/src/osd/sdl_cfg.lua
checking file scripts/src/osd/windows.lua
checking file src/emu/drivenum.cpp
checking file src/emu/drivers/empty.cpp
checking file src/emu/emu.h
checking file src/emu/emuopts.cpp
checking file src/emu/emuopts.h
checking file src/emu/machine.cpp
checking file src/emu/machine.h
checking file src/emu/sound.cpp
Hunk #1 succeeded at 871 (offset 29 lines).
Hunk #2 succeeded at 1082 (offset 29 lines).
Hunk #3 succeeded at 1094 (offset 29 lines).
Hunk #4 succeeded at 1118 (offset 29 lines).
checking file src/emu/sound.h
checking file src/emu/switchres/modeline.cpp
checking file src/emu/switchres/modeline.h
checking file src/emu/switchres/monitor.cpp
checking file src/emu/switchres/monitor.h
checking file src/emu/switchres/switchres.cpp
checking file src/emu/switchres/switchres.h
checking file src/emu/switchres/switchres_proto.h
checking file src/emu/switchres/util.cpp
checking file src/emu/video.cpp
checking file src/emu/video.h
checking file src/frontend/mame/clifront.cpp
Hunk #1 succeeded at 1719 (offset -2 lines).
checking file src/frontend/mame/mameopts.h
checking file src/frontend/mame/ui/info.cpp
checking file src/frontend/mame/ui/submenu.cpp
checking file src/frontend/mame/ui/ui.cpp
Hunk #1 succeeded at 1378 (offset 5 lines).
Hunk #2 succeeded at 1545 (offset 5 lines).
Hunk #3 succeeded at 1609 (offset 5 lines).
checking file src/frontend/mame/ui/ui.h
checking file src/osd/modules/input/input_module.h
checking file src/osd/modules/input/input_sdlcommon.cpp
Hunk #1 succeeded at 280 (offset 1 line).
checking file src/osd/modules/input/input_windows.cpp
checking file src/osd/modules/lib/osdobj_common.cpp
checking file src/osd/modules/lib/osdobj_common.h
checking file src/osd/modules/osdwindow.h
checking file src/osd/modules/render/bgfx/chainmanager.cpp
checking file src/osd/modules/render/d3d/d3dhlsl.h
checking file src/osd/modules/render/drawbgfx.cpp
Hunk #3 succeeded at 791 (offset -3 lines).
Hunk #4 succeeded at 916 (offset -3 lines).
Hunk #5 succeeded at 928 (offset -3 lines).
checking file src/osd/modules/render/drawbgfx.h
checking file src/osd/modules/render/drawd3d.cpp
Hunk #4 succeeded at 729 (offset 1 line).
Hunk #5 succeeded at 743 (offset 1 line).
Hunk #6 succeeded at 752 (offset 1 line).
Hunk #7 succeeded at 868 (offset 1 line).
Hunk #8 succeeded at 1177 (offset 1 line).
Hunk #9 succeeded at 1195 (offset 1 line).
Hunk #10 succeeded at 1211 (offset 1 line).
Hunk #11 succeeded at 1294 (offset 1 line).
Hunk #12 succeeded at 1335 (offset 1 line).
Hunk #13 succeeded at 1346 (offset 1 line).
checking file src/osd/modules/render/drawd3d.h
checking file src/osd/modules/render/drawogl.cpp
checking file src/osd/modules/render/drawogl.h
checking file src/osd/modules/sound/direct_sound.cpp
checking file src/osd/modules/sound/sdl_sound.cpp
checking file src/osd/osdcore.cpp   
checking file src/osd/osdepend.h
checking file src/osd/sdl/osdsdl.h 
checking file src/osd/sdl/sdlmain.cpp
checking file src/osd/sdl/switchres_sdl.cpp
checking file src/osd/sdl/video.cpp
checking file src/osd/sdl/window.cpp
checking file src/osd/sdl/window.h 
checking file src/osd/windows/custom_video.cpp
checking file src/osd/windows/custom_video.h
checking file src/osd/windows/custom_video_adl.cpp
checking file src/osd/windows/custom_video_adl.h
checking file src/osd/windows/custom_video_ati.cpp
checking file src/osd/windows/custom_video_ati.h
checking file src/osd/windows/custom_video_ati_family.cpp
checking file src/osd/windows/custom_video_pstrip.cpp
checking file src/osd/windows/custom_video_pstrip.h
checking file src/osd/windows/switchres_windows.cpp
checking file src/osd/windows/video.cpp
checking file src/osd/windows/window.cpp
checking file src/osd/windows/window.h
checking file src/osd/windows/winmain.cpp
checking file src/osd/windows/winmain.h