Skip to content

Fix issue #224#225

Merged
RetroAntho merged 1 commit intoalekmaul:developfrom
daniel-starke:issue-224
Aug 7, 2023
Merged

Fix issue #224#225
RetroAntho merged 1 commit intoalekmaul:developfrom
daniel-starke:issue-224

Conversation

@daniel-starke
Copy link
Copy Markdown
Contributor

  • add libpcre2 to the MSYS2 build workflow
  • change 816-opt Makefile to use libpcre2 instead of libtre for regex on Windows
  • change 816-opt/src/helpers.h to use PCRE2 header instead of regex.h (same API) on Windows

See also https://github.com/daniel-starke/pvsneslib/actions/runs/5684683944.
Reference: #224

- add PCRE2 to the MSYS2 build workflow
- change 816-opt Makefile to use PCRE2 instead of libtre for regex on
  Windows
- change 816-opt/src/helpers.h to use PCRE2 header instead of regex.h
  (same API) on Windows

Signed-off-by: Daniel Starke <[email protected]>
@RetroAntho
Copy link
Copy Markdown
Collaborator

Hello, thanks for it! It is ok for me. @kobenairb do you want to do some checks?

@kobenairb
Copy link
Copy Markdown
Contributor

kobenairb commented Aug 7, 2023

Hello guys,

to be sure of having understood correctly, here the goal is to pass from the regex lib to the pcre2 lib? If so, why does the function https://github.com/alekmaul/pvsneslib/blob/bcfab3f2a9266d1446734677c5a2122351e1d029/tools/816-opt/src/helpers.c#L272C10-L272C26 still use regex.h? I think we have to rewrite this function first to use pcre2, otherwise I don't see the meaning of this change. Also, it will also be necessary to adapt the dependencies for MacOS and Linux (github action and Makefile). Tell me if I'm talking nonsense.

I also found this pr on the subject, where we had tried to migrate from regex to pcre (not pcre2), and the problem encountered on windows to compile 816-opt statically: #200.

@daniel-starke
Copy link
Copy Markdown
Contributor Author

This is a migration from libtre (not maintained anymore) to libpcre2 for Windows only.
Linux and MacOS (regex.h support from posix base layer) remain unchanged.
Static build was no issue for me by using -DPCRE2_STATIC (see test run).

@kobenairb
Copy link
Copy Markdown
Contributor

kobenairb commented Aug 7, 2023

Perfect, I did well to ask I hadn't quite understood why this only concerned windows. So @RetroAntho, it's okay for me. Thanks a lot @daniel-starke

@RetroAntho RetroAntho merged commit e14ab8f into alekmaul:develop Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants