Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Assets and Scripts #80

Merged
merged 5 commits into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/fonts/JetBrainsMono/JetBrainsMono-Italic[wght].ttf
Binary file not shown.
Binary file modified assets/fonts/JetBrainsMono/JetBrainsMono[wght].ttf
Binary file not shown.
Binary file not shown.
107 changes: 43 additions & 64 deletions assets/terminal-configurations/core_settings.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
"actions":
[
{
"command": {
"command":
{
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
{
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command": "paste",
"keys": "ctrl+v"
},
{
"command": {
"command": "find",
"keys": "ctrl+shift+f"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
Expand All @@ -29,68 +31,45 @@
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"profiles": {
"defaults": {
"acrylicOpacity": 0.6,
"colorScheme": "AS Dark",
"font": {
"profiles":
{
"defaults":
{
"colorScheme": "AJS",
"font":
{
"face": "JetBrains Mono",
"size": 11
"size": 11.0
},
"opacity": 60,
"useAcrylic": true
},
"list": [
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore"
},
{
"commandline": "cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt"
},
{
"commandline": "powershell.exe",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
}
]
}
},
"schemes": [
"schemes":
[
{
"background": "#121212",
"black": "#000000",
"blue": "#1967D2",
"brightBlack": "#A0A0A0",
"brightBlue": "#0F99FF",
"brightCyan": "#05FBBD",
"brightGreen": "#4BF778",
"brightPurple": "#AB00FF",
"brightRed": "#FF002C",
"brightWhite": "#FFFFFF",
"brightYellow": "#FFE005",
"cursorColor": "#FFFFFF",
"cyan": "#03DAC6",
"foreground": "#D0D0D0",
"green": "#34AB53",
"name": "AS Dark",
"purple": "#8A00FF",
"red": "#CB0527",
"selectionBackground": "#FFFFFF",
"white": "#E8E8E8",
"yellow": "#FBBC05"
"background": "#1B1B1F",
"black": "#191C1D",
"blue": "#0031C5",
"brightBlack": "#899294",
"brightBlue": "#BAC3FF",
"brightCyan": "#97CBFF",
"brightGreen": "#61E14F",
"brightPurple": "#FCAAFF",
"brightRed": "#E32C31",
"brightWhite": "#FFF8F0",
"brightYellow": "#EBC236",
"cursorColor": "#767680",
"cyan": "#004A77",
"foreground": "#FEFBFF",
"green": "#005300",
"name": "AJS",
"purple": "#7C008D",
"red": "#930011",
"selectionBackground": "#E3E1EC",
"white": "#FFF0CB",
"yellow": "#AF8D00"
}
],
"theme": "system",
"useAcrylicInTabRow": true
}
1 change: 1 addition & 0 deletions packages/clean_setup/clean_setup_customizations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<CommandFiles>
<CommandFile Name="Core_Assets">..\scripts\core_assets\Core_Assets.bat</CommandFile>
<CommandFile Name="Core_Assets">..\scripts\core_assets\Core_Assets.cab</CommandFile>
<CommandFile Name="Explorer">..\scripts\Explorer.ps1</CommandFile>
</CommandFiles>
<CommandLine>cmd /c "core_assets.bat"</CommandLine>
</DeviceContext>
Expand Down
11 changes: 6 additions & 5 deletions scripts/CreatePartitions-UEFI.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@ create partition primary

rem == Create space for the recovery tools
rem == Update this size to match the size of the recovery tools (winre.wim) plus some free space.
shrink minimum=910
rem == Note: On Windows 11 23H2 (22621.2861), winre.wim is approximately 665 MB.
shrink minimum=1152

rem == Prepare Windows Partition
gpt attributes=0x0000000000000000
format quick fs=ntfs label="Local Disk"
assign letter=W

rem == 4. Recovery Partition ==
create partition primary size=910
create partition primary size=1152
set id=DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
gpt attributes=0x8000000000000001
format quick fs=ntfs label="Recovery"
assign letter=R
format quick fs=ntfs label="Windows RE Tools"
assign letter=T

rem == Rescan Disks and Exit ==
rescan
exit
exit
9 changes: 9 additions & 0 deletions scripts/Explorer.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set Windows Explorer display options
New-Item -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Force | Out-Null
Set-ItemProperty -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -Name "HideFileExt" -Value 0 # Show file extensions
Set-ItemProperty -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -Name "HideDrivesWithNoMedia" -Value 0 # Show empty drives
Set-ItemProperty -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -Name "Hidden" -Value 1 # Show hidden files
Set-ItemProperty -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ -Name "LaunchTo" -Value 1 # Open File Explorer to This PC

Set-ItemProperty -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\ -Name "ShowRecent" -Value 0 # Remove recent files
Set-ItemProperty -Path REGISTRY::HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\ -Name "ShowFrequemt" -Value 0 # Remove frequent folders
10 changes: 3 additions & 7 deletions scripts/core_assets/Core_Assets.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@ echo Jetbrains Mono Italic >> %LOGFILE%
copy "JetBrainsMono-Italic[wght].ttf" "%WINDIR%\Fonts" >> %LOGFILE%
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "JetBrains Mono Italic (TrueType)" /t REG_SZ /d JetBrainsMono-Italic[wght].ttf /f >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo . >> %LOGFILE%
echo Setting Up Windows Terminal Settings >> %LOGFILE%
echo Creating Terminal Folder >> %LOGFILE%
mkdir "%UserProfile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\" >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo Copying Terminal Settings >> %LOGFILE%
copy "core_settings.json" "%UserProfile%\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" >> %LOGFILE%
echo Roboto Flex Regular (TrueType) >> %LOGFILE%
copy "RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf" "%WINDIR%\Fonts" >> %LOGFILE%
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Roboto Flex Regular (TrueType)" /t REG_SZ /d RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf /f >> %LOGFILE%
echo result: %ERRORLEVEL% >> %LOGFILE%
echo . >> %LOGFILE%
echo Core Assets Installed and Configured >> %LOGFILE%
11 changes: 3 additions & 8 deletions scripts/core_assets/Create Core CAB.ddf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;*** MSDN Sample Source Code MakeCAB Directive file example

.OPTION EXPLICIT ; Generate errors on variable typos
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
.Set MaxDiskFileCount=1000 ; Limit file count per cabinet, so that scanning is not too slow
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
.Set MaxDiskFileCount=1000 ; Limit file count per cabinet, so that scanning is not too slow
.Set FolderSizeThreshold=200000 ; Aim for ~200K per folder
.Set CompressionType=MSZIP

Expand All @@ -12,16 +12,11 @@

;-------------------------------------------------------------------

;** CabinetNameTemplate = name of cab
;** DiskDirectory1 = output directory where cab will be created

;-------------------------------------------------------------------

.Set CabinetNameTemplate=Core_Assets.cab
.Set DiskDirectory1=.\

;-------------------------------------------------------------------

..\..\assets\fonts\JetBrainsMono\JetBrainsMono[wght].ttf
..\..\assets\fonts\JetBrainsMono\JetBrainsMono-Italic[wght].ttf
..\..\assets\terminal-configurations\core_settings.json
..\..\assets\fonts\RobotoFlex\RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf
14 changes: 8 additions & 6 deletions scripts/core_assets/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Core Assets

Core Assets is a set of scripts used for handling the compilation and deployment of a standard set of assets across provisioning packages.
Core Assets comprises scripts for the streamlined compilation and deployment of standard assets across various provisioning packages.

## Core Assets (CAB)

The `Core_Assets.cab` is used inside the majority of the provisioning packages housed in this repository.
The `Core_Assets.cab`, is integral to most provisioning packages, hence its 'core' designation.
It includes:

- Custom Windows Terminal Configuration
- JetBrains Mono Font
| Name | Type |
|:---------------|:-----|
| JetBrains Mono | Font |
| Roboto Flex | Font |

The `Core_Assets.bat` handles expanding and deploying the `Core_Assets.cab` during provisioning.
The [`Core_Assets.bat`](Core_Assets.bat) facilitates the expansion and deployment of the `Core_Assets.cab` during provisioning.

## Create Core Assets

The [`Create Core Assets.bat`](Create%20Core%20Assets.bat) runs `makecab` on `Create Core CAB.dff` to generate the `Core_Assets.cab` detailed above.
The [`Create Core Assets.bat`](Create%20Core%20Assets.bat) script executes `makecab` on [`Create Core CAB.dff`](Create%20Core%20CAB.ddf), generating the `Core_Assets.cab`.