Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
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
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
magicseteditor
Commits
4eadae9c
Commit
4eadae9c
authored
Dec 21, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added compact syntax for package dependencies:
"depends on: package version"
parent
c81123a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
doc/type/dependency.txt
doc/type/dependency.txt
+5
-1
src/mse.vcproj
src/mse.vcproj
+6
-0
src/util/io/package.cpp
src/util/io/package.cpp
+19
-3
No files found.
doc/type/dependency.txt
View file @
4eadae9c
...
@@ -5,13 +5,17 @@ Data type: dependency
...
@@ -5,13 +5,17 @@ Data type: dependency
[[type:Package]]s can depend on other packages.
[[type:Package]]s can depend on other packages.
For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s.
For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s.
--Pro
ep
rties--
--Pro
pe
rties--
! Property Type Description
! Property Type Description
| @package@ [[type:string]] Filename of the package this package depends on.
| @package@ [[type:string]] Filename of the package this package depends on.
| @version@ [[type:version]] Minimal version of that package that is required.
| @version@ [[type:version]] Minimal version of that package that is required.
The two properties can also be written on a single line, separated by a space (see the examples).
--Example--
--Example--
The magic-new stylesheet depends on a particular version of the game file:
The magic-new stylesheet depends on a particular version of the game file:
>depends on:
>depends on:
> package: magic.mse-game
> package: magic.mse-game
> version: 2007-06-06
> version: 2007-06-06
This can be written more compactly as
>depends on: magic.mse-game 2007-06-06
src/mse.vcproj
View file @
4eadae9c
...
@@ -615,6 +615,12 @@
...
@@ -615,6 +615,12 @@
<File
<File
RelativePath=
".\gui\control\package_list.hpp"
>
RelativePath=
".\gui\control\package_list.hpp"
>
</File>
</File>
<File
RelativePath=
".\gui\control\tree_list.cpp"
>
</File>
<File
RelativePath=
".\gui\control\tree_list.hpp"
>
</File>
<Filter
<Filter
Name=
"card_list"
Name=
"card_list"
Filter=
""
>
Filter=
""
>
...
...
src/util/io/package.cpp
View file @
4eadae9c
...
@@ -436,9 +436,25 @@ String Package::toStandardName(const String& name) {
...
@@ -436,9 +436,25 @@ String Package::toStandardName(const String& name) {
// ----------------------------------------------------------------------------- : Packaged
// ----------------------------------------------------------------------------- : Packaged
IMPLEMENT_REFLECTION
(
PackageDependency
)
{
template
<>
void
Reader
::
handle
(
PackageDependency
&
dep
)
{
REFLECT
(
package
);
if
(
!
isComplex
())
{
REFLECT
(
version
);
handle
(
dep
.
package
);
size_t
pos
=
dep
.
package
.
find_first_of
(
_
(
' '
));
if
(
pos
!=
String
::
npos
)
{
dep
.
version
=
Version
::
fromString
(
dep
.
package
.
substr
(
pos
+
1
));
dep
.
package
=
dep
.
package
.
substr
(
0
,
pos
);
}
}
else
{
handle
(
_
(
"package"
),
dep
.
package
);
handle
(
_
(
"version"
),
dep
.
version
);
}
}
template
<>
void
Writer
::
handle
(
const
PackageDependency
&
dep
)
{
if
(
dep
.
version
!=
Version
())
{
handle
(
dep
.
package
+
_
(
" "
)
+
dep
.
version
.
toString
());
}
else
{
handle
(
dep
.
package
);
}
}
}
// note: reflection must be declared before it is used
// note: reflection must be declared before it is used
...
...
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