Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Revan654 committed Feb 13, 2019
1 parent 51b6ebc commit 884aa8f
Show file tree
Hide file tree
Showing 4 changed files with 244 additions and 234 deletions.
45 changes: 27 additions & 18 deletions General/GlobalClass.vb
Original file line number Diff line number Diff line change
Expand Up @@ -578,27 +578,36 @@ Public Class GlobalClass
End Sub

Sub SetTempDir()

Dim OSName = Registry.LocalMachine.GetString("SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ProductName")
If p.SourceFile <> "" Then
p.TempDir = Macro.Expand(p.TempDir)
If OSName.Contains("Windows 10") Then
Try
If p.SourceFile.Dir.EndsWith("_temp\") Then
p.TempDir = p.SourceFile.Dir
Else
Dim base = p.SourceFile.Base
p.TempDir = p.SourceFile.Dir + base + "_temp\"
End If
Catch ex As Exception
MsgInfo(ex.Message)
End Try
Else ''Will Only Trigger For Older OS's.
Try
If p.SourceFile.Dir.EndsWith("_temp\") Then
p.TempDir = p.SourceFile.Dir
Else
Dim base = p.SourceFile.Base
If base.Length > 30 Then base = base.Shorten(15) + "..."
p.TempDir = p.SourceFile.Dir + base + "_temp\"
End If
Catch ex As Exception
MsgInfo(ex.Message)
End Try
End If

Try
If p.SourceFile.Dir.EndsWith("_temp\") Then
p.TempDir = p.SourceFile.Dir
'Else
' Dim base = p.SourceFile.Base
' If base.Length > 30 Then base = base.Shorten(15) + "..."
' p.TempDir = p.SourceFile.Dir + base + "_temp\"
End If
Catch ex As Exception
Dim base = p.SourceFile.Base
If base.Length > 30 Then base = base.Shorten(15) + "..."
p.TempDir = p.SourceFile.Dir + base + "_temp\"
MsgInfo(ex.Message)
'Only Previous Versions of Windows(Below Windows 10) Can't Handle Long Paths and HDD Must be NTFS.
' This Should catch Older OS's.
End Try

'Source Code Running Windows 7 & 8.1, Just incase Code needs to reverted Back:
'Source Code Running Windows 7 & 8.1(Saved Just Incase):

'If p.SourceFile.Dir.EndsWith("_temp\") Then
' p.TempDir = p.SourceFile.Dir
Expand Down
10 changes: 5 additions & 5 deletions General/GlobalCommands.vb
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Public Class GlobalCommands
--input-res --log-framelist --mux-option --output-file --raw --seek --skip-frame
--sub-copy --version --video-streamid --video-track --vpy --vpy-mt".Split((" " + BR).ToCharArray())

Dim amdHelp = File.ReadAllText(".\Apps\VCEEnc\help.txt").Replace("(no-)", "").Replace("--no-", "--")
Dim amdHelp = File.ReadAllText(".\Apps\Encoders\VCEEnc\help.txt").Replace("(no-)", "").Replace("--no-", "--")
Dim amdHelpSwitches = Regex.Matches(amdHelp, "--[\w-]+").OfType(Of Match)().Select(Function(x) x.Value)
Dim amdCode = File.ReadAllText(Folder.Startup.Parent + "Encoding\vceenc.vb").Replace("--no-", "--")
Dim amdPresent = Regex.Matches(amdCode, "--[\w-]+").OfType(Of Match)().Select(Function(x) x.Value)
Expand Down Expand Up @@ -479,26 +479,26 @@ Public Class GlobalCommands
End If
Next

supportedTools.WriteUTF8File("C:\Users\Revan\Desktop\StaxRip\docs\tools.rst")
supportedTools.WriteUTF8File("C:\Users\Revan\Desktop\staxrip-master\docs\tools.rst")

Dim screenshots = "Screenshots" + BR + "===========" + BR2 + ".. contents::" + BR2
Dim screenshotFiles = Directory.GetFiles("C:\Users\Revan\Desktop\StaxRip\docs\screenshots").ToList
Dim screenshotFiles = Directory.GetFiles("C:\Users\Revan\Desktop\staxrip-master\docs\screenshots").ToList
screenshotFiles.Sort(New StringLogicalComparer)

For Each i In screenshotFiles
Dim name = i.Base.Replace("_", " ").Trim
screenshots += name + BR + "-".Multiply(name.Length) + BR2 + ".. image:: screenshots/" + i.FileName + BR2
Next

screenshots.WriteUTF8File("C:\Users\Revan\Desktop\StaxRip\docs\screenshots.rst")
screenshots.WriteUTF8File("C:\Users\Revan\Desktop\staxrip-master\docs\screenshots.rst")

Dim macros = "Macros" + BR + "======" + BR2

For Each i In Macro.GetTips
macros += "``" + i.Name + "``" + BR2 + i.Value + BR2
Next

macros.WriteUTF8File("C:\Users\Revan\Desktop\StaxRip\docs\macros.rst")
macros.WriteUTF8File("C:\Users\Revan\Desktop\staxrip-master\docs\macros.rst")

Dim powershell = "PowerShell Scripting
====================
Expand Down

0 comments on commit 884aa8f

Please sign in to comment.