Skip to content

Commit 1c61a02

Browse files
committed
Fixed #19 and #20
1 parent 7141d07 commit 1c61a02

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

Launcher/Launcher/Extras.Designer.vb

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Launcher/Launcher/Extras.vb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Public Class Extras
1515
'End Chunk
1616

1717
Dim DropboxPath As String = GetDropBoxPath()
18+
19+
Dim OpenRCT2Folder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "/OpenRCT2"
20+
1821
Private Sub Extras_Load(sender As Object, e As EventArgs) Handles MyBase.Load
1922
Me.Icon = My.Resources.cat_paw
2023
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
@@ -112,10 +115,21 @@ Public Class Extras
112115
Next
113116
Catch ex As Exception
114117
'If there is no pre-existing files or the directory does not exist this will error out.
118+
End Try
119+
Try
120+
For Each Save In Directory.EnumerateFiles(OpenRCT2Folder & "/save")
121+
File.Copy(Save, DropBoxSavePath & "/" & Path.GetFileName(Save), True)
122+
Next
123+
Catch ex As Exception
124+
115125
End Try
116126
Try
117127
Directory.Delete(SavePathOriginal, True)
118128
Catch ex As Exception
129+
End Try
130+
Try
131+
Directory.Delete(OpenRCT2Folder & "/save", True)
132+
Catch ex As Exception
119133

120134
End Try
121135
Dim CreateSymLink As New ProcessStartInfo
@@ -124,6 +138,8 @@ Public Class Extras
124138
CreateSymLink.Verb = ("runas")
125139
CreateSymLink.WorkingDirectory = ""
126140
Process.Start(CreateSymLink)
141+
CreateSymLink.Arguments = ("/c mklink /J """ & OpenRCT2Folder & "/save" & """ """ & DropBoxSavePath & """")
142+
Process.Start(CreateSymLink)
127143
MsgBox("Saves moved to Dropbox and Linked!", , "Saves Moved!")
128144
ElseIf Response = DialogResult.No Then
129145
'They answered no... so no.

Launcher/Launcher/Form1.vb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Public Class frmLauncher
6969
If link Like "http://cdn.limetric.com/games/openrct2*.zip" Then
7070
RemoteVer = link
7171
Exit For
72+
Else
73+
RemoteVer = "NONE"
7274
End If
7375
Next
7476
Catch ex As Exception 'because I want to grab the Download URL at the same time.
@@ -144,10 +146,15 @@ Public Class frmLauncher
144146
End Sub
145147

146148
Private Sub DownloadUpdate()
147-
cmdLaunchGame.Enabled = False
148-
cmdForceUpdate.Enabled = False 'Added these because we may as well not keep calling them over and over.
149-
Dim Download = New Thread(AddressOf ActualDownload)
150-
Download.Start()
149+
If RemoteVer = "NONE" Then
150+
MsgBox("Your internet connection appears to be not working correctly, please re-start the Launcher.")
151+
Else
152+
cmdLaunchGame.Enabled = False
153+
cmdForceUpdate.Enabled = False 'Added these because we may as well not keep calling them over and over.
154+
Dim Download = New Thread(AddressOf ActualDownload)
155+
Download.Start()
156+
End If
157+
151158
End Sub
152159

153160
Private Sub ActualDownload()

0 commit comments

Comments
 (0)