Skip to content

Commit d8f9294

Browse files
authored
rebrand the whole thing why not (mattpannella#216)
* rebrand the whole thing why not * removed * skip-update option * formatting * woof
1 parent 3c37807 commit d8f9294

File tree

9 files changed

+54
-72
lines changed

9 files changed

+54
-72
lines changed

.github/workflows/announce.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
"fields": [
2626
{ "name": "Release Notes", "value": "[Click Me](https://github.com/mattpannella/pocket-updater-utility/releases/tag/${{ github.event.release.tag_name }})", "inline": true },
2727
{ "name": "Version", "value": "${{ github.event.release.tag_name }}", "inline": true },
28-
{ "name": "macOS Build", "value": "[Download Me](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pocket_updater_mac.zip)" },
29-
{ "name": "Linux Build", "value": "[Or Me](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pocket_updater_linux.zip)" },
30-
{ "name": "Linux ARM64 Build", "value": "[This is for creeps](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pocket_updater_linux_arm.zip)" },
31-
{ "name": "Windows Build", "value": "[This is a virus](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pocket_updater_win.zip)" }
28+
{ "name": "macOS Build", "value": "[Download Me](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pupdate_mac.zip)" },
29+
{ "name": "Linux Build", "value": "[Or Me](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pupdate_linux.zip)" },
30+
{ "name": "Linux ARM64 Build", "value": "[This is for creeps](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pupdate_linux_arm.zip)" },
31+
{ "name": "Windows Build", "value": "[This is a virus](https://github.com/mattpannella/pocket-updater-utility/releases/download/${{ github.event.release.tag_name }}/pupdate_win.zip)" }
3232
]
3333
}]
3434
}' \

.github/workflows/build.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,33 @@ jobs:
4040
release_name="App-$tag-${{ matrix.target }}"
4141
4242
# Build everything
43-
dotnet publish pocket_updater.csproj -r ${{ matrix.target }}-x64 --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly
43+
dotnet publish pupdate.csproj -r ${{ matrix.target }}-x64 --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly
4444
if ${{ matrix.arm }}; then
45-
mv ${release_name}/pocket_updater ${release_name}/pocket_updater_x64
46-
dotnet publish pocket_updater.csproj -r ${{ matrix.target }}-arm64 --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly
47-
mv ${release_name}/pocket_updater ${release_name}/pocket_updater_arm64
45+
mv ${release_name}/pupdate ${release_name}/pupdate_x64
46+
dotnet publish pupdate.csproj -r ${{ matrix.target }}-arm64 --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly
47+
mv ${release_name}/pupdate ${release_name}/pupdate_arm64
4848
if [ "${{ matrix.target }}" == "linux" ]; then
49-
dotnet publish pocket_updater.csproj -r ${{ matrix.target }}-arm --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly
50-
mv ${release_name}/pocket_updater ${release_name}/pocket_updater_arm32
49+
dotnet publish pupdate.csproj -r ${{ matrix.target }}-arm --self-contained true -c Release -o "$release_name" --consoleloggerparameters:ErrorsOnly
50+
mv ${release_name}/pupdate ${release_name}/pupdate_arm32
5151
fi
5252
fi
5353
5454
# Pack files
5555
if [ "${{ matrix.target }}" == "win" ]; then
5656
# Pack to zip for Windows
57-
7z a -tzip "pocket_updater_win.zip" "./${release_name}/pocket_updater.exe"
57+
7z a -tzip "pupdate_win.zip" "./${release_name}/pupdate.exe"
5858
elif [ "${{ matrix.target }}" == "osx" ]; then
5959
cd $release_name
60-
lipo -create -output pocket_updater pocket_updater_arm64 pocket_updater_x64
61-
rm pocket_updater_arm64
62-
rm pocket_updater_x64
63-
zip "../pocket_updater_mac.zip" "pocket_updater"; cd ..;
60+
lipo -create -output pupdate pupdate_arm64 pupdate_x64
61+
rm pupdate_arm64
62+
rm pupdate_x64
63+
zip "../pupdate_mac.zip" "pupdate"; cd ..;
6464
else
6565
cd $release_name
66-
mv pocket_updater_x64 pocket_updater
67-
zip "../pocket_updater_linux.zip" "pocket_updater"
68-
zip "../pocket_updater_linux_arm64.zip" "pocket_updater_arm64"
69-
zip "../pocket_updater_linux_arm32.zip" "pocket_updater_arm32"
66+
mv pupdate_x64 pupdate
67+
zip "../pupdate_linux.zip" "pupdate"
68+
zip "../pupdate_linux_arm64.zip" "pupdate_arm64"
69+
zip "../pupdate_linux_arm32.zip" "pupdate_arm32"
7070
cd ..
7171
fi
7272
@@ -76,6 +76,6 @@ jobs:
7676
- name: Publish
7777
uses: softprops/action-gh-release@v1
7878
with:
79-
files: "pocket_updater*.zip"
79+
files: "pupdate*.zip"
8080
env:
8181
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/bin/Debug/net6.0/pocket_updater.dll",
13+
"program": "${workspaceFolder}/bin/Debug/net6.0/pupdate.dll",
1414
"args": ["-p", "/Users/mattpannella/pocket-test"],
1515
"cwd": "${workspaceFolder}",
1616
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console

.vscode/tasks.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "process",
88
"args": [
99
"build",
10-
"${workspaceFolder}/pocket_updater.csproj",
10+
"${workspaceFolder}/pupdate.csproj",
1111
"/property:GenerateFullPaths=true",
1212
"/consoleloggerparameters:NoSummary"
1313
],
@@ -19,7 +19,7 @@
1919
"type": "process",
2020
"args": [
2121
"publish",
22-
"${workspaceFolder}/pocket_updater.csproj",
22+
"${workspaceFolder}/pupdate.csproj",
2323
"/property:GenerateFullPaths=true",
2424
"/consoleloggerparameters:NoSummary"
2525
],
@@ -33,7 +33,7 @@
3333
"watch",
3434
"run",
3535
"--project",
36-
"${workspaceFolder}/pocket_updater.csproj"
36+
"${workspaceFolder}/pupdate.csproj"
3737
],
3838
"problemMatcher": "$msCompile"
3939
}

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Checks for missing required assets for each core you have selected (mainly arcad
8989
9090
menu (Default Verb) Interactive Main Menu
9191
-p, --path Absolute path to install location
92+
-s, --skip-update Go straight to the menu, without looking for an update
9293
9394
fund List sponsor links. Lists all if no core is provided
9495
-c, --core The core to check funding links for
@@ -124,19 +125,19 @@ examples:
124125

125126

126127

127-
`/path/to/pocket_updater -p /path/to/sdcard/`
128+
`/path/to/pupdate -p /path/to/sdcard/`
128129

129130

130131

131-
`/path/to/pocket_updater update -c boogermann.bankpanic`
132+
`/path/to/pupdate update -c boogermann.bankpanic`
132133

133134

134135

135-
`/path/to/pocket_updater assets -c jotego.jtcontra`
136+
`/path/to/pupdate assets -c jotego.jtcontra`
136137

137138

138139

139-
`/path/to/pocket_updater images -i pocket-platform-images -o dyreschlock -v home`
140+
`/path/to/pupdate images -i pocket-platform-images -o dyreschlock -v home`
140141

141142
### Core Selector
142143

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title: Pocket Updater Utility
1+
title: Pupdate
22
author:
33
name: Matt Pannella
44

pocket_updater.csproj pupdate.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Description>Keep your Analogue Pocket up to date</Description>
1111
<Copyright>2023 Matt Pannella</Copyright>
1212
<Authors>Matt Pannella</Authors>
13-
<Product>Analogue Pocket Updater Utility</Product>
13+
<Product>Pupdate</Product>
1414
<RepositoryUrl>https://github.com/mattpannella/pocket-updater-utility</RepositoryUrl>
1515
</PropertyGroup>
1616
<ItemGroup>

pocket_updater.sln pupdate.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31912.275
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "pocket_updater", "pocket_updater.csproj", "{88615FF5-4649-4DD0-B721-449269388A88}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "pupdate", "pupdate.csproj", "{88615FF5-4649-4DD0-B721-449269388A88}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution

src/Program.cs

+22-41
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ internal class Program
1212
private static string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(3);
1313
private const string USER = "mattpannella";
1414
private const string REPOSITORY = "pocket-updater-utility";
15-
private const string RELEASE_URL = "https://github.com/mattpannella/pocket-updater-utility/releases/download/{0}/pocket_updater_{1}.zip";
16-
private const string NEW_RELEASE_URL = "https://github.com/mattpannella/pocket-updater-utility/releases/download/{0}/pupdate_{1}.zip";
15+
private const string RELEASE_URL = "https://github.com/mattpannella/pocket-updater-utility/releases/download/{0}/pupdate_{1}.zip";
1716
private static SettingsManager settings;
1817

1918
private static PocketCoreUpdater updater;
2019

2120
private static bool cliMode = false;
22-
private static bool migrate = false;
2321
private static async Task Main(string[] args)
2422
{
2523
try {
@@ -122,6 +120,9 @@ private static async Task Main(string[] args)
122120
if(o.InstallPath != null && o.InstallPath != "") {
123121
path = o.InstallPath;
124122
}
123+
if(o.SkipUpdate) {
124+
cliMode = true;
125+
}
125126
}
126127
)
127128
.WithNotParsed(o =>
@@ -136,7 +137,7 @@ private static async Task Main(string[] args)
136137
);
137138

138139
if (!cliMode) {
139-
Console.WriteLine("Pocket Updater Utility v" + version);
140+
Console.WriteLine("Pupdate v" + version);
140141
Console.WriteLine("Checking for updates...");
141142

142143
if(await CheckVersion(path) && !selfUpdate) {
@@ -315,37 +316,16 @@ private static async Task Main(string[] args)
315316
}
316317
}
317318

318-
static void DisplayHelp<T>(ParserResult<T> result)
319-
{
320-
var helpText = CommandLine.Text.HelpText.AutoBuild(result, h =>
321-
{
322-
h.AdditionalNewLineAfterOption = false;
323-
h.Heading = "Myapp 2.0.0-beta"; //change header
324-
h.Copyright = "Copyright (c) 2019 Global.com"; //change copyright text
325-
return CommandLine.Text.HelpText.DefaultParsingErrorsHandler(result, h);
326-
}, e => e);
327-
Console.WriteLine(helpText);
328-
}
329-
330319
private static int UpdateSelfAndRun(string directory, string[] updaterArgs)
331320
{
332-
string execName = "pocket_updater";
333-
string newExecName = "pocket_updater";
334-
if(migrate) {
335-
newExecName = "pupdate";
336-
}
321+
string execName = "pupdate";
337322
if(GetPlatform() == "win") {
338323
execName += ".exe";
339-
newExecName += ".exe";
340324
}
341325
string execLocation = Path.Combine(directory, execName);
342-
string newExecLocation = Path.Combine(directory, newExecName);
343326
string backupName = $"{execName}.backup";
344327
string backupLocation = Path.Combine(directory, backupName);
345-
string updateName = "pocket_updater.zip";
346-
if(migrate) {
347-
updateName = "pupdate.zip";
348-
}
328+
string updateName = "pupdate.zip";
349329
string updateLocation = Path.Combine(directory, updateName);
350330

351331
int exitcode = int.MinValue;
@@ -366,8 +346,8 @@ private static int UpdateSelfAndRun(string directory, string[] updaterArgs)
366346
ZipFile.ExtractToDirectory(updateLocation, directory, true);
367347

368348
// Execute
369-
Console.WriteLine($"Executing {newExecLocation}");
370-
ProcessStartInfo pInfo = new ProcessStartInfo(newExecLocation) {
349+
Console.WriteLine($"Executing {execLocation}");
350+
ProcessStartInfo pInfo = new ProcessStartInfo(execLocation) {
371351
Arguments = string.Join(' ', updaterArgs),
372352
UseShellExecute = false
373353
};
@@ -694,21 +674,14 @@ async static Task<bool> CheckVersion(string path)
694674
List<Github.Release> releases = await GithubApi.GetReleases(USER, REPOSITORY);
695675

696676
string tag_name = releases[0].tag_name;
697-
string releaseUrl = RELEASE_URL;
698-
string fileName = "pocket_updater";
699-
if(tag_name == "3.0.0") {
700-
releaseUrl = NEW_RELEASE_URL;
701-
fileName = "pupdate";
702-
migrate = true;
703-
}
704677
string? v = SemverUtil.FindSemver(tag_name);
705678
if(v != null) {
706679
bool check = SemverUtil.SemverCompare(v, version);
707680
if(check) {
708681
Console.WriteLine("A new version is available. Downloading now...");
709682
string platform = GetPlatform();
710-
string url = String.Format(releaseUrl, tag_name, platform);
711-
string saveLocation = Path.Combine(path, $"{fileName}.zip");
683+
string url = String.Format(RELEASE_URL, tag_name, platform);
684+
string saveLocation = Path.Combine(path, "pupdate.zip");
712685
await Factory.GetHttpHelper().DownloadFileAsync(url, saveLocation);
713686
Console.WriteLine("Download complete.");
714687
Console.WriteLine(saveLocation);
@@ -725,7 +698,6 @@ async static Task<bool> CheckVersion(string path)
725698
}
726699
}
727700

728-
729701
private static string GetPlatform()
730702
{
731703
if(RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
@@ -1008,15 +980,24 @@ __ _ | |
1008980
| |__| -_| _| |_ -| | | . |_ -| -_| | |
1009981
|_____|___|_| |___| |_|_|_|___|___|___|_ |
1010982
|___|",
1011-
1012-
983+
@" _=,_
984+
o_/6 /#\
985+
\__ |##/
986+
='|--\
987+
/ #'-.
988+
\#|_ _'-. /
989+
|/ \_( # |''
990+
C/ ,--___/"
1013991
};
1014992
}
1015993
[Verb("menu", isDefault: true, HelpText = "Interactive Main Menu")]
1016994
public class MenuOptions
1017995
{
1018996
[Option('p', "path", HelpText = "Absolute path to install location", Required = false)]
1019997
public string? InstallPath { get; set; }
998+
999+
[Option('s', "skip-update", HelpText = "Skip the self update check", Required = false)]
1000+
public bool SkipUpdate { get; set; }
10201001
}
10211002

10221003
[Verb("update", HelpText = "Run update all. (You can configure via the settings menu)")]

0 commit comments

Comments
 (0)