Compare commits

..

290 commits

Author SHA1 Message Date
Manuel Thalmann bce3ff17a3 Migrate winiso script to fish 2024-09-03 12:08:47 +02:00
Manuel Thalmann 79d1bab5a2 Ask for live scripts only once 2024-09-03 12:08:35 +02:00
Manuel Thalmann 4f8fdb2c4f Install Ubuntu automatically 2024-09-03 12:08:14 +02:00
Manuel Thalmann 69079e3af9 Add a backup script for reWASD 2024-09-03 12:02:48 +02:00
Manuel Thalmann 1d810ffca2 Add a backup script for Visual Studio 2024-09-03 12:02:32 +02:00
Manuel Thalmann ec36c0d33c Allow backing up TrackMania Forever 2024-09-03 12:02:09 +02:00
Manuel Thalmann f930a3f9c5 Allow testing winget packages with specific scope 2024-09-03 01:16:42 +02:00
Manuel Thalmann 0c10d680d0 Allow backing up RetroArch 2024-08-28 13:07:58 +02:00
Manuel Thalmann 790b8051a3 Add scripts for backing up PuTTY 2024-08-28 13:00:37 +02:00
Manuel Thalmann e5a8045482 Add scripts for backing up osu! 2024-08-28 12:47:07 +02:00
Manuel Thalmann 7a47e6eb40 Install osu!lazer per user 2024-08-28 12:37:20 +02:00
Manuel Thalmann af54cf89f8 Add backup support for ManiaPlanet 2024-08-28 05:18:52 +02:00
Manuel Thalmann 761b51c933 Add scripts for backing up and restoring LGHub 2024-08-28 05:05:55 +02:00
Manuel Thalmann ded6f637e9 Allow users to restore a backup 2024-08-28 04:40:32 +02:00
Manuel Thalmann ed06372c1d Add scripts for backing up and restoring personal files 2024-08-28 04:40:00 +02:00
Manuel Thalmann c5e396852b Fix non-functioning profile script 2024-08-28 04:39:15 +02:00
Manuel Thalmann 14a0d2ecf1 Ensure 7z is installed for backups 2024-08-28 04:38:56 +02:00
Manuel Thalmann ea21260b71 Streamline restoration of directories 2024-08-28 04:38:30 +02:00
Manuel Thalmann 90679043b4 Set a default path for backup artifacts 2024-08-28 00:38:20 +02:00
Manuel Thalmann 97e880393a Add capabilities to back up apps 2024-08-28 00:37:04 +02:00
Manuel Thalmann 1dfc15b448 Allow specifying a backup action 2024-08-28 00:29:33 +02:00
Manuel Thalmann fe0e199dea Ignore unspecified backup archives 2024-08-28 00:22:38 +02:00
Manuel Thalmann 3d29601f58 Ignore inexistent backup artifacts 2024-08-28 00:21:06 +02:00
Manuel Thalmann 46e9920be9 Make the install script action agnostic 2024-08-28 00:03:28 +02:00
Manuel Thalmann 2a41ec9533 Rename the Windows installer script 2024-08-27 23:35:56 +02:00
Manuel Thalmann 444ef1aa11 Rename outdated script 2024-08-27 23:08:41 +02:00
Manuel Thalmann ad81e34676 Silence errors concerning empty aliae configurations 2024-08-27 22:35:31 +02:00
Manuel Thalmann a6b9db593c Make Operations script cross platform 2024-08-27 22:27:44 +02:00
Manuel Thalmann 96465029b3 Handle OneShot tasks only on Windows 2024-08-27 21:32:49 +02:00
Manuel Thalmann 96d1ff7e65 Add a script for managing backups 2024-08-27 21:05:51 +02:00
Manuel Thalmann 33673bc6f9 Add tools for managing aliae 2024-08-27 18:58:33 +02:00
Manuel Thalmann fb90d7fbac Fix non-functioning aliae installation 2024-08-27 18:55:12 +02:00
Manuel Thalmann 3beb357e92 Create dedicated script for creating users 2024-08-27 17:04:17 +02:00
Manuel Thalmann 93c58c1662 Create dedicated script for installing software 2024-08-27 16:41:08 +02:00
Manuel Thalmann 7e99d2efe6 Prevent reading nix config multiple times 2024-08-27 14:35:04 +02:00
Manuel Thalmann 45b7a3b9f8 Ensure only one user is enabled at once 2024-08-27 14:11:31 +02:00
Manuel Thalmann 08d9adbfff Prevent unnecessary file creation 2024-08-27 14:06:56 +02:00
Manuel Thalmann 6615665bac Execute OneShot tasks in any operation 2024-08-27 14:05:16 +02:00
Manuel Thalmann 1ed831c4c7 Use /mnt as mount directory 2024-08-27 04:30:12 +02:00
Manuel Thalmann 9c2b09a20a Force the use of the managed distribution 2024-08-27 04:26:25 +02:00
Manuel Thalmann 5914bc3570 Initialize operation for all users 2024-08-27 04:24:29 +02:00
Manuel Thalmann 48e4cd654d Handle initialization in operation code 2024-08-27 04:15:37 +02:00
Manuel Thalmann 8f6c1b558f Execute script non-interactive during OneShot tasks 2024-08-27 03:50:08 +02:00
Manuel Thalmann a93d5b4208 Exit script after running OneShot task 2024-08-27 03:45:44 +02:00
Manuel Thalmann d6d7d7fd40 Modify user after first login 2024-08-27 03:27:54 +02:00
Manuel Thalmann acf1a49a1f Rearm Windows Activation before creating MSAcc 2024-08-27 03:25:19 +02:00
Manuel Thalmann 5778f49fa1 Register MSAcc logon script early 2024-08-27 03:24:37 +02:00
Manuel Thalmann 70100d37fe Allow rebooting without registering setup 2024-08-27 03:11:35 +02:00
Manuel Thalmann c6cbf7dce7 Fix non-functioning NoProfile argument 2024-08-27 02:09:04 +02:00
Manuel Thalmann 1fcaac9f9f Prevent unnecessary installation actions 2024-08-27 01:57:46 +02:00
Manuel Thalmann ff65f29750 Only install PowerShell module if necessary 2024-08-27 01:25:32 +02:00
Manuel Thalmann b49fc2f9aa Streamline PowerShell installation 2024-08-27 00:45:46 +02:00
Manuel Thalmann 721574e112 Add further functionality to the WSL script 2024-08-27 00:38:46 +02:00
Manuel Thalmann 5075411975 Create a separate script for WSL interaction 2024-08-26 23:33:46 +02:00
Manuel Thalmann 42c2e9e152 Fix recursive configuration 2024-08-25 03:58:28 +02:00
Manuel Thalmann ea262265d2 Fix malformed module 2024-08-24 18:35:43 +02:00
Manuel Thalmann 3b7a258269 Keep Windows fixes separate 2024-08-24 16:56:29 +02:00
Manuel Thalmann 729fd89e3c Remove WSL after operation 2024-08-24 16:52:41 +02:00
Manuel Thalmann 8851826d56 Make distribution name unique 2024-08-24 16:41:05 +02:00
Manuel Thalmann b28aa62957 Streamline WSL distribution name 2024-08-24 16:27:34 +02:00
Manuel Thalmann 9780aac9d5 Remove unused resources after user setup 2024-08-24 16:15:10 +02:00
Manuel Thalmann 3266c23968 Print update logs properly 2024-08-24 14:47:51 +02:00
Manuel Thalmann 9248efc829 Allow overriding Windows settings 2024-08-24 14:20:22 +02:00
Manuel Thalmann dd44d89a46 Update incorrect path 2024-08-24 14:11:38 +02:00
Manuel Thalmann 032dcefc3c Simplify osu!lazer installation 2024-08-24 14:10:02 +02:00
Manuel Thalmann 2a8e020ea2 Determine name of setup user properly 2024-08-24 14:01:05 +02:00
Manuel Thalmann 513a2af4a3 Make OMP configuration platform independent 2024-08-24 13:27:48 +02:00
Manuel Thalmann db9f47965e Fix incorrect character in OMP theme 2024-08-24 13:27:35 +02:00
Manuel Thalmann aa56feb2ab Remove unnecessary code 2024-08-24 04:25:07 +02:00
Manuel Thalmann 764a4420f7 Remove unnecessary loop 2024-08-24 04:24:55 +02:00
Manuel Thalmann 9eba17a2da Add missing module 2024-08-24 04:24:37 +02:00
Manuel Thalmann 6be7b83323 Add nextcloud to the module list 2024-08-24 04:18:57 +02:00
Manuel Thalmann 9ef22b16f8 Add a function for creating shortcuts 2024-08-24 04:18:33 +02:00
Manuel Thalmann 59b7a61d0f Configure nextcloud syncs 2024-08-24 04:07:47 +02:00
Manuel Thalmann 1e22b39faa Allow configuring nextcloud syncs 2024-08-24 04:07:35 +02:00
Manuel Thalmann 4f079457a1 Create separate option holding win users 2024-08-24 03:25:28 +02:00
Manuel Thalmann 6972478cc7 Rename Nextcloud installer 2024-08-24 01:50:07 +02:00
Manuel Thalmann 12cd0248cf Add file system driver for dual boot 2024-08-24 01:41:09 +02:00
Manuel Thalmann 45bfc5db2d Prevent unnecessary config evaluation 2024-08-24 01:31:39 +02:00
Manuel Thalmann 421378ec9f Fix non-functioning installer 2024-08-24 01:27:26 +02:00
Manuel Thalmann 23c8d2f540 Install vscode extensions by default 2024-08-24 01:16:56 +02:00
Manuel Thalmann 23147eea4e Load theme file from WSL properly 2024-08-24 00:59:59 +02:00
Manuel Thalmann 1b91dd06b9 Update aliae configuration script 2024-08-24 00:42:57 +02:00
Manuel Thalmann c6ee3c6ebb Strip duplicate variables and aliases 2024-08-24 00:08:58 +02:00
Manuel Thalmann 4f2b40aa30 Install posh theme automatically 2024-08-23 23:53:48 +02:00
Manuel Thalmann 80e5cbeb01 Export missing function 2024-08-23 23:50:13 +02:00
Manuel Thalmann 3ec8df86a3 Install aliae by default 2024-08-23 23:46:23 +02:00
Manuel Thalmann b10ce84812 Add scripts for changing aliae config 2024-08-23 23:44:51 +02:00
Manuel Thalmann 5ad88df911 Fix compatibility with mixed new line characters 2024-08-23 23:44:23 +02:00
Manuel Thalmann c6d0260369 Add a script for installing aliae 2024-08-23 22:38:28 +02:00
Manuel Thalmann b6f25a51b2 Add desired posh theme 2024-08-23 19:43:06 +02:00
Manuel Thalmann 505686bc92 Make option names more clear 2024-08-23 19:42:27 +02:00
Manuel Thalmann c031dc4293 Allow configuring oh-my-posh 2024-08-23 19:39:18 +02:00
Manuel Thalmann 0e4eb41ee2 Fetch config from proper section 2024-08-23 19:24:49 +02:00
Manuel Thalmann 9fb673feb6 Adjust configuration accordingly 2024-08-23 19:14:09 +02:00
Manuel Thalmann c38593bae8 Refactor option descriptions 2024-08-23 19:02:06 +02:00
Manuel Thalmann c4698a3dad Clean up the Windows configuration 2024-08-23 18:59:49 +02:00
Manuel Thalmann a2f47497de Clean up the users.nix file 2024-08-23 18:51:54 +02:00
Manuel Thalmann a12a8323d3 Create dedicated rclone module 2024-08-23 18:48:30 +02:00
Manuel Thalmann 178b99cfe5 Move git module to separate directory 2024-08-23 18:42:16 +02:00
Manuel Thalmann 7a5aabe08c Move git options to separate module 2024-08-23 18:40:24 +02:00
Manuel Thalmann 9cfac53a3f Fix inheritance of user config 2024-08-23 18:28:20 +02:00
Manuel Thalmann e332cdaf5e Allow OS specific settings 2024-08-23 18:11:48 +02:00
Manuel Thalmann 1e761a5778 Update archiso 2024-08-23 14:19:56 +02:00
Manuel Thalmann a2329d9491 Set user info during git setup 2024-08-23 02:01:16 +02:00
Manuel Thalmann fb057da891 Make all config scripts platform independent 2024-08-23 01:57:53 +02:00
Manuel Thalmann c6c43fb315 Allow leaving aliases unspecified 2024-08-23 01:52:25 +02:00
Manuel Thalmann c5c01f7258 Make scripts platform independent 2024-08-23 01:52:04 +02:00
Manuel Thalmann b97daa9b7d Add scripts for configuring git 2024-08-23 01:43:26 +02:00
Manuel Thalmann 1c4d607479 Configure software implicitly 2024-08-23 01:41:32 +02:00
Manuel Thalmann 52e8ab9d6b Skip profile creation for PinnedItem 2024-08-22 23:55:41 +02:00
Manuel Thalmann 0be4a04647 Allow skipping powershell module registration 2024-08-22 23:55:00 +02:00
Manuel Thalmann f465438649 Add profiles to the flake 2024-08-22 23:37:53 +02:00
Manuel Thalmann e25fdccf23 Remove user profile of OneShot user 2024-08-22 23:12:11 +02:00
Manuel Thalmann 1b3b376cce Add missing OneShotTask declaration 2024-08-22 20:41:30 +02:00
Manuel Thalmann bce690f731 Fix infinite loop 2024-08-22 20:41:17 +02:00
Manuel Thalmann e4bb3c9968 Fix incorrect variable name 2024-08-22 20:34:16 +02:00
Manuel Thalmann 5dbb5ace53 Fix handling empty error messages 2024-08-22 20:12:18 +02:00
Manuel Thalmann ceb446425b Add choco to the profile of the setup user 2024-08-22 13:46:55 +02:00
Manuel Thalmann a89bc00aba Fix incorrect typings 2024-08-22 11:11:12 +02:00
Manuel Thalmann 852f66ffc4 Fix permission issues when enabling Win hack 2024-08-22 11:11:00 +02:00
Manuel Thalmann 1590367122 Register setup script as admin 2024-08-22 11:10:39 +02:00
Manuel Thalmann baf404a824 Execute the entire installer using live scripts 2024-08-21 23:21:32 +02:00
Manuel Thalmann 59de632a84 Streamline the creation of users 2024-08-21 18:34:18 +02:00
Manuel Thalmann 499efb7809 Replace osk with cmd during debugging 2024-08-21 18:33:41 +02:00
Manuel Thalmann 01d7e242ff Prevent pauses in OneShot tasks 2024-08-21 18:28:50 +02:00
Manuel Thalmann da227bd8b6 Print commands in debug mode 2024-08-21 18:28:08 +02:00
Manuel Thalmann 3cb08abad6 Run OneShot tasks with dedicated user 2024-08-21 18:27:47 +02:00
Manuel Thalmann efa259e0fa Add function for generating startup command 2024-08-21 18:26:58 +02:00
Manuel Thalmann 173b694983 Allow registering startup script for the default user 2024-08-21 18:20:11 +02:00
Manuel Thalmann 933f2e36ad Prevent unnecessary errors during WSL execution 2024-08-21 14:08:26 +02:00
Manuel Thalmann 852205d94c Register WSL before running OneShot tasks 2024-08-21 03:37:44 +02:00
Manuel Thalmann 63c83d83a3 Overwrite broken module 2024-08-21 03:20:37 +02:00
Manuel Thalmann f01a4f48e3 Prevent initialization of nested operations 2024-08-21 03:18:31 +02:00
Manuel Thalmann 3cbeecda89 Improve log messages of OneShot tasks 2024-08-21 02:02:30 +02:00
Manuel Thalmann dae8b7d4e1 Retry Linux path conversion for errors 2024-08-20 00:20:33 +02:00
Manuel Thalmann cc0c07e21a Fix typo 2024-08-20 00:20:07 +02:00
Manuel Thalmann 796a38922b Fix broken signature of Restart-Intermediate 2024-08-19 12:07:26 +02:00
Manuel Thalmann c84b40bf30 Report unexpected path conversions 2024-08-19 02:50:41 +02:00
Manuel Thalmann 8107ba767d Load missing path 2024-08-19 02:50:19 +02:00
Manuel Thalmann fa4fd7cc39 Ensure error file can be read from 2024-08-19 02:24:45 +02:00
Manuel Thalmann 33949b0486 Streamline OneShot task handler 2024-08-19 02:24:30 +02:00
Manuel Thalmann 8f8f91beff Simplify script registration 2024-08-19 02:24:13 +02:00
Manuel Thalmann f979d3db84 Fix broken regedit paths 2024-08-19 01:38:25 +02:00
Manuel Thalmann 2c4dea139c Allow registering reboots for users 2024-08-19 01:37:14 +02:00
Manuel Thalmann f441c756ff Prevent users from being excluded 2024-08-19 01:10:29 +02:00
Manuel Thalmann 0ca38432e3 Force copying of Linux users to Windows 2024-08-19 00:54:13 +02:00
Manuel Thalmann 430ecdb8e1 Improve log messages of updates 2024-08-18 12:20:21 +02:00
Manuel Thalmann 5a4ccb5fd7 Remove unnecessary command 2024-08-18 10:24:15 +02:00
Manuel Thalmann abe11e1174 Fix time for QEMU VMs 2024-08-18 09:35:16 +02:00
Manuel Thalmann be99ec14f4 Remove unnecessary desktop icons 2024-08-18 09:25:23 +02:00
Manuel Thalmann 419d107549 Add a timeout for the reWASD downloader 2024-08-18 09:05:04 +02:00
Manuel Thalmann 0b43906083 Allow setting a timeout for clicking download buttons 2024-08-18 09:04:42 +02:00
Manuel Thalmann 574449f9c6 Emit errors concerning WSL commands 2024-08-17 13:51:10 +02:00
Manuel Thalmann e9396747e2 Emit errors using Write-Error 2024-08-17 13:49:21 +02:00
Manuel Thalmann 8561a345da Convert Argument to string explicitly 2024-08-16 23:03:19 +02:00
Manuel Thalmann 808f75dd96 Ignore unfinished browser downloads 2024-08-16 17:57:22 +02:00
Manuel Thalmann 95adedab77 Install powershell modules for all users 2024-08-16 16:43:30 +02:00
Manuel Thalmann 433c6ed212 Fix typos 2024-08-16 16:10:09 +02:00
Manuel Thalmann d4510f24b8 Install AutoHotkey as preparation 2024-08-16 15:22:09 +02:00
Manuel Thalmann 6ed428f115 Allow running live scripts in debug mode 2024-08-16 15:21:41 +02:00
Manuel Thalmann 348777d5cc Generate env variables using shorthand scripts 2024-08-16 15:16:56 +02:00
Manuel Thalmann 7b79731c77 Allow running installation in debug mode 2024-08-16 15:16:28 +02:00
Manuel Thalmann f1fd2f36f1 Redirect winiso exit code properly 2024-08-16 15:13:53 +02:00
Manuel Thalmann 442bacaca4 Allow specifying winiso build type 2024-08-16 15:13:33 +02:00
Manuel Thalmann e8930cd45c Refactor winget check for rare issue 2024-08-16 15:04:37 +02:00
Manuel Thalmann 9ca77ea75c Disable Windows Update reboot only as admin 2024-08-16 14:35:35 +02:00
Manuel Thalmann ebcf4e725a Add a function for queueing startup commands 2024-08-15 18:34:48 +02:00
Manuel Thalmann 9ce516616f Hide output of DISM commands 2024-08-15 13:57:15 +02:00
Manuel Thalmann 10cc46ff7d Ensure website is loaded before download 2024-08-15 02:42:00 +02:00
Manuel Thalmann a0cee62707 Prevent Jellyfin from rebooting 2024-08-15 02:22:07 +02:00
Manuel Thalmann b485a14f1d Improve handling of slow websites 2024-08-14 18:47:29 +02:00
Manuel Thalmann 4e5721662f Fix potential CRC errors 2024-08-14 18:46:42 +02:00
Manuel Thalmann 48ab2ba2a1 Ensure auto reboot is disabled properly 2024-08-12 21:32:53 +02:00
Manuel Thalmann 5096e966a8 Disable auto reboot by default 2024-08-12 01:27:50 +02:00
Manuel Thalmann ad049b6e0d Add methods for managing auto restart feature 2024-08-12 01:23:42 +02:00
Manuel Thalmann 7df90d9f90 Install Wave Link first 2024-08-11 18:27:16 +02:00
Manuel Thalmann 925638ec0c Throw an error when failing to load config 2024-08-11 18:27:06 +02:00
Manuel Thalmann 20a018c7b7 Fix incorrect script path 2024-08-10 20:37:10 +02:00
Manuel Thalmann fa56f8281b Allow leaving install action unspecified 2024-08-10 19:27:56 +02:00
Manuel Thalmann cee60713de Retrieve registry value properly 2024-08-10 19:26:53 +02:00
Manuel Thalmann 0aeb29bbf5 Add scripts for installing git 2024-08-10 15:28:10 +02:00
Manuel Thalmann 5ec6366783 Remove unnecessary code 2024-08-10 15:24:15 +02:00
Manuel Thalmann d78565e1a6 Add a function for removing the RunOnce key 2024-08-10 15:24:04 +02:00
Manuel Thalmann 2c0f218641 Set user groups properly 2024-08-10 15:23:38 +02:00
Manuel Thalmann 20c3244301 Configure MS accounts properly 2024-08-10 15:21:13 +02:00
Manuel Thalmann 882ecb28fd Queue next user after configuration finished 2024-08-10 15:20:36 +02:00
Manuel Thalmann 6c120c6149 Disable UAC after logging in MS account 2024-08-10 15:19:14 +02:00
Manuel Thalmann 1fc72a3f5e Enable OneShot listener for MS accounts 2024-08-10 15:18:10 +02:00
Manuel Thalmann 03f144cc43 Set timezone automatically 2024-08-10 15:17:21 +02:00
Manuel Thalmann d80e4a63e3 Prevent variable overwrite 2024-08-10 15:16:57 +02:00
Manuel Thalmann 15e73aa0e7 Register installer script after disabling UAG 2024-08-10 15:16:27 +02:00
Manuel Thalmann b2445ef769 Redirect user for configuration properly 2024-08-10 15:16:00 +02:00
Manuel Thalmann d8aee75468 Fix broken redirection of arguments 2024-08-10 15:15:40 +02:00
Manuel Thalmann e9e24e243d Determine installer action properly 2024-08-10 15:15:21 +02:00
Manuel Thalmann 3ee92c243e Redirect arguments to chocolatey properly 2024-08-10 15:13:46 +02:00
Manuel Thalmann 69a09752b0 Fix non-functioning OneShot script 2024-08-10 15:13:20 +02:00
Manuel Thalmann 9e7436bfca Fix oneshot task execution 2024-08-10 06:11:55 +02:00
Manuel Thalmann 53f0bc9644 Allow removing the OneShot listener 2024-08-10 05:19:24 +02:00
Manuel Thalmann fbbfd0cfe1 Remove duplicate code 2024-08-10 05:17:08 +02:00
Manuel Thalmann 31b149db32 Fix typo 2024-08-10 03:57:37 +02:00
Manuel Thalmann 114545d4cc Fix copy paste error 2024-08-10 03:57:26 +02:00
Manuel Thalmann b916c7d46d Allow skipping the User parameter 2024-08-10 03:40:37 +02:00
Manuel Thalmann 9a084acf75 Fix incorrect script path 2024-08-10 03:13:13 +02:00
Manuel Thalmann 29d4964ba5 Fix broken scripts 2024-08-10 01:50:52 +02:00
Manuel Thalmann 8cf4f8ce4f Remove unnecessary confirmation dialogue 2024-08-10 00:23:47 +02:00
Manuel Thalmann db4a48702d Add a task for disabling UAC 2024-08-10 00:23:37 +02:00
Manuel Thalmann 56492ec332 Force creation of sudo alias 2024-08-10 00:22:46 +02:00
Manuel Thalmann fb60713ae4 Allow execution of OneShot tasks 2024-08-10 00:22:30 +02:00
Manuel Thalmann 66fed9c176 Ensure CONFIG_MODULE is resolved 2024-08-09 23:23:55 +02:00
Manuel Thalmann 33bbfc5d0b Add dedicated functions for creating startup scripts 2024-08-09 23:23:29 +02:00
Manuel Thalmann 734309c960 Change login message 2024-08-09 22:11:12 +02:00
Manuel Thalmann 2149b90be9 Set up shared WSL 2024-08-09 16:02:33 +02:00
Manuel Thalmann b8c6038da8 Install updates only as admin 2024-08-09 16:02:24 +02:00
Manuel Thalmann 9f55fe7734 Disable boot message only as admin 2024-08-09 16:02:00 +02:00
Manuel Thalmann 2928649ee0 Add a function for allowing user access 2024-08-09 15:56:16 +02:00
Manuel Thalmann 0cfbb26b17 Fix broken reboot registration 2024-08-09 15:49:36 +02:00
Manuel Thalmann 36d88a713a Ensure the script path is detected properly 2024-08-09 14:45:50 +02:00
Manuel Thalmann 7caf1de4cb Allow automatic script execution for MS accounts 2024-08-09 14:45:29 +02:00
Manuel Thalmann e3f84a227b Reorder winget arguments 2024-08-09 14:45:05 +02:00
Manuel Thalmann babef7a9ac Allow registering reboot for the default user 2024-08-09 14:44:57 +02:00
Manuel Thalmann cc919b4d46 Add a dedicated function for disabling boot message 2024-08-09 13:35:12 +02:00
Manuel Thalmann dc7fe9f418 Implement root install loop using a switch 2024-08-09 13:34:46 +02:00
Manuel Thalmann d23bcac5d2 Force computer reboots 2024-08-09 04:42:55 +02:00
Manuel Thalmann 3f3799add0 Add scripts for controlling UAC 2024-08-09 04:29:26 +02:00
Manuel Thalmann 9d662fbce5 Set displayname of all users 2024-08-09 04:20:00 +02:00
Manuel Thalmann 43f7672df3 Login to users for configuration 2024-08-09 04:19:49 +02:00
Manuel Thalmann 839e0ccaaf Skip PWSH_PATH if undefined 2024-08-09 04:08:22 +02:00
Manuel Thalmann a2fa8bb699 Fix typo 2024-08-09 03:38:10 +02:00
Manuel Thalmann 4ec658b387 Add missing setup stage 2024-08-09 03:02:25 +02:00
Manuel Thalmann 916b5c9649 Make Get-Users output explicit 2024-08-09 03:02:17 +02:00
Manuel Thalmann 53730a9a52 Allow displaying a boot message 2024-08-09 02:59:06 +02:00
Manuel Thalmann 49e8a3fd43 Disable users by default 2024-08-09 02:58:01 +02:00
Manuel Thalmann 7ab68a71ba Add a stage for configuring users 2024-08-09 02:27:24 +02:00
Manuel Thalmann 5e0f528616 Detect installation properly 2024-08-09 02:24:59 +02:00
Manuel Thalmann bcc1536b22 Remove unnecessary icon 2024-08-09 02:23:56 +02:00
Manuel Thalmann 1d2ef65310 Add Predator Z301C to the hardware list 2024-08-09 02:23:41 +02:00
Manuel Thalmann f38794c3c0 Add support for the sudo command 2024-08-09 02:22:45 +02:00
Manuel Thalmann c68ce2b4e3 Fix renaming user 2024-08-09 02:20:27 +02:00
Manuel Thalmann 3fad7125f7 Make specifying PWSH_PATH optional 2024-08-09 02:12:27 +02:00
Manuel Thalmann 8f43f82e5f Show error properly 2024-08-09 02:00:18 +02:00
Manuel Thalmann 456fe11ab5 Fix typo 2024-08-09 01:53:59 +02:00
Manuel Thalmann 85288488f9 Remove code duplication 2024-08-09 01:33:04 +02:00
Manuel Thalmann ebf7408858 Remove unnecessary console output 2024-08-09 01:22:51 +02:00
Manuel Thalmann 66786ad5cd Fix incorrect file paths 2024-08-09 00:17:05 +02:00
Manuel Thalmann 565f5f927e Fix incorrect hardware name 2024-08-09 00:03:45 +02:00
Manuel Thalmann 2ea5578a54 Reorder installation steps 2024-08-08 23:03:10 +02:00
Manuel Thalmann d86d27e8de Suppress unnecessary output 2024-08-08 22:24:41 +02:00
Manuel Thalmann 5d7022f981 Refactor the wsl installation check 2024-08-08 22:21:49 +02:00
Manuel Thalmann 01c90615ef Ensure WSL Ubuntu is installed 2024-08-08 22:08:13 +02:00
Manuel Thalmann 5f6d8839f4 Make config script platform independent 2024-08-08 18:21:16 +02:00
Manuel Thalmann 31eb506bc8 Leave groups unspecified 2024-08-08 17:50:32 +02:00
Manuel Thalmann f82b43c057 Add users during installation 2024-08-08 17:49:43 +02:00
Manuel Thalmann 927b1e5a4a Fix incorrect user conversion 2024-08-08 17:16:51 +02:00
Manuel Thalmann 6bd5335a2a Keep Windows groups separate 2024-08-08 15:33:55 +02:00
Manuel Thalmann 497115ca6a Remove unnecessary options from Win users 2024-08-08 15:32:05 +02:00
Manuel Thalmann 700c0498d1 Inherit Windows users from linux 2024-08-08 15:28:29 +02:00
Manuel Thalmann b238484519 Add functions for retrieving attributes 2024-08-08 14:45:34 +02:00
Manuel Thalmann 141b5061ed Install Oh My Posh system wide 2024-08-08 14:23:15 +02:00
Manuel Thalmann c08052998c Fix typo 2024-08-08 14:22:22 +02:00
Manuel Thalmann 3cc7ee3298 Skip scope argument by default 2024-08-08 14:22:13 +02:00
Manuel Thalmann 26ed09b13b Fix incorrect file paths 2024-08-08 14:21:55 +02:00
Manuel Thalmann 97efefcbf0 Configure NVS after installation 2024-08-08 14:09:20 +02:00
Manuel Thalmann f665b3e1f7 Refactor app association script 2024-08-08 14:09:07 +02:00
Manuel Thalmann 30f1b9323c Fix typo 2024-08-08 14:08:48 +02:00
Manuel Thalmann 1e6b6d8447 Apply the error action globally 2024-08-08 14:08:38 +02:00
Manuel Thalmann d059374124 Move PinnedItem script to proper location 2024-08-08 14:04:51 +02:00
Manuel Thalmann b02c63adb2 Add notes to installation script 2024-08-08 14:03:15 +02:00
Manuel Thalmann a147c2d8ea Add a script for installing LGHub 2024-08-08 13:25:21 +02:00
Manuel Thalmann 2223123808 Reorder installation steps 2024-08-08 13:17:14 +02:00
Manuel Thalmann 823909a847 Reload env after installing git 2024-08-08 12:18:04 +02:00
Manuel Thalmann 5733639a99 Enure features for PinnedItem are installed 2024-08-08 05:21:21 +02:00
Manuel Thalmann 3ccf3b43a7 Install features using chocolatey 2024-08-08 05:20:58 +02:00
Manuel Thalmann 9d205f353a Ensure git is installed 2024-08-08 05:14:31 +02:00
Manuel Thalmann cc05ba4fed Fix broken XML document creation 2024-08-08 05:04:59 +02:00
Manuel Thalmann 627a8e61c4 Fix incorrect parameter access 2024-08-08 05:03:24 +02:00
Manuel Thalmann 41cf18bd81 Fix incorrect path 2024-08-08 05:01:45 +02:00
Manuel Thalmann a9dadb8419 Add a dedicated user option for windows 2024-08-08 04:45:27 +02:00
Manuel Thalmann 40a983dc65 Add a stage for creating users 2024-08-08 04:38:40 +02:00
Manuel Thalmann 03460b7e44 Add scripts for all remaining apps 2024-08-08 04:36:35 +02:00
Manuel Thalmann dfe237dfd7 Allow custom winget arguments 2024-08-08 04:29:00 +02:00
Manuel Thalmann c59dce210f Improve winget function 2024-08-08 04:28:21 +02:00
Manuel Thalmann f347f2b3ec Add missing function 2024-08-08 04:20:11 +02:00
Manuel Thalmann 223249e1c4 Refactor browser scripts 2024-08-08 03:32:03 +02:00
Manuel Thalmann 05837fb6be Ensure Selenium is imported 2024-08-08 02:59:02 +02:00
Manuel Thalmann bd926e2412 Allow skipping the Action argument 2024-08-08 02:56:28 +02:00
Manuel Thalmann fcbbc12a63 Rename all old installation scripts 2024-08-08 02:56:13 +02:00
Manuel Thalmann 1dd6ddce11 Add options for enabling LG Hub 2024-08-08 02:29:51 +02:00
Manuel Thalmann d29c6f1c45 Remove Firefox taskbar icon 2024-08-08 02:29:09 +02:00
Manuel Thalmann 1010b795bb Allow removing task bar icons 2024-08-08 02:28:40 +02:00
19 changed files with 377 additions and 150 deletions

