Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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
nanahira
ygopro-core
Commits
7c5e63c1
Commit
7c5e63c1
authored
Mar 25, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sqlite3
parent
d9579e2f
Pipeline
#34162
failed with stages
in 2 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
.gitlab-ci.yml
.gitlab-ci.yml
+9
-2
premake/dll.lua
premake/dll.lua
+35
-0
No files found.
.gitlab-ci.yml
View file @
7c5e63c1
...
@@ -15,9 +15,12 @@ lua:
...
@@ -15,9 +15,12 @@ lua:
-
wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/lua-5.4.4.tar.gz | tar zfx -
-
wget -O - https://cdn02.moecube.com:444/ygopro-build-materials/lua-5.4.4.tar.gz | tar zfx -
-
mv lua-5.4.4 lua
-
mv lua-5.4.4 lua
-
cp premake/lua.lua lua/premake5.lua
-
cp premake/lua.lua lua/premake5.lua
-
wget -O - https://cdn01.moecube.com/ygopro-build-materials/sqlite-autoconf-3360000.tar.gz | tar zfx -
-
mv sqlite-autoconf-3360000 sqlite3
artifacts
:
artifacts
:
paths
:
paths
:
-
lua
-
lua
-
sqlite3
mat_windows
:
mat_windows
:
stage
:
prepare
stage
:
prepare
...
@@ -56,12 +59,13 @@ mat_macos:
...
@@ -56,12 +59,13 @@ mat_macos:
PREMAKE5_PATH
:
premake5
PREMAKE5_PATH
:
premake5
script
:
script
:
-
ln -sf premake/dll.lua .
-
ln -sf premake/dll.lua .
-
$PREMAKE5_PATH gmake --file=dll.lua --os=$PREMAKE_OS
-
$PREMAKE5_PATH gmake --file=dll.lua --os=$PREMAKE_OS
--sqlite3-dir=sqlite3
-
cd build
-
cd build
-
make config=release_${BUILD_TYPE} -j$(nproc)
-
make config=release_${BUILD_TYPE} -j$(nproc)
-
cd ..
-
cd ..
-
mkdir -p dist/$BUILD_TYPE
-
mkdir -p dist/$BUILD_TYPE
-
cp $DIST_PATH/libocgcore.* dist/$BUILD_TYPE/
-
cp $DIST_PATH/libocgcore.* dist/$BUILD_TYPE/
-
cp $DIST_PATH/libsqlite3.* dist/$BUILD_TYPE/
artifacts
:
artifacts
:
paths
:
paths
:
-
dist
-
dist
...
@@ -97,7 +101,7 @@ build_wasm:
...
@@ -97,7 +101,7 @@ build_wasm:
-
vs
-
vs
before_script
:
before_script
:
-
copy premake\dll.lua dll.lua
-
copy premake\dll.lua dll.lua
-
'
.\premake5.exe
vs2019
--file=dll.lua'
-
'
.\premake5.exe
vs2019
--file=dll.lua
--sqlite3-dir=sqlite3
'
-
mkdir dist
-
mkdir dist
artifacts
:
artifacts
:
paths
:
paths
:
...
@@ -109,6 +113,7 @@ build_windows_x32:
...
@@ -109,6 +113,7 @@ build_windows_x32:
-
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ocgcoredll.sln /t:Build /p:Configuration=Release /p:Platform=Win32'
-
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ocgcoredll.sln /t:Build /p:Configuration=Release /p:Platform=Win32'
-
mkdir dist\x32
-
mkdir dist\x32
-
copy build\bin\x32\Release\ocgcore.dll dist\x32\ocgcore.dll
-
copy build\bin\x32\Release\ocgcore.dll dist\x32\ocgcore.dll
-
copy build\bin\x32\Release\sqlite3.dll dist\x32\sqlite3.dll
build_windows_x64
:
build_windows_x64
:
extends
:
.build_windows
extends
:
.build_windows
...
@@ -116,6 +121,7 @@ build_windows_x64:
...
@@ -116,6 +121,7 @@ build_windows_x64:
-
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ocgcoredll.sln /t:Build /p:Configuration=Release /p:Platform=x64'
-
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ocgcoredll.sln /t:Build /p:Configuration=Release /p:Platform=x64'
-
mkdir dist\x64
-
mkdir dist\x64
-
copy build\bin\x64\Release\ocgcore.dll dist\x64\ocgcore.dll
-
copy build\bin\x64\Release\ocgcore.dll dist\x64\ocgcore.dll
-
copy build\bin\x64\Release\sqlite3.dll dist\x64\sqlite3.dll
.build_macos_arch
:
.build_macos_arch
:
extends
:
.build_unix
extends
:
.build_unix
...
@@ -148,6 +154,7 @@ build_macos:
...
@@ -148,6 +154,7 @@ build_macos:
script
:
script
:
-
mkdir -p dist/macos
-
mkdir -p dist/macos
-
lipo -create -output dist/macos/libocgcore.dylib dist/x64/libocgcore.dylib dist/arm64/libocgcore.dylib
-
lipo -create -output dist/macos/libocgcore.dylib dist/x64/libocgcore.dylib dist/arm64/libocgcore.dylib
-
lipo -create -output dist/macos/libsqlite3.dylib dist/x64/libsqlite3.dylib dist/arm64/libsqlite3.dylib
-
rm -rf dist/x64 dist/arm64
-
rm -rf dist/x64 dist/arm64
artifacts
:
artifacts
:
paths
:
paths
:
...
...
premake/dll.lua
View file @
7c5e63c1
newoption
{
trigger
=
"lua-dir"
,
description
=
""
,
value
=
"PATH"
,
default
=
"./lua"
}
newoption
{
trigger
=
"lua-dir"
,
description
=
""
,
value
=
"PATH"
,
default
=
"./lua"
}
newoption
{
trigger
=
"wasm"
,
description
=
""
}
newoption
{
trigger
=
"wasm"
,
description
=
""
}
newoption
{
trigger
=
"sqlite3-dir"
,
description
=
""
,
value
=
"PATH"
}
function
GetParam
(
param
)
function
GetParam
(
param
)
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
return
_OPTIONS
[
param
]
or
os.getenv
(
string.upper
(
string.gsub
(
param
,
"-"
,
"_"
)))
...
@@ -12,6 +13,8 @@ end
...
@@ -12,6 +13,8 @@ end
WASM
=
GetParam
(
"wasm"
)
WASM
=
GetParam
(
"wasm"
)
SQLITE3_DIR
=
GetParam
(
"sqlite3-dir"
)
workspace
"ocgcoredll"
workspace
"ocgcoredll"
location
"build"
location
"build"
language
"C++"
language
"C++"
...
@@ -95,3 +98,35 @@ project "ocgcore"
...
@@ -95,3 +98,35 @@ project "ocgcore"
filter
"system:emscripten"
filter
"system:emscripten"
targetextension
".wasm"
targetextension
".wasm"
linkoptions
{
"-s MODULARIZE=1"
,
"-s EXPORT_NAME=\"
createOcgcore
\
""
,
"--no-entry"
,
"-s EXPORTED_FUNCTIONS=[\"
_set_script_reader
\
",\"
_set_card_reader
\
",\"
_set_message_handler
\
",\"
_create_duel
\
",\"
_start_duel
\
",\"
_end_duel
\
",\"
_set_player_info
\
",\"
_get_log_message
\
",\"
_get_message
\
",\"
_process
\
",\"
_new_card
\
",\"
_new_tag_card
\
",\"
_query_card
\
",\"
_query_field_count
\
",\"
_query_field_card
\
",\"
_query_field_info
\
",\"
_set_responsei
\
",\"
_set_responseb
\
",\"
_preload_script
\
"]"
,
"-s ENVIRONMENT=web,node"
,
"-s EXPORTED_RUNTIME_METHODS=[\"
ccall
\
",\"
cwrap
\
",\"
addFunction
\
",\"
removeFunction
\
"]"
,
"-s ALLOW_TABLE_GROWTH=1"
,
"-s ALLOW_MEMORY_GROWTH=1"
,
"-o ../wasm/libocgcore.js"
}
linkoptions
{
"-s MODULARIZE=1"
,
"-s EXPORT_NAME=\"
createOcgcore
\
""
,
"--no-entry"
,
"-s EXPORTED_FUNCTIONS=[\"
_set_script_reader
\
",\"
_set_card_reader
\
",\"
_set_message_handler
\
",\"
_create_duel
\
",\"
_start_duel
\
",\"
_end_duel
\
",\"
_set_player_info
\
",\"
_get_log_message
\
",\"
_get_message
\
",\"
_process
\
",\"
_new_card
\
",\"
_new_tag_card
\
",\"
_query_card
\
",\"
_query_field_count
\
",\"
_query_field_card
\
",\"
_query_field_info
\
",\"
_set_responsei
\
",\"
_set_responseb
\
",\"
_preload_script
\
"]"
,
"-s ENVIRONMENT=web,node"
,
"-s EXPORTED_RUNTIME_METHODS=[\"
ccall
\
",\"
cwrap
\
",\"
addFunction
\
",\"
removeFunction
\
"]"
,
"-s ALLOW_TABLE_GROWTH=1"
,
"-s ALLOW_MEMORY_GROWTH=1"
,
"-o ../wasm/libocgcore.js"
}
if
not
WASM
and
SQLITE3_DIR
and
os
.
isdir
(
SQLITE3_DIR
)
then
project
"sqlite3"
kind
"SharedLib"
language
"C"
files
{
SQLITE3_DIR
..
"/sqlite3.c"
,
SQLITE3_DIR
..
"/sqlite3.h"
}
-- 系统相关
filter
"system:windows"
systemversion
"latest"
defines
{
"SQLITE_API=__declspec(dllexport)"
}
filter
"system:linux or system:macosx"
pic
"On"
defines
{
"SQLITE_API=__attribute__((visibility(\"
default
\
")))"
}
filter
"system:linux"
linkoptions
{
"-static-libstdc++"
,
"-static-libgcc"
}
-- 配置项
filter
"configurations:Debug"
symbols
"On"
defines
{
"DEBUG"
}
filter
"configurations:Release"
optimize
"On"
defines
{
"NDEBUG"
}
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