Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-database
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
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
MyCard
ygopro-database
Commits
56e7be88
Commit
56e7be88
authored
May 08, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bat
parent
ec84eb27
Pipeline
#36060
passed with stage
in 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
31 deletions
+37
-31
setup.bat
setup.bat
+37
-31
No files found.
setup.bat
View file @
56e7be88
...
...
@@ -3,55 +3,61 @@ setlocal enabledelayedexpansion
echo
[
INFO
]
Checking
for
sqlite3
.exe
...
:: 1. Check environment or local path
REM 1. Try PATH
where
sqlite3
.exe
>
nul
2
>
nul
if
%errorlevel%
==
0
(
set
"SQLITE3_BIN=sqlite3.exe"
echo
[
OK
]
Found
sqlite3
.exe
in
PATH
)
else
if
exist
".\bin\sqlite3.exe"
(
goto
:gitconfig
)
REM 2. Try bin/sqlite3.exe
if
exist
"bin\sqlite3.exe"
(
echo
[
OK
]
Found
bin
\sqlite3.exe
set
"SQLITE3_BIN=bin\sqlite3.exe"
echo
[
OK
]
Found
sqlite3
.exe
in
bin
\
)
else
(
echo
[
INFO
]
sqlite3
.exe
not
found
—
downloading
...
mkdir
bin
>
nul
2
>
nul
goto
:gitconfig
)
set
"SQLITE_URL=https://sqlite.org/2025/sqlite-tools-win-x64-3490200.zip"
set
"SQLITE_ZIP=bin\sqlite3.zip"
REM 3. Not found — download
echo
[
INFO
]
sqlite3
not
found
—
downloading
...
if
not
exist
"
%SQLITE_ZIP%
"
(
echo
[
DOWNLOAD
]
Downloading
SQLite
tools
...
powershell
-Command
"Invoke-WebRequest -Uri '
%SQLITE_URL%
' -OutFile '
%SQLITE_ZIP%
'"
||
goto
:fail
_download
)
set
"ZIP_URL=https://sqlite.org/2025/sqlite-tools-win-x64-3490200.zip"
set
"ZIP_FILE=bin\sqlite3.zip"
set
"UNZIP_DIR=bin"
echo
[
UNZIP
]
Extracting
...
powershell
-Command
"Expand-Archive -Path '
%SQLITE_ZIP%
' -DestinationPath 'bin' -Force"
||
goto
:fail
_unzip
if
not
exist
bin
(
mkdir
bin
)
if
not
exist
"bin\sqlite3.exe"
(
echo
[
ERROR
]
Failed
to
find
sqlite3
.exe
after
extraction
.
exit
/b
1
)
echo
[
DOWNLOAD
]
Fetching
SQLite
...
curl
-L -o
"
%ZIP_FILE%
"
"
%ZIP_URL%
"
if
errorlevel
1
(
echo
[
ERROR
]
Failed
to
download
sqlite3
zip
.
exit
/b
1
)
set
"SQLITE3_BIN=bin\sqlite3.exe"
echo
[
OK
]
sqlite3
installed
at
:
%SQLITE3
_BIN
%
echo
[
UNZIP
]
Extracting
...
unzip
-o
"
%ZIP_FILE%
"
-d
"
%UNZIP_DIR%
"
if
errorlevel
1
(
echo
[
ERROR
]
Failed
to
unzip
SQLite
tools
.
exit
/b
1
)
:: 2. Git merge driver
if
not
exist
"bin\sqlite3.exe"
(
echo
[
ERROR
]
sqlite3
.exe
not
found
after
extraction
.
exit
/b
1
)
set
"SQLITE3_BIN=bin\sqlite3.exe"
echo
[
OK
]
sqlite3
installed
to
%SQLITE3
_BIN
%
:gitconfig
echo
[
CONFIG
]
Setting
up
Git
merge
driver
...
git
config
merge
.sqlite
-merge
.name
"SQLite dump merge"
git
config
merge
.sqlite
-merge
.driver
"scripts/sqlite-merge.sh
%%O
%%A
%%B
%%L
%%P
"
:: 3. Git diff driver
echo
[
CONFIG
]
Setting
up
Git
diff
driver
...
git
config
diff
.sqlite
-diff
.textconv
"scripts/sqlite-diff.sh"
git
config
diff
.sqlite
-diff
.prompt
false
echo
[
DONE
]
Git
merge
&
diff
drivers
configured
successfully
.
exit
/b
0
:fail
_download
echo
[
ERROR
]
Failed
to
download
sqlite3
.
exit
/b
1
:fail
_unzip
echo
[
ERROR
]
Failed
to
extract
sqlite3
.zip.
exit
/b
1
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