Skip to content

支持msys2的编译#2661

Merged
mercury233 merged 8 commits into
Fluorohydride:masterfrom
yybbwc:patch
Jun 1, 2025
Merged

支持msys2的编译#2661
mercury233 merged 8 commits into
Fluorohydride:masterfrom
yybbwc:patch

Conversation

@yybbwc

@yybbwc yybbwc commented Feb 8, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@yybbwc

yybbwc commented Feb 8, 2025

Copy link
Copy Markdown
Contributor Author

不知道会不会影响其他的编译方式。

Comment thread gframe/config.h Outdated
template<size_t N, typename... TR>
inline int myswprintf(wchar_t(&buf)[N], const wchar_t* fmt, TR... args) {
return std::swprintf(buf, N, fmt, args...);
return swprintf(buf, N, fmt, args...);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use #ifdef if you need so

Comment thread gframe/myfilesystem.h Outdated
static void TraversalDir(const wchar_t* wpath, const std::function<void(const wchar_t*, bool)>& cb) {
wchar_t findstr[1024];
std::swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%s/*", wpath);
swprintf(findstr, sizeof findstr / sizeof findstr[0], L"%s/*", wpath);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use #ifdef if you need so

@salix5

salix5 commented Feb 8, 2025

Copy link
Copy Markdown
Collaborator

現代的C++標準建議使用 std::swprintf
如果你的編譯器不能,那通常是你的編譯器設定有問題
而不是ygopro有問題
我想改回swprintf並不在考慮範圍內

@salix5

salix5 commented Feb 9, 2025

Copy link
Copy Markdown
Collaborator

https://github.com/Fluorohydride/ygopro/wiki/Windows%E4%B8%8A%E7%BC%96%E8%AF%91
這裡的說明是3年前的版本
由於後來發現其他問題
mercury233/irrlicht又另外改過

現在要改成直接使用
https://github.com/mercury233/irrlicht

細節詳見
mercury233/irrlicht#4

@mercury233

Copy link
Copy Markdown
Collaborator

需要一个完整的msys2编译文档

@yybbwc

yybbwc commented Feb 9, 2025

Copy link
Copy Markdown
Contributor Author

需要一个完整的msys2编译文档

“# 用msys2编译ygopro

步骤

  • 打开https://www.msys2.org
  • 下载exe
  • 运行exe
  • 进入msys文件夹,运行ucrt64.exe
  • 用msys自带的pacman安装clang
pacman -S mingw-w64-ucrt-x86_64-clang
pacman -S mingw-w64-ucrt-x86_64-irrlicht
pacman -S mingw-w64-ucrt-x86_64-freetype
pacman -S mingw-w64-ucrt-x86_64-lua
pacman -S mingw-w64-ucrt-x86_64-libevent
pacman -S mingw-w64-ucrt-x86_64-sqlite3
pacman -S mingw-w64-ucrt-x86_64-premake
pacman -S mingw-w64-ucrt-x86_64-make
pacman -S git
git clone --depth 1 https://github.com/Fluorohydride/ygopro
cd ygopro
git submodule update --init
premake gmake2
mingw32-make

补充

  • 这只是总体步骤,暂时跑不起来
    ”这样?

@purerosefallen

Copy link
Copy Markdown
Collaborator

Does it make any improvements?

@yybbwc

yybbwc commented Feb 9, 2025

Copy link
Copy Markdown
Contributor Author

Does it make any improvements?

似乎没有。
但是不加这3行,我的msys2就编译不了ygopro。

@purerosefallen purerosefallen mentioned this pull request Feb 13, 2025
@mercury233

Copy link
Copy Markdown
Collaborator

I guess it should be __MINGW32__ or __MINGW64__

@mercury233 mercury233 merged commit a0cb105 into Fluorohydride:master Jun 1, 2025
8 checks passed
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.

4 participants