Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ben Centin
Sunrise Launcher
Commits
92c5602c
Commit
92c5602c
authored
May 21, 2020
by
Archnoc
Browse files
rename launch option from title to name; bug fix
parent
c23e56dd
Changes
5
Hide whitespace changes
Inline
Side-by-side
LICENSE
View file @
92c5602c
MIT License
MIT License
Copyright (c) 2020
Archnoc
Copyright (c) 2020
Sunrise Project
Permission is hereby granted, free of charge, to any person obtaining a copy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
of this software and associated documentation files (the "Software"), to deal
...
...
Manifest.cs
View file @
92c5602c
...
@@ -33,8 +33,8 @@ namespace sunrise_launcher
...
@@ -33,8 +33,8 @@ namespace sunrise_launcher
public
class
LaunchOption
public
class
LaunchOption
{
{
[
JsonPropertyName
(
"
titl
e"
)]
[
JsonPropertyName
(
"
nam
e"
)]
public
string
Titl
e
{
get
;
set
;
}
public
string
Nam
e
{
get
;
set
;
}
[
JsonPropertyName
(
"path"
)]
[
JsonPropertyName
(
"path"
)]
public
string
LaunchPath
{
get
;
set
;
}
public
string
LaunchPath
{
get
;
set
;
}
[
JsonPropertyName
(
"env"
)]
[
JsonPropertyName
(
"env"
)]
...
...
ServerList.cs
View file @
92c5602c
...
@@ -123,12 +123,13 @@ namespace sunrise_launcher
...
@@ -123,12 +123,13 @@ namespace sunrise_launcher
ShowMessage
(
"Server add failed."
);
ShowMessage
(
"Server add failed."
);
return
;
return
;
}
}
server
.
Metadata
.
Version
=
""
;
Servers
.
Add
(
server
);
Servers
.
Add
(
server
);
Selected
=
server
.
ManifestURL
;
Selected
=
server
.
ManifestURL
;
this
.
ActivateSignal
(
"update"
);
this
.
ActivateSignal
(
"update"
);
await
UpdateAsync
(
server
,
fals
e
);
await
UpdateAsync
(
server
,
tru
e
);
this
.
ActivateSignal
(
"update"
);
this
.
ActivateSignal
(
"update"
);
ShowMessage
(
server
.
Error
);
ShowMessage
(
server
.
Error
);
}
}
...
@@ -250,9 +251,9 @@ namespace sunrise_launcher
...
@@ -250,9 +251,9 @@ namespace sunrise_launcher
}
}
//if update occurs which removes the selected launch option, default to first option available
//if update occurs which removes the selected launch option, default to first option available
if
(
metadata
.
LaunchOptions
.
All
(
x
=>
x
.
Titl
e
!=
server
.
Launch
))
if
(
metadata
.
LaunchOptions
.
All
(
x
=>
x
.
Nam
e
!=
server
.
Launch
))
{
{
server
.
Launch
=
metadata
.
LaunchOptions
[
0
].
Titl
e
;
server
.
Launch
=
metadata
.
LaunchOptions
[
0
].
Nam
e
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -427,7 +428,7 @@ namespace sunrise_launcher
...
@@ -427,7 +428,7 @@ namespace sunrise_launcher
try
try
{
{
var
launch
=
server
.
Metadata
.
LaunchOptions
.
FirstOrDefault
(
x
=>
x
.
Titl
e
==
server
.
Launch
);
var
launch
=
server
.
Metadata
.
LaunchOptions
.
FirstOrDefault
(
x
=>
x
.
Nam
e
==
server
.
Launch
);
if
(
launch
==
null
)
if
(
launch
==
null
)
{
{
Console
.
WriteLine
(
"ERROR: launch option not found: {0}"
,
server
.
Launch
);
Console
.
WriteLine
(
"ERROR: launch option not found: {0}"
,
server
.
Launch
);
...
...
TequilaXML.cs
View file @
92c5602c
...
@@ -61,7 +61,7 @@ namespace sunrise_launcher
...
@@ -61,7 +61,7 @@ namespace sunrise_launcher
foreach
(
var
profile
in
TequilaRoot
.
Profiles
)
foreach
(
var
profile
in
TequilaRoot
.
Profiles
)
{
{
var
config
=
new
LaunchOption
();
var
config
=
new
LaunchOption
();
config
.
Titl
e
=
profile
.
Value
;
config
.
Nam
e
=
profile
.
Value
;
config
.
LaunchPath
=
profile
.
Exec
;
config
.
LaunchPath
=
profile
.
Exec
;
config
.
Args
=
profile
.
Params
;
config
.
Args
=
profile
.
Params
;
metadata
.
LaunchOptions
.
Add
(
config
);
metadata
.
LaunchOptions
.
Add
(
config
);
...
...
main.js
View file @
92c5602c
...
@@ -120,7 +120,7 @@ function configOpen(manifestURL) {
...
@@ -120,7 +120,7 @@ function configOpen(manifestURL) {
function
populateLaunchOptions
(
metadata
)
{
function
populateLaunchOptions
(
metadata
)
{
var
options
=
[];
var
options
=
[];
Net
.
listForEach
(
metadata
.
launchOptions
,
function
(
option
)
{
Net
.
listForEach
(
metadata
.
launchOptions
,
function
(
option
)
{
options
.
push
(
option
.
titl
e
);
options
.
push
(
option
.
nam
e
);
});
});
combobox_launch
.
model
=
options
;
combobox_launch
.
model
=
options
;
}
}
...
...
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