View file

@ -37,17 +37,12 @@ $null = New-Module {
$cleanup = { };
$taskPending = $false;
if ($IsWindows -and ($null -ne (Get-OneShotTask))) {
$taskPending = $true;
[switch] $NonInteractive = $true;
}
if (-not $Global:InOperation) {
if ($env:DEBUG) {
Set-PSDebug -Trace 1;
}
if ($null -ne (Get-OneShotTask)) {
if ($IsWindows -and ($null -ne (Get-OneShotTask))) {
$taskPending = $true;
[switch] $NonInteractive = $true;
}
@ -109,36 +104,41 @@ $null = New-Module {
}
if ($env:DEBUG) {
if (
(Get-Item $env:INSTALLER_SCRIPT).IsReadOnly -and
(Test-Qemu) -and
($Host.UI.PromptForChoice(
$liveScriptOption = "LiveScripts";
if (($null -eq (Get-SetupOption $liveScriptOption)) -and (Test-Qemu)) {
$result = $Host.UI.PromptForChoice(
"Confirm",
"Do you wish to swap to live scripts?",
[ChoiceDescription[]]@(
[ChoiceDescription]::new("&No", "Use scripts stored in the virtual machine"),
[ChoiceDescription]::new("&Yes", "Use live scripts stored on the host")),
0) -eq 1)) {
Install-ChocoPackage winfsp qemu-guest-agent;
Get-Service VirtioFsSvc | Start-Service -PassThru | Set-Service -StartupType Automatic;
0);
while (-not (Test-Path Z:\)) {
Start-Sleep 0.1;
Set-SetupOption $liveScriptOption $result;
if ($result -eq 1) {
Install-ChocoPackage winfsp qemu-guest-agent;
Get-Service VirtioFsSvc | Start-Service -PassThru | Set-Service -StartupType Automatic;
while (-not (Test-Path Z:\)) {
Start-Sleep 0.1;
}
foreach ($name in @("CONFIG_MODULE", "INSTALLER_SCRIPT")) {
$variable = Get-Item "Env:\$name";
$path = Join-Path `
"Z:\Repositories\PortValhalla" `
([System.IO.Path]::GetRelativePath("$PSScriptRoot/../../..", $variable.Value));
Set-Item "Env:\$name" $path;
Write-Host "The new value of ``$name`` is ``$path``";
}
Restart-Intermediate;
exit;
}
foreach ($name in @("CONFIG_MODULE", "INSTALLER_SCRIPT")) {
$variable = Get-Item "Env:\$name";
$path = Join-Path `
"Z:\Repositories\PortValhalla" `
([System.IO.Path]::GetRelativePath("$PSScriptRoot/../../..", $variable.Value));
Set-Item "Env:\$name" $path;
Write-Host "The new value of ``$name`` is ``$path``";
}
Restart-Intermediate;
exit;
}
}

View file

@ -68,7 +68,7 @@ $null = New-Module {
$Names.AddRange($AdditionalNames);
foreach ($name in $Names) {
if ($Force.IsPresent -or -not (Test-WingetPackage $name)) {
if ($Force.IsPresent -or -not (Test-WingetPackage @PSBoundParameters)) {
winget install `
--accept-source-agreements --accept-package-agreements `
--source winget `

View file

@ -53,10 +53,11 @@ function Test-ChocoPackage {
function Test-WingetPackage {
[OutputType([bool])]
param(
[string] $ID
[string] $Name,
[string[]] $ArgumentList
)
& { $null = winget list --accept-source-agreements -e --id $ID; $?; };
& { $null = winget list --accept-source-agreements -e --id $Name @ArgumentList; $?; };
}
<#

View file

@ -64,5 +64,5 @@ function Remove-TaskbarItem {
)
Import-Module -UseWindowsPowerShell PinnedItem;
Get-PinnedItem -Type TaskBar | Where-Object { $_.Name -like "$Pattern" } | Remove-PinnedItem;
Get-PinnedItem -Type TaskBar | Where-Object { $_.Name -like "$Pattern" } | ForEach-Object { Remove-PinnedItem $_ };
}

View file

@ -17,6 +17,7 @@ $null = New-Module {
for (; $i -lt $users.Count; $i++) {
Set-CurrentUser $i;
$name = $users[$i];
if (Test-Admin) {
Disable-BootMessage;

View file

@ -8,13 +8,13 @@ function Get-WslDistributionName {
return "ValhallaUbuntu";
}
<#
.SYNOPSIS
Gets the path to the directory containing the WSL distribution.
#>
function Get-WslDistributionPath {
return "$env:ProgramData/PortValhalla/$(Get-WslDistributionName)";
}
<#
.SYNOPSIS
Gets the path to the directory containing the WSL distribution.
#>
function Get-WslDistributionPath {
return "$env:ProgramData/PortValhalla/$(Get-WslDistributionName)";
}
<#
.SYNOPSIS
@ -63,9 +63,14 @@ function Install-Wsl {
function Install-WslDistribution {
$dir = Get-WslDistributionPath;
$root = Split-Path -Parent $dir;
$ubuntuPattern = "*Ubuntu*";
$registryPath = "HKCU:/Software/Microsoft/Windows/CurrentVersion/Lxss";
$key = Get-Item $registryPath;
if (Get-AppxPackage $ubuntuPattern) {
Install-Wsl;
}
if ($key) {
$key = $key | Rename-Item -NewName "$(Split-Path -Leaf $key)_" -PassThru;
}
@ -74,7 +79,7 @@ function Install-WslDistribution {
$null = New-Item -ItemType Directory $root;
}
Copy-Item -Recurse (Get-AppxPackage "*Ubuntu*").InstallLocation $dir;
Copy-Item -Recurse -Force (Get-AppxPackage $ubuntuPattern).InstallLocation $dir;
Set-UserPermissions $dir;
& "$dir\ubuntu.exe" install --root;
wsl --shutdown;
@ -109,7 +114,7 @@ function Register-WslDistribution {
function Unregister-WslDistribution {
$wslDisk = Get-WslDistributionDisk;
wsl --shutdown;
$tempDisk = Rename-Item $wslDisk "ext4_.vhdx" -PassThru;
$tempDisk = Rename-Item -Force $wslDisk "ext4_.vhdx" -PassThru;
Uninstall-WslDistribution;
Move-Item $tempDisk $wslDisk;
}

View file

@ -3,15 +3,12 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
$null = New-Module {
& {
param ($Parameters)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
$configPath = "$env:LocalAppData/LGHUB";
Export-ModuleMember -Function @();
<#
.SYNOPSIS
Stops the running Logitech G Hub instance.
@ -21,11 +18,18 @@ $null = New-Module {
param()
$hubName = "lghub_system_tray.exe";
$lghubPath = $(Get-Process | Where-Object { $_.Path -and ((Split-Path -Leaf $_.Path) -eq $hubName) })[0].Path;
$candidates = Get-Process | Where-Object { $_.Path -and ((Split-Path -Leaf $_.Path) -eq $hubName) };
if ($candidates.Count -gt 0) {
$lghubPath = $()[0].Path;
} else {
$lghubPath = $null;
}
$mainProcesses = Get-Process | Where-Object {
$_.Path -and
(@("lghub.exe", "lghub_agent.exe", $hubName) -contains (Split-Path -Leaf $_.Path)) -and
(@("lghub.exe", "lghub_agent.exe", "lghub_updater.exe", $hubName) -contains (Split-Path -Leaf $_.Path)) -and
(($_.Parent.ProcessName -eq "explorer") -or ($null -eq $_.Parent))
};
@ -78,6 +82,4 @@ $null = New-Module {
};
} $PSBoundParameters;
Start-SoftwareInstaller @PSBoundParameters `
# ToDo: Add restoration

View file

@ -3,13 +3,44 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
$path = "$HOME/Documents/ManiaPlanet";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Install-WingetPackage Nadeo.ManiaPlanet;
Remove-DesktopIcon "ManiaPlanet*";
};
Start-SoftwareInstaller @Parameters `
-Installer {
Install-WingetPackage Nadeo.ManiaPlanet;
Remove-DesktopIcon "ManiaPlanet*";
} `
-UserBackup {
param(
[hashtable] $Arguments
)
Add-BackupArtifacts -User $Arguments.Name -Source $path -Path "ManiaPlanet" `
-Include @(
"Actions",
"Blocks",
"Items",
"Maps",
"Media",
"Modules",
"Packs",
"Replays",
"Scripts",
"Skins"
);
} `
-UserConfigurator {
param(
[hashtable] $Arguments
)
Expand-BackupArtifacts -User $Arguments.Name -Path "ManiaPlanet" -Target $path;
} | Out-Host;
} $PSBoundParameters;
# ToDo: Add restoration

View file

@ -24,7 +24,7 @@ Start-SoftwareInstaller @parameters -Installer {
$module = $Arguments.Name;
& $Arguments.Installer @PSBoundParameters;
if (-not (& { powershell -Command "Import-Module $module; exit ([bool]`$Error)" 2> $null; $?; })) {
if (-not (& { powershell -NoProfile -Command "Import-Module $module; exit ([bool]`$Error)" 2> $null; $?; })) {
$feature = "NetFx3";
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {

View file

@ -6,10 +6,28 @@ param(
)
. "$PSScriptRoot/../../Scripts/AppAssociations.ps1";
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Install-ChocoPackage putty;
} `
-UserBackup {
param([hashtable] $Arguments)
$dir = New-TemporaryDirectory;
$fileName = Join-Path "$dir" PuTTY.reg;
& reg export "HKCU\Software\SimonTatham\PuTTY" $fileName /y;
Add-BackupArtifacts -User $Arguments.Name -Source $fileName -Path "PuTTY/PuTTY.reg";
Remove-Item -Recurse -Force $dir;
} `
-UserConfigurator {
param([hashtable] $Arguments)
$dir = New-TemporaryDirectory;
$fileName = Join-Path "$dir" PuTTY.reg;
Expand-BackupArtifacts -User $Arguments.Name -Path "PuTTY/PuTTY.reg" -Target $fileName;
& reg import $fileName;
Remove-Item -Recurse -Force $dir;
};
# ToDo: Add restoration

View file

@ -3,15 +3,36 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Install-ChocoPackage retroarch;
} `
-Configurator {
Add-StartMenuIcon "RetroArch" "C:\tools\RetroArch-Win64\retroarch.exe";
};
$null = New-Module {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
$path = "C:/tools/RetroArch-Win64";
Start-SoftwareInstaller @Parameters `
-Backup {
Add-BackupArtifacts -Path "RetroArch" -Source $path `
-Include @(
"config",
"cores",
"downloads",
"playlists",
"recordings",
"screenshots",
"content_history.lpl",
"content_*_history.lpl",
"retroarch.cfg"
);
} `
-Installer {
Install-ChocoPackage retroarch;
} `
-Configurator {
Add-StartMenuIcon "RetroArch" "C:\tools\RetroArch-Win64\retroarch.exe";
Expand-BackupArtifacts -Path "RetroArch" -Target $path;
} | Out-Host;
} $PSBoundParameters;
# ToDo: Add restoration

View file

@ -3,19 +3,42 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
foreach ($feature in @("DirectPlay", "NetFx3")) {
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
Write-Information "Enabling the ``$feature`` feature…";
choco install --source windowsFeatures -y $feature;
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
$path = "$HOME/Documents/TmForever";
Start-SoftwareInstaller @Parameters `
-Installer {
foreach ($feature in @("DirectPlay", "NetFx3")) {
if ((Get-WindowsOptionalFeature -Online -FeatureName $feature).State -ne "Enabled") {
Write-Information "Enabling the ``$feature`` feature…";
choco install --source windowsFeatures -y $feature;
}
}
}
Install-WingetPackage Nadeo.TrackManiaNationsForever;
Remove-DesktopIcon "*TmNationsForever*";
};
# ToDo: Add restoration
Install-WingetPackage Nadeo.TrackManiaNationsForever;
Remove-DesktopIcon "*TmNationsForever*";
} `
-UserBackup {
param([hashtable] $Arguments)
$name = $Arguments.Name;
Add-BackupArtifacts -User $name -Source $path -Path "TmNationsForever" `
-Include @(
"ChallengeMusics",
"MediaTracker",
"MenuMusics",
"Painter",
"Scores",
"Skins",
"Tracks"
);
} `
-UserConfigurator {
param([hashtable] $Arguments)
$name = $Arguments.Name;
Expand-BackupArtifacts -User $name -Path "TmNationsForever" -Target $path;
} | Out-Host;
} $PSBoundParameters;

View file

@ -3,10 +3,15 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
$path = "$HOME/Documents/TrackMania";
Start-SoftwareInstaller @Parameters `
-Installer {
$file = "TmUnitedForever.exe";
$dir = New-TemporaryDirectory;
@ -28,6 +33,21 @@ Start-SoftwareInstaller @PSBoundParameters `
$null = Pop-Location;
Remove-Item -Recurse $dir;
};
# ToDo: Add restoration
} `
-UserBackup {
param([hashtable] $Arguments)
Add-BackupArtifacts -User $Arguments.Name -Source $path -Path "TmUnitedForever" `
-Include @(
"ChallengeMusics",
"MediaTracker",
"MenuMusics",
"Scores",
"Skins",
"Tracks"
);
} `
-UserConfigurator {
param([hashtable] $Arguments)
Expand-BackupArtifacts -User $Arguments.Name -Path "TmUnitedForever" -Target $path;
} | Out-Host;
} $PSBoundParameters;

View file

@ -6,6 +6,8 @@ param(
& {
param($parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/SoftwareManagement.ps1";
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
@ -17,18 +19,64 @@ param(
[System.Tuple]::Create("visualstudio2022community", "VisualStudio.17.Release", "Microsoft.VisualStudio.Product.Community")
);
<#
.SYNOPSIS
Gets the path to the Visual Studio Installer.
#>
function Get-InstallerPath {
return "$((Get-KnownFolder ProgramFilesX86).Path)/Microsoft Visual Studio/Installer/vs_installer.exe";
}
<#
.SYNOPSIS
Gets the path to the configuration file in the backup archive.
.PARAMETER PackageName
The name of the package to get the configuration for.
#>
function Get-ConfigPath {
param(
[string] $PackageName
)
return Join-Path "Visual Studio" "$PackageName.vsconfig";
}
Start-SoftwareInstaller @parameters `
-Backup {
foreach ($version in $versions) {
if (Test-ChocoPackage $version[0]) {
Write-Host "Backing up ``$($version[0])";
$configFile = New-TemporaryFile;
Start-Process -FilePath (Get-InstallerPath) -Wait `
-ArgumentList @(
"export",
"--channelId", $version[1],
"--productId", $version[2],
"--config", $configFile,
"--quiet"
);
Add-BackupArtifacts -Source $configFile -Path (Get-ConfigPath $version[0]);
Remove-Item $configFile;
}
}
} `
-Installer {
foreach ($version in $versions) {
$packageName = $version[0];
Write-Host "Installing ``$packageName``";
Install-ChocoPackage $packageName;
$file = New-TemporaryFile;
Remove-Item $file;
Expand-BackupArtifacts -Path (Get-ConfigPath $packageName) -Target $file;
if (Test-Path $file) {
Write-Host "Restoring ``$packageName``";
Install-ChocoPackage $packageName -ArgumentList "--params","--config `"$file`"";
}
}
Remove-DesktopIcon "CocosCreator*";
Remove-DesktopIcon "Unity Hub*";
};
# ToDo: Add restoration
# Only restore version if it has been backed up
} $PSBoundParameters;

View file

@ -5,10 +5,45 @@ param(
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Install-ChocoPackage osu;
Remove-DesktopIcon "*osu*";
};
$null = New-Module {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
Export-ModuleMember -Function @();
# ToDo: Add restoration
<#
.SYNOPSIS
Gets the path to the installation directory of osu!.
#>
function Get-InstallPath {
return "$((Get-KnownFolder -SpecialFolder ProgramFilesX86).Path)/osu!";
}
Start-SoftwareInstaller @Parameters `
-Installer {
Install-ChocoPackage osu;
Remove-DesktopIcon "*osu*";
} `
-Backup {
Add-BackupArtifacts -Source (Get-InstallPath) -Path "osu!" `
-Include @(
"Screenshots",
"Skins",
"Songs",
"osu!.cfg",
"scores.db"
);
} `
-Configurator {
Expand-BackupArtifacts -Path "osu!" -Target (Get-InstallPath);
} `
-UserBackup {
param([hashtable] $Arguments)
$name = $Arguments.Name;
Add-BackupArtifacts -Source "$(Get-InstallPath)/osu!.$name.cfg" -User $name -Path "osu!/osu!.cfg";
} `
-UserConfigurator {
param([hashtable] $Arguments)
$name = $Arguments.Name;
Expand-BackupArtifacts -User $name -Path "osu!/osu!.cfg" -Target "$(Get-InstallPath)/osu!.$name.cfg";
};
} $PSBoundParameters;

View file

@ -3,13 +3,30 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
$path = "$env:AppData/osu";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Install-WingetPackage "ppy.osu";
Remove-DesktopIcon "*osu*";
};
# ToDo: Add restoration
Start-SoftwareInstaller @Parameters `
-UserBackup {
param([hashtable] $Arguments)
Add-BackupArtifacts -User $Arguments.Name -Source $path -Path "osu!lazer" `
-Include @(
"files",
"rulesets",
"screenshots",
"framework.ini",
"game.ini",
"input.json"
);
} `
-UserConfigurator {
param([hashtable] $Arguments)
Install-WingetPackage "ppy.osu" -ArgumentList "--scope","user";
Remove-DesktopIcon "*osu*";
Expand-BackupArtifacts -User $Arguments.Name -Path "osu!lazer" -Target $path;
};
} $PSBoundParameters;

View file

@ -3,20 +3,42 @@ param(
[hashtable] $Arguments
)
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
& {
param($Parameters)
. "$PSScriptRoot/../../Scripts/Restoration.ps1";
. "$PSScriptRoot/../../../Common/Scripts/BrowserAutomation.ps1";
. "$PSScriptRoot/../../../Common/Scripts/Software.ps1";
. "$PSScriptRoot/../../../Common/Scripts/System.ps1";
Start-SoftwareInstaller @PSBoundParameters `
-Installer {
Write-Host "Downloading reWASD…";
$dir = New-TemporaryDirectory;
$file = Start-BrowserDownload -URL "https://rewasd.com/" -ButtonSelector 'a.btn-default[href="#"]' -OutDir $dir -Timeout 1;
$path = "$env:Public/Documents/reWASD";
Write-Host "Installing reWASD…";
Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S";
Remove-Item -Recurse $dir;
Remove-DesktopIcon "*reWASD*";
};
Start-SoftwareInstaller @Parameters `
-Backup {
Add-BackupArtifacts -Path "reWASD" -Source $path `
-Exclude @(
"Logs",
"Presets",
"Profiles/Destop",
"Profiles/Duality",
"Profiles/Fortnite",
"Profiles/PS4 Remote*",
"Profiles/Switch console",
"Profiles/Switch to Xbox 360",
"Profiles/Valorant",
"Profiles/xCloud"
);
} `
-Installer {
Write-Host "Downloading reWASD…";
$dir = New-TemporaryDirectory;
$file = Start-BrowserDownload -URL "https://rewasd.com/" -ButtonSelector 'a.btn-default[href="#"]' -OutDir $dir -Timeout 1;
# ToDo: Add restoration
Write-Host "Installing reWASD…";
Start-Process -Wait -FilePath $($file.FullName) -ArgumentList "/S";
Remove-Item -Recurse $dir;
Remove-DesktopIcon "*reWASD*";
} `
-Configurator {
Expand-BackupArtifacts -Path "reWASD" -Target $path;
};
} $PSBoundParameters;

View file

@ -1,11 +1,19 @@
#!/bin/env fish
begin
set -l varName WIN11_IMAGE_PATH
set -l $varName
set -l dir (status dirname)
source "$dir/lib/choose-disk.fish"
set $varName (bash -c ". $(string escape $dir)/.env; echo \$$varName" 2> /dev/null)
set -q WIN11_IMAGE_PATH
[ ! -z "$$varName" ]
or begin
echo "Please specify the Windows 11 ISO in the `WIN11_IMAGE_PATH` variable."
if [ ! -f "$dir/.env" ]
cp $dir/.env.template $dir/.env
end
echo "Please epecify the path to the Windows 11 ISO image in your .env file located at:"
realpath --relative-to (pwd) (realpath $dir/.env)
exit 1
end
@ -158,7 +166,7 @@ begin
end
mkdir -p "$(dirname "$winpe")"
sudo mount --mkdir "$WIN11_IMAGE_PATH" "$winPath"
sudo mount --mkdir $$varName "$winPath"
mkwinpeimg --iso --arch amd64 --overlay "$winpeOverlay" --windows-dir "$winPath" "$winpe"
sudo mount --mkdir "$winpe" "$winpePath"

View file

@ -1,25 +0,0 @@
#!/bin/bash
WIN_DISK="${WIN_DISK}";
workingDir="$(pwd)";
pushd "${BASH_SOURCE%/*}" > /dev/null;
. "./.env" > /dev/null 2>&1;
if [ ! -z "$WIN11_IMAGE_PATH" ]
then
WIN11_IMAGE_PATH="$(bash -c "realpath $WIN11_IMAGE_PATH")";
fi;
if [ ! -f "$WIN11_IMAGE_PATH" ]
then
if [ ! -f "./.env" ]
then
cp .env.template .env;
fi;
echo "Please specify the path to the Windows 11 ISO image in your .env file located at:";
realpath --relative-to "$workingDir" "$(realpath .env)";
else
WIN11_IMAGE_PATH="$WIN11_IMAGE_PATH" exec fish ./deploy.fish $@;
fi;
popd > /dev/null;