Skip to content

Services refactor#12

Merged
JeBobs merged 5 commits into
mainfrom
services-refactor
Jun 17, 2026
Merged

Services refactor#12
JeBobs merged 5 commits into
mainfrom
services-refactor

Conversation

@JeBobs

@JeBobs JeBobs commented Jun 17, 2026

Copy link
Copy Markdown
Member

No description provided.

@JeBobs JeBobs merged commit 1e815f0 into main Jun 17, 2026
1 check passed
@JeBobs JeBobs deleted the services-refactor branch June 17, 2026 22:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d24dbd783

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +36 to +40
if (Assembly.GetEntryAssembly()?.Location is string entryAssemblyLocation &&
!string.IsNullOrEmpty(entryAssemblyLocation))
{
processPath = entryAssemblyLocation;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the real process path for runtime directories

When this CLI is published with PublishSingleFile and IncludeAllContentForSelfExtract, the entry assembly can be loaded from the bundle extraction directory, so using Assembly.GetEntryAssembly().Location first makes data/ResourceDB, data/Resources, and tools resolve under the extraction cache instead of next to the executable. In published releases that means user data placed beside the exe is ignored and imports can be written to a temp/extraction location; use the actual process/apphost path for the base directory before falling back to assembly location.

Useful? React with 👍 / 👎.

Comment on lines +47 to +51
byte[] header = new byte[0xE];
using MemoryStream ps3Stream = new(header);
using ResourceBinaryWriter writer = new(ps3Stream, texture.ResourceEndian);

texture.WriteToStream(writer);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid writing the PS3 header into a 14-byte buffer

For porttexture --usegtf with a PS3 source, this new service method is called before running gtf2dds, but it creates a fixed 0xE-byte MemoryStream and then calls TexturePS3.WriteToStream, which writes the full PS3 texture header plus padding. That overflows the non-expandable buffer (or leaves the stream positioned past the data), so GTF conversion fails before any bitmap is converted; write to an expandable stream and copy the first 0xE bytes, or read those bytes from the original header file.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants