Skip to content

Commit

Permalink
Add user configurable unity ver
Browse files Browse the repository at this point in the history
  • Loading branch information
KinoMyu committed Dec 13, 2019
1 parent ad2dd53 commit 602425d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
19 changes: 11 additions & 8 deletions mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,20 @@
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<widget class="QLineEdit" name="unityVer">
<property name="maximumSize">
<size>
<width>40</width>
<height>20</height>
<width>58</width>
<height>16777215</height>
</size>
</property>
</spacer>
<property name="text">
<string>2018</string>
</property>
<property name="placeholderText">
<string>Unity Ver</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="diffVersion">
Expand Down
8 changes: 6 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void MainWindow::load()

ui->statusBar->showMessage("Downloading manifest file");

if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + "2017.3/" + "Android/" + path, s, curlerror) != CURLE_OK)
if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + ui->unityVer->text().toStdString() + "/Android/" + path, s, curlerror) != CURLE_OK)
{
ui->statusBar->showMessage("ERROR: Could not connect to MLTD servers (" + QString(curlerror) + ")");
return;
Expand Down Expand Up @@ -103,7 +103,7 @@ void MainWindow::diff()

ui->statusBar->showMessage("Downloading manifest file");

if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + "2017.3/" + "Android/" + path, s, curlerror) != CURLE_OK)
if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + ui->unityVer->text().toStdString() + "/Android/" + path, s, curlerror) != CURLE_OK)
{
ui->statusBar->showMessage("ERROR: Could not connect to MLTD servers (" + QString(curlerror) + ")");
return;
Expand Down Expand Up @@ -236,6 +236,10 @@ void MainWindow::filterPath(std::string& nString)
{
nString = "event/" + nString;
}
if(nString.substr(0, 6) == "salmon")
{
nString = "salmon/" + nString;
}
if(nString.substr(0, 4) == "tuna")
{
nString = "tuna/" + nString;
Expand Down

0 comments on commit 602425d

Please sign in to comment.