-
Notifications
You must be signed in to change notification settings - Fork 5k
Crossplatform ResourceUpdater #89303
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
Merged
elinor-fung
merged 79 commits into
dotnet:main
from
anatawa12:crossplatform-resource-updater
Aug 8, 2023
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
ad7e0e2
add Mono.Cecil.Binary from mono repository
anatawa12 36e12c8
port Mono.Cecil.Binary onto netstandard2.0
anatawa12 379d8a8
reformat Mono.Cecil.Binary
anatawa12 a6d09c6
make Mono.Cecil.Binary.Image and Mono.Cecil.Binary.ImageReader public
anatawa12 a53eb03
rewrite ResourceUpdater.AddResource with Mono.Cecil.Binary
anatawa12 cf8effd
reimplement AddResourcesFromPEImage with Mono.Cecil.Binary
anatawa12 11e2c45
reimplement ResourceUpdater with Mono.Cecil.Binary.ImageWriter
anatawa12 2d5d598
fix: remove unused csproj
anatawa12 a06aeef
publish mono cecil binary
anatawa12 7778151
chore: remove unnecessary mappings
anatawa12 bff5f19
leave open FileStream
anatawa12 027cf55
update binary with our own code instead of ImageWriter
anatawa12 2ccadd8
remove unused files from Mono.Cecil.Binary
anatawa12 6022cfd
flatten Mono.Cecil.Binary
anatawa12 455eab7
fix
anatawa12 dde91d4
clear padding
anatawa12 a4de95c
fix ResourceWriter
anatawa12 df8b502
reimplement ResourceUpdater with System.Reflection.Metadata and ILCom…
anatawa12 832629f
make ResourceData.WriteResources working
anatawa12 4a7c516
remove Mono.Cecil.Binary
anatawa12 99d0f3d
add unit test for ResourceUpdater
anatawa12 8dd9c0a
fix bad image file if resource delta is small
anatawa12 9542736
ResourceUpdaterAddResource is WindowsOnlyFact
anatawa12 55631c2
Use CoreClrProjectRoot instead of long relative path
anatawa12 8059a5c
make ResourceUpdaterAddResource test simple
anatawa12 49e1130
use int instead of uint
anatawa12 033ad24
fix ResourceUpdaterAddResource test
anatawa12 08b4cd1
support adding section in ResourceUpdater
anatawa12 5e6f581
add more unit tests
anatawa12 e5fc1e6
use GetExecutingAssembly for PE with .rsrc section
anatawa12 5abe05d
Merge branch 'main' into crossplatform-resource-updater
anatawa12 efe5b1c
fix: ResourceUpdater is not disposed in HostWriter
anatawa12 3a60147
extract ObjectDataBuilder for HostModel to an separated file
anatawa12 5c2bf12
move Win32Resources for host model to Microsoft.NET.HostModel.Win32Re…
anatawa12 e630a0e
move files for Win32Resources
anatawa12 6bf8b25
improve readability with #if
anatawa12 42c5798
move ResourceUpdaterTests to Microsoft.NET.HostModel.AppHost.Tests
anatawa12 20b384e
fix duplicated code in ResourceUpdaterTests
anatawa12 4ae6177
fix pe32InitializedDataSizeOffset
anatawa12 1a64d91
rename offsets
anatawa12 5878ecb
move offsets constants to into Offsets class
anatawa12 b893113
throw InvalidOperationException if Update is already called.
anatawa12 dce2f4c
use RetryUtil.RetryOnIOError
anatawa12 3703177
addd more tests for AddResource
anatawa12 5241c08
add test for AddResourcesFromPEImage
anatawa12 75340cf
use GetAllResources in CopyResourcesFrom
anatawa12 0788ea5
set fileshare
anatawa12 1e6f4d8
use memory mapped file in ResourceUpdater
anatawa12 0a27042
remove outdated comment
anatawa12 81a05fb
DosStab -> DosStub
anatawa12 7aabeef
fix styling
anatawa12 bd3bab8
use using block instead of using var
anatawa12 36c8579
buffer -> accessor
anatawa12 ac45717
CopyRes(Name|Type) -> SelectRes(Name|Type)
anatawa12 d6d390a
use Assert.Fail instead of InvalidOperationException
anatawa12 30b3943
use CreateTestPEFileWithoutRsrc in AddResourcesFromPEImage
anatawa12 a9e975c
PE(32|64)(InitializedDataSize|SizeOfImage) -> (InitializedDataSize|Si…
anatawa12 eef78a2
add dataDirectoriesOffset and pull the updating of data directories o…
anatawa12 34ca149
add offsets around DataDirectory
anatawa12 9288922
throw exception in ThrowExceptionForInvalidUpdate
anatawa12 33abdc8
fix parameter names of AddResource
anatawa12 647b250
reorder parameters of AddResource and AddResourceInternal to match wi…
anatawa12 a224eda
add test ResourceUpdaterAddResourceTwoSameUShortTypeWithDifferName
anatawa12 d174ece
move calling ResourceUpdater and open appHostDestinationFilePath once
anatawa12 545965b
use single code to modify InitializedDataSize and SizeOfImage
anatawa12 5a1cfd0
seek to head in ResourceUpdater constructor
anatawa12 8a8ca68
insert blank line
anatawa12 b2bbd1b
Update comment
anatawa12 92defd3
improve test name
anatawa12 ab5d5e0
remove throw from ThrowExceptionForInvalidUpdate caller
anatawa12 30c3451
strip ResourceData constructor with PEReader from ilc/crossgen
anatawa12 de8455f
update doc comments in ResourceUpdater
anatawa12 7ec110e
add test for app with unknown language resource
anatawa12 ed3f32a
fix CreateAppHost failure from old SDK
anatawa12 6e8120b
share offsets constants of PE between PEUtils and ResourceUpdater
anatawa12 b829782
DosStubSignature -> DosImageSignature
anatawa12 fe92cc3
move AppWithUnknownLanguageResource to Microsoft.NET.HostModel.AppHos…
anatawa12 1470480
Merge branch 'dotnet:main' into crossplatform-resource-updater
anatawa12 65f23d4
Merge branch 'dotnet:main' into crossplatform-resource-updater
anatawa12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.