Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rd-ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
苍蓝
rd-ygopro
Commits
bb38fb2a
Commit
bb38fb2a
authored
Jan 15, 2022
by
Peter Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile server on MacOS
parent
43459c83
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
5 deletions
+47
-5
README.md
README.md
+14
-0
gframe/gframe.cpp
gframe/gframe.cpp
+1
-1
gframe/premake4.lua
gframe/premake4.lua
+5
-1
premake/lua/premake5.lua
premake/lua/premake5.lua
+20
-0
premake5.lua
premake5.lua
+7
-3
No files found.
README.md
View file @
bb38fb2a
...
...
@@ -24,6 +24,20 @@
*
sqlite3
*
可参考本项目
[
appveyor.yml
](
https://github.com/mycard/ygopro/blob/server/appveyor.yml
)
中的脚本
### MacOS下编译
*
需要以下组件或工具
*
clang
*
premake5
*
libevent
*
lua5.3
*
sqlite3
*
参考步骤
*
安装libevent sqlite3
*
编译premake5
*
wget https://www.lua.org/ftp/lua-5.4.3.tar.gz && tar xf lua-5.4.3.tar.gz && mv lua-5.4.3 lua && cp premake/lua/
*
lua/
*
./premake5 gmake --cc=clang
*
cd build && make config=release
### 运行
*
使用
[
ygopro-server
](
https://github.com/mycard/ygopro-server
)
运行
*
手动运行的参数是
...
...
gframe/gframe.cpp
View file @
bb38fb2a
...
...
@@ -27,7 +27,7 @@ int main(int argc, char* argv[]) {
#ifndef _WIN32
setlocale
(
LC_CTYPE
,
"UTF-8"
);
#endif
#if
def __APPLE__
#if
defined __APPLE__ && !defined YGOPRO_SERVER_MODE
CFURLRef
bundle_url
=
CFBundleCopyBundleURL
(
CFBundleGetMainBundle
());
CFURLRef
bundle_base_url
=
CFURLCreateCopyDeletingLastPathComponent
(
NULL
,
bundle_url
);
CFRelease
(
bundle_url
);
...
...
gframe/premake4.lua
View file @
bb38fb2a
...
...
@@ -20,7 +20,11 @@ project "ygopro"
files
"ygopro.rc"
includedirs
{
"../event/include"
,
"../sqlite3"
}
links
{
"ws2_32"
,
"lua"
}
configuration
"linux"
links
{
"lua5.3-c++"
}
configuration
"macosx"
links
{
"lua"
}
configuration
"not vs*"
buildoptions
{
"-std=c++14"
,
"-fno-rtti"
}
configuration
"not windows"
links
{
"
lua5.3-c++"
,
"event_pthreads"
,
"dl"
,
"pthread"
}
links
{
"
event_pthreads"
,
"dl"
,
"pthread"
}
premake/lua/premake5.lua
0 → 100644
View file @
bb38fb2a
project
"lua"
kind
"StaticLib"
files
{
"src/*.c"
,
"src/*.h"
,
"src/*.hpp"
}
removefiles
{
"src/lua.c"
,
"src/luac.c"
}
filter
"action:vs*"
buildoptions
{
"/TP"
}
filter
"not action:vs*"
buildoptions
{
"-x c++"
}
filter
"system:bsd"
defines
{
"LUA_USE_POSIX"
}
filter
"system:macosx"
defines
{
"LUA_USE_MACOSX"
}
filter
"system:linux"
defines
{
"LUA_USE_LINUX"
}
premake5.lua
View file @
bb38fb2a
...
...
@@ -57,3 +57,7 @@ solution "ygo"
include
"event"
include
"sqlite3"
end
if
os
.
ishost
(
"macosx"
)
then
include
"lua"
LDFLAGS
=
"-framework Cocoa"
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment