Skip to content

Commit 79f31d6

Browse files
committed
Fix error in installs dialog
1 parent 16a68d8 commit 79f31d6

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

source/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
<string>it</string>
2323
</array>
2424
<key>CFBundleLongVersionString</key>
25-
<string>(c) 2024 Ravbug</string>
25+
<string>(c) 2019-2024 Ravbug</string>
2626
<key>CFBundleName</key>
2727
<string>$(PRODUCT_NAME)</string>
2828
<key>CFBundlePackageType</key>
2929
<string>APPL</string>
3030
<key>CFBundleShortVersionString</key>
31-
<string>1.54</string>
31+
<string>1.55</string>
3232
<key>CFBundleSignature</key>
3333
<string>UNHn</string>
3434
<key>CFBundleVersion</key>

source/add_install_dlg_derived.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,19 @@ void AddNewInstallDlg::PopulateTable(wxCommandEvent&){
5252
installSearchSizer->Layout();
5353
}
5454

55+
#define TRYCATCH 1
56+
5557

5658
void AddNewInstallDlg::GetAllVersions(){
5759
#ifndef __linux__
5860

5961
// version date info
6062
unordered_map<string,string> versionDates;
6163
{
62-
try{
64+
#if TRYCATCH
65+
try
66+
#endif
67+
{
6368
auto r = fetch("https://symbolserver.unity3d.com/000Admin/history.txt");
6469
if (r.code != 200){
6570
wxMessageBox("Unable to access Unity version metadata", "Download error", wxOK | wxICON_ERROR);
@@ -107,6 +112,9 @@ void AddNewInstallDlg::GetAllVersions(){
107112

108113
// get the version and hashcode
109114
auto slashpos = versiondata.find_first_of("/");
115+
if (slashpos == versiondata.npos){
116+
continue;
117+
}
110118

111119
auto version = string(string_view(versiondata.data(),slashpos));
112120
if (versionDates.find(version) != versionDates.end()){
@@ -122,9 +130,11 @@ void AddNewInstallDlg::GetAllVersions(){
122130
}
123131
}
124132
}
133+
#if TRYCATCH
125134
catch(std::exception& e){
126135
wxMessageBox(fmt::format("Network error: {}", e.what()), "Error", wxOK | wxICON_ERROR);
127136
}
137+
#endif
128138
}
129139
#endif
130140
}

source/globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
static constexpr std::string_view projectsFile = "projects.txt";
1515
static constexpr std::string_view editorPathsFile = "editorPaths.txt";
1616
static constexpr std::string_view templatePrefix = "com.unity.template";
17-
static constexpr std::string_view AppVersion = "v1.54";
17+
static constexpr std::string_view AppVersion = "v1.55";
1818

1919
struct wxListCtrl;
2020
struct wxWindow;

source/interface_derived.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void MainFrameDerived::OnAbout(wxCommandEvent& event)
228228
{
229229
wxAboutDialogInfo aboutInfo;
230230
aboutInfo.SetName("Unity Hub Native");
231-
aboutInfo.SetCopyright(fmt::format("(C) Ravbug {}",BUILD_YEAR));
231+
aboutInfo.SetCopyright(fmt::format("(C) Ravbug 2019-{}",BUILD_YEAR));
232232
aboutInfo.SetDescription("Developed with wxWidgets in C++");
233233
#if defined __linux__
234234
aboutInfo.SetWebSite("https://github.com/ravbug/UnityHubNative");

0 commit comments

Comments
 (0)