Update README.md, UpToolLib/Tool/XmlTool.cs, UpTool2/Program.cs files

This commit is contained in:
J. Fronny 2020-06-21 06:05:35 +00:00
parent 651992285c
commit 12b946fdf0
3 changed files with 13 additions and 11 deletions

View File

@ -1,6 +1,6 @@
# UpTool2
Downloading software from online repos since 2019\
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/JFronny/UpTool2)](https://github.com/JFronny/UpTool2/releases/latest)
[![GitLab pipeline](https://img.shields.io/gitlab/pipeline/JFronny/UpTool2)](https://gitlab.com/JFronny/UpTool2/builds)
[![Discord](https://img.shields.io/discord/466965965658128384)](https://discordapp.com/invite/UjhHBqt)
[![Default Repo](https://img.shields.io/badge/Default-Repo-informational)](https://gitlab.com/JFronny/UpTool2/snippets/1988600)
## How to automate UpTool2 deployments
@ -13,7 +13,7 @@ Now you can add this\
as a PostBuild event to automatically run pkgtool. Customize this if you need to.\
For GitHub actions I wrote [this](https://github.com/JFronny/CC-Clicker/blob/master/.github/workflows/main.yml).\
If you copy it, make sure to replace the descriptions and ID under the `Generate XML` step\
You can also add something like this to your Readme: [![UpTool2](https://img.shields.io/github/v/tag/JFronny/CC-Clicker?color=informational&label=UpTool2)](https://jfronny.github.io/home/uptool)\
You can also add something like this to your Readme: [![UpTool2](https://img.shields.io/badge/Get%20it-on%20UpTool2-blue)](https://jfronny.gitlab.io/home/uptool)\
(Look at the source for the MD Code)
## Folder layout
- %APPDATA%\UpTool2

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
@ -230,4 +230,4 @@ namespace UpTool2
return false;
}
}
}
}

View File

@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using System.Linq;
using System.Xml.Linq;
@ -21,29 +21,31 @@ namespace UpToolLib.Tool
"",
"https://raw.githubusercontent.com/CreepyCrafter24/UpTool2/master/Meta.xml",
"https://raw.githubusercontent.com/JFronny/UpTool2/master/Meta.xml",
"https://gist.githubusercontent.com/JFronny/f1ccbba3d8a2f5862592bb29fdb612c4/raw/Meta.xml"
"https://gist.githubusercontent.com/JFronny/f1ccbba3d8a2f5862592bb29fdb612c4/raw/Meta.xml",
"https://github.com/JFronny/UpTool2/releases/latest/download/meta.xml"
}
.Contains(meta.Element("UpdateSource").Value))
meta.Element("UpdateSource").Value =
"https://github.com/JFronny/UpTool2/releases/latest/download/meta.xml";
"https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/meta.xml?job=uptool";
if (meta.Element("Repos") == null)
meta.Add(new XElement("Repos"));
if (meta.Element("Repos").Elements("Repo").Count() == 0)
meta.Element("Repos").Add(new XElement("Repo", new XElement("Name", "UpTool2 official Repo"),
new XElement("Link",
"https://gist.githubusercontent.com/JFronny/f1ccbba3d8a2f5862592bb29fdb612c4/raw/Repo.xml")));
"https://gitlab.com/JFronny/UpTool2/snippets/1988600/raw")));
meta.Element("Repos").Elements("Repo").Select(s => s.Element("Link"))
.Where(s => new[]
{
null, "https://github.com/JFronny/UpTool2/releases/download/Repo/Repo.xml",
"https://raw.githubusercontent.com/JFronny/UpTool2/master/Repo.xml"
"https://raw.githubusercontent.com/JFronny/UpTool2/master/Repo.xml",
"https://gist.githubusercontent.com/JFronny/f1ccbba3d8a2f5862592bb29fdb612c4/raw/Repo.xml"
}.Contains(s.Value))
.ToList().ForEach(s =>
s.Value =
"https://gist.githubusercontent.com/JFronny/f1ccbba3d8a2f5862592bb29fdb612c4/raw/Repo.xml");
"https://gitlab.com/JFronny/UpTool2/snippets/1988600/raw");
if (meta.Element("LocalRepo") == null)
meta.Add(new XElement("LocalRepo"));
x.Save(PathTool.InfoXml);
}
}
}
}