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

Added .packignore support to exclude files from PAKs #274

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

trieck
Copy link

@trieck trieck commented Feb 8, 2025

Add .packignore support to exclude files from PAK archives

This PR introduces support for a .packignore file, allowing modders to exclude specific files and directories from being packed into .PAK archives. This prevents unwanted files, such as source control folders, temporary logs, or build artifacts, from being included in the final package.

Why This Feature is Needed

Currently, LSLib includes all files within a directory when creating a .PAK, which can lead to temporary build files and other unnecessary files being packed. Until now, modders had to manually remove these files before packaging. This PR provides a clean solution by allowing modders to define exclusions in a .packignore file.

How It Works

The .packignore file is placed in the mod directory and follows a similar syntax to .gitignore, supporting:

  • Specific files (debug.log, config.json)
  • Folders (bin/, obj/, .git/)
  • Wildcards (*.log, *.tmp)

Example .packignore file:

.git/
.vs/
*.bak
*.tmp
.*

@trieck trieck marked this pull request as ready for review February 13, 2025 16:22
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.

1 participant