Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
142d0013
Commit
142d0013
authored
4 years ago
by
svornost
Browse files
Options
Downloads
Patches
Plain Diff
Write commit hash for batch file builds if git is installed
parent
66b38a58
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6972
Write commit hash for batch file builds if git is installed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compile.bat
+24
-0
24 additions, 0 deletions
compile.bat
compile_debug+sanityCheck.bat
+0
-8
0 additions, 8 deletions
compile_debug+sanityCheck.bat
with
24 additions
and
8 deletions
compile.bat
+
24
−
0
View file @
142d0013
...
@@ -3,6 +3,29 @@
...
@@ -3,6 +3,29 @@
:: Set working directory
:: Set working directory
pushd
%~dp0
pushd
%~dp0
:: See if we can find a git installation
setlocal
enabledelayedexpansion
for
%%k
in
(
HKCU
HKLM
)
do
(
for
%%w
in
(
\ \Wow6432Node\
)
do
(
for
/f
"skip=2 delims=: tokens=1*"
%%a
in
(
'reg query "
%%k
\SOFTWARE
%%wMicrosoft
\Windows\CurrentVersion\Uninstall\Git_is1" /v InstallLocation 2
^>
nul'
)
do
(
for
/f
"tokens=3"
%%z
in
(
"
%%a
"
)
do
(
set
GIT
=
%%z
:
%%b
set
GITFOUND
=
yes
goto
FOUND
)
)
)
)
:FOUND
if
%GITFOUND%
==
yes
(
set
"PATH=
%GIT%
bin;
%PATH%
"
echo
|
set
/p
out
=
"App.Version.commitHash = "
>
"
%~dp0
src\002-config\fc-version.js.commitHash.js"
git
rev
-parse --sq --short
HEAD
>>
"
%~dp0
src\002-config\fc-version.js.commitHash.js"
echo
|
set
/p
out
=
";"
>>
"
%~dp0
src\002-config\fc-version.js.commitHash.js"
)
if
not
exist
"bin\resources"
mkdir
bin
\resources
if
not
exist
"bin\resources"
mkdir
bin
\resources
CALL
devTools
/concatFiles
.bat
js
\
"*.js"
bin
\fc.js
CALL
devTools
/concatFiles
.bat
js
\
"*.js"
bin
\fc.js
:: Run the appropriate compiler for the user's CPU architecture.
:: Run the appropriate compiler for the user's CPU architecture.
...
@@ -12,6 +35,7 @@ if %PROCESSOR_ARCHITECTURE% == AMD64 (
...
@@ -12,6 +35,7 @@ if %PROCESSOR_ARCHITECTURE% == AMD64 (
CALL
"
%~dp0
devTools\tweeGo\tweego_win86.exe"
-o
"
%~dp0
bin/FC_pregmod.html"
--module
=
bin
/fc
.js
--head
devTools
/head
.html
"
%~dp0
src"
CALL
"
%~dp0
devTools\tweeGo\tweego_win86.exe"
-o
"
%~dp0
bin/FC_pregmod.html"
--module
=
bin
/fc
.js
--head
devTools
/head
.html
"
%~dp0
src"
)
)
DEL
bin
\fc.js
DEL
bin
\fc.js
DEL
"
%~dp0
src\002-config\fc-version.js.commitHash.js"
popd
popd
ECHO
Done
ECHO
Done
This diff is collapsed.
Click to expand it.
compile_debug+sanityCheck.bat
+
0
−
8
View file @
142d0013
...
@@ -27,13 +27,5 @@ if %GITFOUND% == yes (
...
@@ -27,13 +27,5 @@ if %GITFOUND% == yes (
:: Compile the game
:: Compile the game
call
"
%~dp0
compile.bat"
call
"
%~dp0
compile.bat"
if
%GITFOUND%
==
yes
(
::
Make
the
output
prettier
,
replacing
\t
with
a
tab
and
\n
with
a
newline
bash
-c
"sed -i -e '/
^.
*<div id=\"
store
-area
\
".*$/s/\\\t/\t/g' -e '/
^.
*<div id=\"
store
-area
\
".*$/s/\\\n/\n/g' bin/FC_pregmod.html"
::
Revert
./src/init/storyInit.tw
for
next
compilation
git
checkout
--
./src/init/storyInit.tw
)
popd
popd
PAUSE
PAUSE
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment