Skip to content

Commit

Permalink
DISMTools 0.5.1 Update 3 (#195)
Browse files Browse the repository at this point in the history
* Update assembly information

* [Image info] Disable mnemonics for name and desc

* [Installer] Update compiler to 6.3.3

* [PE Helper] Update unattend apply

* [AppEvent] Disable timer on progress panel

* Update Inno Setup installer script (#192)

* Update Inno Setup installer script

* Update Installer/dt.iss

* Update dt.iss

Fix necessary things

---------

Co-authored-by: CodingWonders <[email protected]>

* [Installer] Additional Fixes

* [Installer] Additional Fixes for Stable

* [Translations] Italian correction: "Impegna" -> "Applica"

* [UnattendGen] Update versions

* [PE Helper] Remove log path warning for Selenium

* [Translations] Italian fixes

* [AppEvent] Include portable copy flag

* [Fix] Fixed exception

* [Enhance] Add panel border

* [REL] Update What's New section and Update Info files

---------

Co-authored-by: bovirus <[email protected]>
  • Loading branch information
CodingWonders and bovirus authored Nov 22, 2024
1 parent 3d7f0f4 commit 0b01312
Show file tree
Hide file tree
Showing 36 changed files with 134 additions and 68 deletions.
3 changes: 2 additions & 1 deletion ApplicationEvents.vb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Namespace My
" - DISMTools Version: " & My.Application.Info.Version.ToString() & CrLf &
" - Preview release? " & If(DISMTools.MainForm.dtBranch.Contains("preview"), "Yes", "No") & CrLf &
" - Branch: " & DISMTools.MainForm.dtBranch & CrLf &
" - Build time: " & DISMTools.PrgAbout.RetrieveLinkerTimestamp(My.Application.Info.DirectoryPath & "\" & My.Application.Info.AssemblyName & ".exe").ToString("yyMMdd-HHmm"))
" - Build time: " & DISMTools.PrgAbout.RetrieveLinkerTimestamp(My.Application.Info.DirectoryPath & "\" & My.Application.Info.AssemblyName & ".exe").ToString("yyMMdd-HHmm") & CrLf &
" - Portable copy? " & If(File.Exists(My.Application.Info.DirectoryPath & "\portable"), "Yes", "No") & CrLf)
' Get image information if a project has been loaded
If DISMTools.MainForm.isProjectLoaded And Not DISMTools.MainForm.OnlineManagement Then
Try
Expand Down
25 changes: 22 additions & 3 deletions Helpers/extps1/PE_Helper/PE_Helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ function Start-OSApplication
if (Test-Path "$((Get-Location).Path)\unattend.xml" -PathType Leaf)
{
Write-Host "A possible unattended answer file has been detected, applying it... " -NoNewline
if ((Start-DismCommand -Verb UnattendApply -ImagePath "$($driveLetter):\" -unattendPath "$((Get-Location).Path)\unattend.xml") -eq $true)
if ((Start-DismCommand -Verb UnattendApply -ImagePath "$($driveLetter):" -unattendPath "$((Get-Location).Path)\unattend.xml") -eq $true)
{
Write-Host "SUCCESS" -ForegroundColor White -BackgroundColor DarkGreen
}
Expand Down Expand Up @@ -1311,7 +1311,18 @@ function Start-DismCommand
}
}
"UnattendApply" {
Apply-WindowsUnattend -Path "$ImagePath" -UnattendPath "$unattendPath" -NoRestart
try
{
# Copy unattended answer file to target image
New-Item -ItemType Directory -Force -Path "$ImagePath\Windows\Panther"
Copy-Item -Path "$unattendPath" -Destination "$ImagePath\Windows\Panther\unattend.xml" -Force
New-Item -ItemType Directory -Force -Path "$ImagePath\Windows\System32\Sysprep"
Copy-Item -Path "$unattendPath" -Destination "$ImagePath\Windows\System32\Sysprep\unattend.xml" -Force
}
catch
{
Apply-WindowsUnattend -Path "$ImagePath\" -UnattendPath "$unattendPath" -NoRestart
}
}
default {

Expand Down Expand Up @@ -1358,8 +1369,16 @@ function Set-Serviceability
New-Item -Path "$folderPath\`$DISMTOOLS.~LS\PackageTemp\$guidStr" -ItemType Directory | Out-Null
Write-Host "Successfully created the scratch directory."
$scratchDir = "$folderPath\`$DISMTOOLS.~LS\PackageTemp\$guidStr"
New-Item -Path "$folderPath\Windows\Logs\DISMTools" -ItemType Directory -Force -ErrorAction SilentlyContinue | Out-Null
# Bit of a mouthful, but good for PowerShell verbs (+ scratch dir support)
dism /image=$ImagePath /scratchdir="$scratchDir" /is-serviceable
if (Test-Path -Path "$folderPath\Windows\Logs\DISMTools")
{
dism /image=$ImagePath /logpath="$folderPath\Windows\Logs\DISMTools\serviceability.log" /scratchdir="$scratchDir" /is-serviceable
}
else
{
dism /image=$ImagePath /scratchdir="$scratchDir" /is-serviceable
}
}
catch
{
Expand Down
2 changes: 1 addition & 1 deletion Installer/German.isl
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,6 @@ LaunchProgram=%1 starten
AssocFileExtension=&Registriere %1 mit der %2-Dateierweiterung
AssocingFileExtension=%1 wird mit der %2-Dateierweiterung registriert...
AutoStartProgramGroupDescription=Beginn des Setups:
AutoStartProgram=Starte automatisch%1
AutoStartProgram=Starte automatisch %1
AddonHostProgramNotFound=%1 konnte im ausgewählten Ordner nicht gefunden werden.%n%nMöchten Sie dennoch fortfahren?

Binary file modified Installer/ISCC.exe
Binary file not shown.
Binary file modified Installer/ISCmplr.dll
Binary file not shown.
Binary file modified Installer/ISPP.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions Installer/ISPPBuiltins.iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Inno Setup Preprocessor
//
// Inno Setup (C) 1997-2023 Jordan Russell. All Rights Reserved.
// Portions Copyright (C) 2000-2023 Martijn Laan. All Rights Reserved.
// Inno Setup (C) 1997-2024 Jordan Russell. All Rights Reserved.
// Portions Copyright (C) 2000-2024 Martijn Laan. All Rights Reserved.
// Portions Copyright (C) 2001-2004 Alex Yackimoff. All Rights Reserved.
//
// See the ISPP help file for more documentation of the functions defined by this file
Expand Down
Binary file modified Installer/Setup.e32
Binary file not shown.
Binary file modified Installer/SetupLdr.e32
Binary file not shown.
74 changes: 51 additions & 23 deletions Installer/dt.iss
Original file line number Diff line number Diff line change
@@ -1,55 +1,83 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "DISMTools"
#define MyAppVersion "0.5.1"
#define MyAppPublisher "CodingWonders Software"
#define MyAppURL "https://github.com/CodingWonders/DISMTools"
#define MyAppExeName "DISMTools.exe"
#define MyAppAssocName MyAppName + " project"
#define MyAppAssocExt ".dtproj"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
#define verConst "0.5.1"

#define pfDir "{commonpf}\DISMTools\Stable"
#define MyAppName "DISMTools"
#define MyAppExeName "DISMTools.exe"
#define MyAppVersion GetVersionNumbersString('.\files\' + MyAppExeName)
#define MyAppPublisher "CodingWonders Software"
#define MyAppURL "https://github.com/CodingWonders/DISMTools"
#define MyAppAssocName MyAppName + " project"
#define MyAppAssocExt ".dtproj"
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt

#define scName "DISMTools"
#define pfDir "{commonpf}\DISMTools\Stable"

#define scName "DISMTools"

#define CurrentYear GetDateTimeString('yyyy','','')
#define MyAppCopyright "(c) 2022-" + CurrentYear + " " + MyAppPublisher

#define AppListName MyAppName + " " + verConst

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{AB033696-A4AC-4DF2-B802-9D8BB8B0EEB5}}
AppId={{BC1A3BB3-3B0A-4D21-B778-0B21C136C6E0}}
; AppId={{AB033696-A4AC-4DF2-B802-9D8BB8B0EEB5}} - PREVIEW RELEASES ONLY
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}

; Uninstaller info
UninstallDisplayName={#AppListName}
UninstallDisplayIcon={app}\{#MyAppExeName}
AppPublisher={#MyAppPublisher}

; Copyright info
AppCopyright={#MyAppCopyright}

; URL support setup
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}

; Setup version info
VersionInfoDescription={#MyAppName} installer
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}

; Language info
ShowLanguageDialog=yes
UsePreviousLanguage=no
LanguageDetectionMethod=uilanguage

;Wizard setup
WizardStyle=modern
WizardImageFile=mainImg.bmp
WizardSmallImageFile=logo.bmp

; Uncomment the following line to run in non administrative install mode (install for current user only.)
PrivilegesRequired=admin

DefaultDirName={#pfDir}
DisableDirPage=yes
ChangesAssociations=yes
DisableProgramGroupPage=yes
LicenseFile=.\files\LICENSE
; Uncomment the following line to run in non administrative install mode (install for current user only.)
PrivilegesRequired=admin
OutputBaseFilename=dt_setup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
DisableWelcomePage=no
ArchitecturesInstallIn64BitMode=x64
CloseApplications=yes
WizardImageFile=mainImg.bmp
WizardSmallImageFile=logo.bmp
SetupIconFile=dt_inst.ico
UninstallFilesDir={#pfDir}

; Setup version info
VersionInfoProductVersion={#MyAppVersion}
VersionInfoProductTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
VersionInfoTextVersion={#MyAppVersion}

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "es"; MessagesFile: "compiler:Spanish.isl"
Expand Down Expand Up @@ -177,4 +205,4 @@ Filename: "{cmd}"; Parameters: "/C qprocess wimserv.exe && if %ERRORLEVEL% equ 0
Type: filesandordirs; Name: "{#pfDir}\logs"
Type: filesandordirs; Name: "{#pfDir}\tempinfo"
Type: files; Name: "{#pfDir}\settings.ini"
Type: filesandordirs; Name: "{#pfDir}"
Type: filesandordirs; Name: "{#pfDir}"
4 changes: 2 additions & 2 deletions Installer/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Inno Setup License
Except where otherwise noted, all of the documentation and software included in the Inno Setup
package is copyrighted by Jordan Russell.

Copyright (C) 1997-2023 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2023 Martijn Laan. All rights reserved.
Copyright (C) 1997-2024 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2024 Martijn Laan. All rights reserved.

This software is provided "as-is," without any express or implied warranty. In no event shall the
author be held liable for any damages arising from the use of this software.
Expand Down
2 changes: 2 additions & 0 deletions MainForm.Designer.vb

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

8 changes: 4 additions & 4 deletions MainForm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -7618,8 +7618,8 @@ Public Class MainForm
LinkLabel19.Text = "Smontare l'immagine"
GroupBox4.Text = "Operazioni sull'immagine"
Button26.Text = "Monta l'immagine..."
Button27.Text = "Impegna le modifiche correnti"
Button28.Text = "Impegnare e smontare l'immagine"
Button27.Text = "Applica le modifiche correnti"
Button28.Text = "Applicare e smontare l'immagine"
Button29.Text = "Smonta l'immagine eliminando le modifiche"
Button25.Text = "Ricarica la sessione di assistenza"
Button24.Text = "Cambia gli indici dell'immagine..."
Expand Down Expand Up @@ -9496,8 +9496,8 @@ Public Class MainForm
LinkLabel19.Text = "Smontare l'immagine"
GroupBox4.Text = "Operazioni sull'immagine"
Button26.Text = "Monta l'immagine..."
Button27.Text = "Impegna le modifiche correnti"
Button28.Text = "Impegnare e smontare l'immagine"
Button27.Text = "Applica le modifiche correnti"
Button28.Text = "Applicare e smontare l'immagine"
Button29.Text = "Smonta l'immagine eliminando le modifiche"
Button25.Text = "Ricarica la sessione di assistenza"
Button24.Text = "Cambia gli indici dell'immagine..."
Expand Down
4 changes: 2 additions & 2 deletions My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' mediante el asterisco ('*'), como se muestra a continuación:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("0.5.1.24102")>
<Assembly: AssemblyFileVersion("0.5.1.24102")>
<Assembly: AssemblyVersion("0.5.1.24112")>
<Assembly: AssemblyFileVersion("0.5.1.24112")>
2 changes: 1 addition & 1 deletion My Project/Resources.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 My Project/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<data name="WhatsNew" xml:space="preserve">
<value>To get more information about what's new in this release, check out the release notes over at:

https://github.com/CodingWonders/DISMTools/releases/tag/v0.5.1_upd2</value>
https://github.com/CodingWonders/DISMTools/releases/tag/v0.5.1_upd3</value>
</data>
<data name="split_img" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\split_img.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
Expand Down
1 change: 1 addition & 0 deletions Panels/DoWork/ProgressPanel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -6649,6 +6649,7 @@ Public Class ProgressPanel
End While
End If
' Cancel detector background worker which can interfere with image operations and cause crashes due to access violations
MainForm.MountedImageDetectorBWRestarterTimer.Enabled = False
MainForm.MountedImageDetectorBW.CancelAsync()
While MainForm.MountedImageDetectorBW.IsBusy
Application.DoEvents()
Expand Down
4 changes: 4 additions & 0 deletions Panels/Exe_Ops/Migration/MigrationForm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ Public Class MigrationForm
Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
Close()
End Sub

Private Sub MigrationForm_Paint(sender As Object, e As PaintEventArgs) Handles MyBase.Paint
ControlPaint.DrawBorder(e.Graphics, ClientRectangle, Color.FromArgb(53, 153, 41), ButtonBorderStyle.Solid)
End Sub
End Class
27 changes: 16 additions & 11 deletions Panels/Img_Ops/AppxPkgs/AddProvAppxPackage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ Public Class AddProvAppxPackage
Cancel_Button.Text = "Annullare"
OK_Button.Text = "OK"
CheckBox1.Text = "File dati personalizzato:"
CheckBox2.Text = "Impegnare l'immagine dopo l'aggiunta dei pacchetti AppX"
CheckBox2.Text = "Applicare l'immagine dopo l'aggiunta dei pacchetti AppX"
CustomDataFileOFD.Title = "Specifica un file di dati personalizzato"
GroupBox2.Text = "Dipendenze AppX"
GroupBox3.Text = "Regioni di AppX"
Expand Down Expand Up @@ -581,7 +581,7 @@ Public Class AddProvAppxPackage
Cancel_Button.Text = "Annullare"
OK_Button.Text = "OK"
CheckBox1.Text = "File dati personalizzato:"
CheckBox2.Text = "Impegnare l'immagine dopo l'aggiunta dei pacchetti AppX"
CheckBox2.Text = "Applicare l'immagine dopo l'aggiunta dei pacchetti AppX"
CustomDataFileOFD.Title = "Specifica un file di dati personalizzato"
GroupBox2.Text = "Dipendenze AppX"
GroupBox3.Text = "Regioni di AppX"
Expand Down Expand Up @@ -682,17 +682,22 @@ Public Class AddProvAppxPackage
Dim handle As IntPtr = MainForm.GetWindowHandle(Me)
If MainForm.IsWindowsVersionOrGreater(10, 0, 18362) Then MainForm.EnableDarkTitleBar(handle, MainForm.BackColor = Color.FromArgb(48, 48, 48))
AppxDetailsPanel.Height = If(ListView1.SelectedItems.Count <= 0, 520, 83)
If (FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductMajorPart >= 10 And FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductBuildPart >= 17134) And
(MainForm.imgVersionInfo.Major >= 10 And MainForm.imgVersionInfo.Build >= 17134) Then
GroupBox3.Enabled = True
Else
Try
If (FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductMajorPart >= 10 And FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductBuildPart >= 17134) And
(MainForm.imgVersionInfo.Major >= 10 And MainForm.imgVersionInfo.Build >= 17134) Then
GroupBox3.Enabled = True
Else
GroupBox3.Enabled = False
End If
If FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductMajorPart >= 10 And MainForm.imgVersionInfo.Major >= 10 Then
Panel2.Enabled = True
Else
Panel2.Enabled = False
End If
Catch ex As Exception
GroupBox3.Enabled = False
End If
If FileVersionInfo.GetVersionInfo(MainForm.DismExe).ProductMajorPart >= 10 And MainForm.imgVersionInfo.Major >= 10 Then
Panel2.Enabled = True
Else
Panel2.Enabled = False
End If
End Try
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Expand Down
4 changes: 2 additions & 2 deletions Panels/Img_Ops/Capabilities/AddCapabilities.vb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Public Class AddCapabilities
GroupBox2.Text = "Opzioni"
CheckBox1.Text = "Specifica un'origine diversa per l'installazione delle capacità"
CheckBox2.Text = "Limita l'accesso a Windows Update"
CheckBox3.Text = "Impegna l'immagine dopo l'aggiunta delle funzionalità"
CheckBox3.Text = "Applica l'immagine dopo l'aggiunta delle funzionalità"
ListView1.Columns(0).Text = "Capacità"
ListView1.Columns(1).Text = "Stato"
End Select
Expand Down Expand Up @@ -369,7 +369,7 @@ Public Class AddCapabilities
GroupBox2.Text = "Opzioni"
CheckBox1.Text = "Specifica un'origine diversa per l'installazione delle capacità"
CheckBox2.Text = "Limita l'accesso a Windows Update"
CheckBox3.Text = "Impegna l'immagine dopo l'aggiunta delle funzionalità"
CheckBox3.Text = "Applica l'immagine dopo l'aggiunta delle funzionalità"
ListView1.Columns(0).Text = "Capacità"
ListView1.Columns(1).Text = "Stato"
End Select
Expand Down
4 changes: 2 additions & 2 deletions Panels/Img_Ops/Drivers/AddDrivers.vb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Public Class AddDrivers
Button3.Text = "Rimuovi tutte le voci"
Button4.Text = "Rimuovi la voce selezionata"
CheckBox1.Text = "Forza l'installazione dei driver non firmati"
CheckBox2.Text = "Impegna l'immagine dopo l'aggiunta dei driver"
CheckBox2.Text = "Applica l'immagine dopo l'aggiunta dei driver"
GroupBox1.Text = "File di driver"
GroupBox2.Text = "Cartelle dei driver"
GroupBox3.Text = "Opzioni"
Expand Down Expand Up @@ -471,7 +471,7 @@ Public Class AddDrivers
Button3.Text = "Rimuovi tutte le voci"
Button4.Text = "Rimuovi la voce selezionata"
CheckBox1.Text = "Forza l'installazione dei driver non firmati"
CheckBox2.Text = "Impegna l'immagine dopo l'aggiunta dei driver"
CheckBox2.Text = "Applica l'immagine dopo l'aggiunta dei driver"
GroupBox1.Text = "File di driver"
GroupBox2.Text = "Cartelle dei driver"
GroupBox3.Text = "Opzioni"
Expand Down
Loading

0 comments on commit 0b01312

Please sign in to comment.