Skip to content

refactor(language): Remove legacy code for loading Language9x.ini, HeaderTemplate9x.ini#1534

Merged
xezon merged 2 commits intoTheSuperHackers:mainfrom
xezon:xezon/remove-language9x
Sep 5, 2025
Merged

refactor(language): Remove legacy code for loading Language9x.ini, HeaderTemplate9x.ini#1534
xezon merged 2 commits intoTheSuperHackers:mainfrom
xezon:xezon/remove-language9x

Conversation

@xezon
Copy link

@xezon xezon commented Sep 4, 2025

This change removes the legacy code for loading Language9x.ini, HeaderTemplate9x.ini for Windows 95, 98, ME systems. It was used by Chinese and Korean localizations only.

TODO

  • Replicate to Generals

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Refactor Edits the code with insignificant behavior changes, is never user facing labels Sep 4, 2025
@xezon xezon force-pushed the xezon/remove-language9x branch from 7368c8e to 70975c9 Compare September 4, 2025 09:15
@xezon
Copy link
Author

xezon commented Sep 4, 2025

Rebased and conflicts solved.

Copy link

@Mauller Mauller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple, looks good.

@xezon xezon force-pushed the xezon/remove-language9x branch from f8b43be to d675f8f Compare September 5, 2025 06:35
@xezon
Copy link
Author

xezon commented Sep 5, 2025

Replicated to Generals with conflicts

D:\Projects\TheSuperHackers\GeneralsGameCode>FOR /F "delims=" %b IN ('git merge-base --fork-point main') DO git diff %b  1>changes.patch

D:\Projects\TheSuperHackers\GeneralsGameCode>git diff bd2699aad507fa2522e05e2c44412b27cd241525  1>changes.patch

D:\Projects\TheSuperHackers\GeneralsGameCode>git apply -p2 --directory=Generals --reject --whitespace=fix changes.patch
Checking patch Generals/Code/GameEngine/Source/GameClient/GUI/HeaderTemplate.cpp...
Checking patch Generals/Code/GameEngine/Source/GameClient/GlobalLanguage.cpp...
error: while searching for:

void GlobalLanguage::init( void )
{

        INI ini;
        AsciiString fname;
        fname.format("Data\\%s\\Language", GetRegistryLanguage().str());

        OSVERSIONINFO   osvi;
        osvi.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);

        //GS NOTE: Must call doesFileExist in either case so that NameKeyGenerator will stay in sync
        AsciiString tempName;
        tempName.format("Data\\%s\\Language9x.ini", GetRegistryLanguage().str());
        bool isExist = TheFileSystem->doesFileExist(tempName.str());
        if (GetVersionEx(&osvi)  &&  osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS  && isExist)
        {       //check if we're running Win9x variant since they may need different fonts
                fname = tempName;
        }


        ini.loadFileDirectory( fname, INI_LOAD_OVERWRITE, NULL );
        StringListIt it = m_localFonts.begin();
        while( it != m_localFonts.end())
        {

error: patch failed: Generals/Code/GameEngine/Source/GameClient/GlobalLanguage.cpp:135
Applied patch Generals/Code/GameEngine/Source/GameClient/GUI/HeaderTemplate.cpp cleanly.
Applying patch Generals/Code/GameEngine/Source/GameClient/GlobalLanguage.cpp with 1 reject...
Rejected hunk #1.

@xezon xezon merged commit 22623db into TheSuperHackers:main Sep 5, 2025
18 checks passed
@xezon xezon deleted the xezon/remove-language9x branch September 5, 2025 07:00
fbraz3 pushed a commit to fbraz3/GeneralsX that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants