Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows API systems without UTF-16 APIs #3631

Closed
glebm opened this issue Sep 10, 2023 · 3 comments · Fixed by #3636
Closed

Windows API systems without UTF-16 APIs #3631

glebm opened this issue Sep 10, 2023 · 3 comments · Fixed by #3636

Comments

@glebm
Copy link
Contributor

glebm commented Sep 10, 2023

Currently the Windows build assumes that WriteConsoleW is available.

None of the Unicode stuff is actually available on Windows 98 (and similar API level systems such as the original Xbox).

Would you be OK with adding a build option to disable it? I can send a PR if so.
Is FMT_WINDOWS_HAS_UNICODE_APIS a good name for the build option?

Alternatively, perhaps we could add an option to disable the entire print subsystem (something like set(FMT_PRINT OFF))

@vitaut
Copy link
Contributor

vitaut commented Sep 11, 2023

Windows 98 has been discontinued many years ago. Why should we care about supporting it? Is it for some kind of a retro computing project?

@glebm
Copy link
Contributor Author

glebm commented Sep 11, 2023

It'd be cool to have DevilutionX run on the original platform it launched on.
This is of course just for fun, it's not meant to be useful.

glebm added a commit to glebm/fmt that referenced this issue Sep 12, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)
    set(FMT_WINDOWS_NO_WCHAR ON)

Fixes fmtlib#3631
@glebm
Copy link
Contributor Author

glebm commented Sep 12, 2023

I've sent a PR in #3636. The change is tiny and it eliminates the need for us to maintain our own libfmt fork.

glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)
    set(FMT_WINDOWS_NO_WCHAR ON)

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)
    set(FMT_WINDOWS_NO_WCHAR ON)

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)
    set(FMT_WINDOWS_NO_WCHAR ON)

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

`FMT_WINDOWS_NO_WCHAR` is detected automatically in 2 cases:

1. Missing `<io.h>` on the original Xbox
2. A defined `WINVER` on properly configured Windows projects

In other cases, one can `add_definitions(FMT_WINDOWS_NO_WCHAR)`
in the fmt subproject.

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

It is not exposed as a CMake option but one can define it manually
in the fmt subproject, e.g.:

    target_compile_definitions(fmt PUBLIC FMT_WINDOWS_NO_WCHAR)

Fixes fmtlib#3631
glebm added a commit to glebm/fmt that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

It is not exposed as a CMake option but one can define it manually
in the fmt subproject, e.g.:

    target_compile_definitions(fmt PUBLIC FMT_WINDOWS_NO_WCHAR)

Fixes fmtlib#3631
vitaut pushed a commit that referenced this issue Sep 17, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

It is not exposed as a CMake option but one can define it manually
in the fmt subproject, e.g.:

    target_compile_definitions(fmt PUBLIC FMT_WINDOWS_NO_WCHAR)

Fixes #3631
ckerr pushed a commit to transmission/fmt that referenced this issue Nov 7, 2023
With this, fmt can be used on Windows 98 and the Original Xbox with:

    set(FMT_OS OFF)

It is not exposed as a CMake option but one can define it manually
in the fmt subproject, e.g.:

    target_compile_definitions(fmt PUBLIC FMT_WINDOWS_NO_WCHAR)

Fixes fmtlib#3631
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 a pull request may close this issue.

2 participants