-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWinFormat.ps1
More file actions
37 lines (30 loc) · 1.24 KB
/
Copy pathWinFormat.ps1
File metadata and controls
37 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# WinFormat - post-format Windows setup (apps + tweaks)
# Portable. Delete this folder = uninstall tool (system changes stay).
# UI language: en-US | pt-BR (ui-language.txt)
param(
[string]$UiLanguage = ''
)
$ErrorActionPreference = 'Stop'
$Root = $PSScriptRoot
$Version = '0.1.0'
$verFile = Join-Path $Root 'VERSION'
if (Test-Path -LiteralPath $verFile) {
$Version = (Get-Content -LiteralPath $verFile -Raw).Trim()
}
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
[System.Windows.Forms.Application]::EnableVisualStyles()
. (Join-Path $Root 'src\core\Paths.ps1')
. (Join-Path $Root 'src\core\Catalog.ps1')
. (Join-Path $Root 'src\core\Preflight.ps1')
. (Join-Path $Root 'src\core\Status.ps1')
. (Join-Path $Root 'src\core\Install.ps1')
. (Join-Path $Root 'src\core\Tweaks.ps1')
. (Join-Path $Root 'src\core\Apply.ps1')
. (Join-Path $Root 'src\ui\LanguagePicker.ps1')
. (Join-Path $Root 'src\ui\MainForm.ps1')
$paths = Get-WinFormatPaths -Root $Root
Ensure-WinFormatFolders -Paths $paths
$lang = Resolve-WinFormatUiLanguage -Root $Root -Requested $UiLanguage
$strings = Get-WinFormatStrings -Root $Root -UiLanguage $lang
Show-WinFormatMainForm -Root $Root -Paths $paths -Version $Version -Strings $strings -UiLanguage $lang