Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Add confirmation at conclusion of installation, replace old solution …
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
PJ-Oscheh committed Jan 5, 2018
1 parent 9eb31a3 commit 3017f11
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 32 deletions.
22 changes: 0 additions & 22 deletions LineageOS Installer.sln

This file was deleted.

25 changes: 25 additions & 0 deletions New LineageOS Installer.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2003
MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "New LineageOS Installer", "New LineageOS Installer\New LineageOS Installer.vbproj", "{6EBB58FE-7629-48EA-B48A-2D6CA9FF2822}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6EBB58FE-7629-48EA-B48A-2D6CA9FF2822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EBB58FE-7629-48EA-B48A-2D6CA9FF2822}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EBB58FE-7629-48EA-B48A-2D6CA9FF2822}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EBB58FE-7629-48EA-B48A-2D6CA9FF2822}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E76F7E15-ADA0-4D1E-8838-DDE75ADFF456}
EndGlobalSection
EndGlobal
25 changes: 21 additions & 4 deletions New LineageOS Installer/Form1.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions New LineageOS Installer/LangSelect.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion New LineageOS Installer/New LineageOS Installer.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>9</ApplicationRevision>
<ApplicationRevision>11</ApplicationRevision>
<ApplicationVersion>2.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
18 changes: 16 additions & 2 deletions New LineageOS Installer/checkADB.vb
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
Imports System.IO
Public Class checkADB
'Sorry for the misnomer! This is the file check; the ADB Check occurs in `install.vb`.
Dim proceedWithInstall As Integer
'0 = don't proceed, 1 = proceed.'
Private Sub MaterialLabel1_Click(sender As Object, e As EventArgs) Handles mainLabel.Click

End Sub

Private Sub checkADB_Load(sender As Object, e As EventArgs) Handles MyBase.Load
NextButton.Hide()
fileCheck()
End Sub

Private Sub fileCheck() Handles MyBase.Load
NextButton.Text = "Retry"
proceedWithInstall = 1
warningImg.Hide()
issueText.Hide()
Expand Down Expand Up @@ -114,11 +119,20 @@ Public Class checkADB
errorLabel.Text = "'unlock_bl.bat' was not found. You may have a corrupt program directory; if so, please restart the program. If that doesn't fix the issue, redownload it."
End If
If proceedWithInstall = 1 Then
NextButton.Text = "Next"
NextButton.Show()
End If
End Sub

Private Sub NextButton_Click(sender As Object, e As EventArgs) Handles NextButton.Click
install.Show()
If proceedWithInstall = 0 Then
NextButton.Show()

fileCheck()
End If
If proceedWithInstall = 1 Then
install.Show()
End If

End Sub
End Class
7 changes: 4 additions & 3 deletions New LineageOS Installer/install.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Public Class install
runningScript.EnableRaisingEvents = True
AddHandler runningScript.Exited, AddressOf Unlock_BLProcessExited
End Sub
Private Sub Unlock_BLProcessExited()
Private Sub Unlock_BLProcessExited(sender As Object, e As EventArgs)
'Hmm.... "Cross-thread operation not valid: Control 'messageLabel' accessed from a thread other than the thread it was created on" occurs when running from source but everything seems fine when built (published)

Me.Invoke(Sub() ProgressBar1.Value = 2)
Expand Down Expand Up @@ -71,7 +71,7 @@ Public Class install
Install_Lineage()
End If
End Sub
Private Sub Flash_RecoveryProcessExited()
Private Sub Flash_RecoveryProcessExited(sender As Object, e As EventArgs)
Me.Invoke(Sub() ProgressBar1.Value = 3)
stepNumber = 1
messageLabel.Text = "On your device, use the options to select 'Recovery'."
Expand All @@ -88,8 +88,9 @@ Public Class install
runningScript.EnableRaisingEvents = True
AddHandler runningScript.Exited, AddressOf Install_LineageProcessExited
End Sub
Private Sub Install_LineageProcessExited()
Private Sub Install_LineageProcessExited(sender As Object, e As EventArgs)
Me.Invoke(Sub() ProgressBar1.Value = 4)
messageLabel.Show()
messageLabel.Text = "LineageOS should have installed, and your device should be booting now. Please allow up to 20 minutes for the device to boot."
End Sub
End Class

0 comments on commit 3017f11

Please sign in to comment.