Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tome
Tales of MajEyal
Commits
bbd75a72
There was a problem fetching the pipeline summary.
Commit
bbd75a72
authored
8 years ago
by
DarkGod
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.net-core.org:tome/t-engine4
parents
9f876948
d31dd280
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
utils/boot-osx-standalone-apple-sucks.lua
+80
-0
80 additions, 0 deletions
utils/boot-osx-standalone-apple-sucks.lua
utils/release.sh
+2
-1
2 additions, 1 deletion
utils/release.sh
with
82 additions
and
1 deletion
utils/boot-osx-standalone-apple-sucks.lua
0 → 100644
+
80
−
0
View file @
bbd75a72
-- This file is the very first lua file loaded
-- It will be called before anything else is setup, including paths
-- Usualy it will be put inside a zip that is concatenated to the executable itself
--[[ Example to move the saves somewhere else
local old = fs.getHomePath()
function fs.getHomePath() return old:gsub("T%-Engine", "BoneToBeWild"):gsub("t%-engine", "bone-to-be-wild") end
]]
print
(
"Booting T-Engine from: "
..
tostring
(
__SELFEXE
))
-- Mount the engine, either from a path guessed from SELFEXE, or directly from current dir
if
__SELFEXE
then
local
dir
=
__SELFEXE
-- Remove bin/Debug from the path, to make dev easier
dir
=
dir
:
gsub
(
"bin"
..fs.getPathSeparator
()
..
"Debug"
..
fs
.
getPathSeparator
(),
""
)
if
not
__APPLE__
then
-- Now remove executable name
dir
=
dir
:
gsub
(
"
(
.*"
..fs.getPathSeparator
()
..
").+"
,
"%1"
)
else
-- This is a little un-OSX like: we grab our data from the folder containing T-Engine.app
-- It is a bit strange but way way better for people to install addons and such
-- dir = dir:gsub("(.*"..fs.getPathSeparator()..").+", "%1"):gsub("(.*"..fs.getPathSeparator()..").+", "%1"):gsub("(.*"..fs.getPathSeparator()..").+", "%1")
dir
=
dir
:
gsub
(
"
(
.*"
..fs.getPathSeparator
()
..
").+"
,
"%1"
)
..
fs
.
getPathSeparator
()
..
"Resources"
..
fs
.
getPathSeparator
()
end
print
(
"SelfExe gave us app directory of:"
,
dir
)
fs
.
mount
(
dir
..
fs
.
getPathSeparator
()
..
"game"
..
fs
.
getPathSeparator
()
..
"thirdparty"
,
"/"
,
true
)
fs
.
mount
(
dir
..
fs
.
getPathSeparator
()
..
"game"
,
"/"
,
true
)
else
print
(
"No SelfExe, using basic path"
)
fs
.
mount
(
"game"
..
fs
.
getPathSeparator
()
..
"thirdparty"
,
"/"
,
true
)
fs
.
mount
(
"game"
,
"/"
,
true
)
end
-- Look for a core
function
get_core
(
coretype
,
id
)
coretype
=
coretype
or
"te4core"
local
homepath
=
fs
.
getUserPath
()
..
fs
.
getPathSeparator
()
..
fs
.
getHomePath
()
..
fs
.
getPathSeparator
()
..
"4.0"
fs
.
mount
(
homepath
,
"/"
,
1
)
-- Look for possible cores - if id is -1 then check all the ones matching the given type and use the newest one
local
usable
=
{}
for
i
,
file
in
ipairs
(
fs
.
list
(
"/engines/cores/"
))
do
if
file
:
find
(
"%.tec$"
)
then
print
(
"Looking for cores"
,
coretype
,
id
,
" <=> "
,
file
)
if
id
>
0
and
file
==
coretype
..
"-"
..
id
..
".tec"
then
usable
[
#
usable
+
1
]
=
{
file
=
file
,
id
=
id
}
print
(
"Possible engine core"
,
file
)
elseif
id
==
-
1
and
file
:
find
(
coretype
)
then
local
_
,
_
,
cid
=
file
:
find
(
"%-([0-9]+)%.tec$"
)
cid
=
tonumber
(
cid
)
if
cid
then
usable
[
#
usable
+
1
]
=
{
file
=
file
,
id
=
cid
}
print
(
"Possible engine core"
,
file
)
end
end
end
end
-- Order the cores to find the newest
table.sort
(
usable
,
function
(
a
,
b
)
return
b
.
id
<
a
.
id
end
)
for
i
,
file
in
ipairs
(
usable
)
do
print
(
"Selected cores:"
,
file
.
id
,
file
.
file
)
end
-- Check for sanity and tell the runner to use it
local
core
=
"/engines/cores/"
..
usable
[
1
].
file
if
fs
.
exists
(
core
)
then
local
rcore
=
fs
.
getRealPath
(
core
)
print
(
"Using TE4CORE: "
,
core
,
rcore
)
fs
.
umount
(
homepath
)
return
rcore
end
fs
.
umount
(
homepath
)
return
"NO CORE"
end
-- We need it no more, lets forget about it just it case some malovelant script tried something silly
__SELFEXE
=
nil
This diff is collapsed.
Click to expand it.
utils/release.sh
+
2
−
1
View file @
bbd75a72
...
...
@@ -108,7 +108,8 @@ cd t-engine4-osx-"$ver"
mkdir
T-Engine.app/
cp
-a
../../mac/base_app/
*
T-Engine.app/
cp
-a
../../bootstrap/ T-Engine.app/Contents/MacOS/
cp
-a
../t-engine4-src-
"
$ver
"
/game/
.
cp
../../utils/boot-osx-standalone-apple-sucks.lua T-Engine.app/Contents/MacOS/bootstrap/boot.lua
cp
-a
../t-engine4-src-
"
$ver
"
/game/ T-Engine.app/Contents/Resources/
cp
-a
../../C
*
.
find
.
-name
'*~'
-or
-name
'.svn'
| xargs
rm
-rf
zip
-r
-9
../t-engine4-osx-
"
$ver
"
.zip
*
...
...
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