notscuffed / repkg Goto Github PK
View Code? Open in Web Editor NEWWallpaper engine PKG extractor/TEX to image converter
License: MIT License
Wallpaper engine PKG extractor/TEX to image converter
License: MIT License
Hello, I found your github page on google because I want to extract images from Scene and TEX files. However, I'm not very well proficient in understand how to use this on windows? I would greatly appreciate if you could tell me how.
Thank you.
Add support mpkg as well as .tex files in it.
Apparently, TexLoader::LoadTex
does not support loading "version 1" texture containers.
I tried everything and it just keeps saying "Done" without doing anything
i tried with the examples(changing the dir ofc) but couldn't make it work, ex:
D:\Downloads\Wallpaper.Engine.Pkg.To.Zip>repkg extract -t -d D:\Downloads\Wallpaper.Engine.Pkg.To.Zip\fondo\materials
- Decompiling: D:\Downloads\Wallpaper.Engine.Pkg.To.Zip\fondo\materials\v2-85a6dd9256b0167c08a83688c4e54c0a_r.tex
Format: ARGB8888
_unkInt_1: 2
_unkInt_2: 4281805824
_unkIntCont_0: 1
ImageFormat: FIF_UNKNOWN
Failed to decompile
System.IO.DirectoryNotFoundException: No se puede encontrar una parte de la ruta de acceso 'D:\Downloads\Wallpaper.Engine.Pkg.To.Zip\output\v2-85a6dd9256b0167c08a83688c4e54c0a_r.png'.
en System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
en System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
en System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
en System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes, Boolean checkHost)
en System.IO.File.WriteAllBytes(String path, Byte[] bytes)
en RePKG.Texture.Tex.DecompileAndSave(String path, Boolean overwrite)
en RePKG.Command.Extract.ExtractTexDirectory(DirectoryInfo directoryInfo)
Done
used the '-d' tag in that last one hoping it would help solving this.
maybe im forgetting something
I dont know how to open the console window because i dont find any files to open
It's a great tool, did it used Microsoft Windows API? Can it compile for Linux or macOS?
how?
extraction the .pkg gives the files that were in .pkg but does not put them into folders
it should put each of them into his respective folders(like bla.json in folder "models", but hmm.json and hmm.tex in "materials")
like this
this is another unpacker which I found online and if you put it new project folder with it's project.json and pkg.scene,it WORKS.
instead, the program (rekpg) does this
which if you put into a new project folder with it's project.json and pkg.scene, DOES NOT WORK.
maybe I am missing a command idk but i didn't found one who did this.
I downloaded some animated wallpaper projects but when I extract them, they just get stored as a static JPEG file. I was expecting to see a GIF file instead. There are some also some subfolders with "effects", "masks" that contain some PNG files that seemingly are supposed to form the animated elements but I have no idea how to put together those files. Does repkg natively support doing this with a setting or am I out of options?
Here is the project I am trying to extract btw if it helps - https://steamcommunity.com/sharedfiles/filedetails/?id=2426441418
I may be very bad at this, but whenever I open the .exe file, it opens the console and immediately closes.
How to convert it to video?
like this one
https://steamcommunity.com/sharedfiles/filedetails/?id=1664684538&searchtext=
do you open this with visual studio, or do you navigate to a specific directory in command prompt?
Hi
Instructions on how to set an output location are unclear
Please help
Thanks
I am running the following code, but no output is being created. I've tried it with the precomplied version you provided and one that I complied myself. Tried it in admin and normal powershell. Also tried all of the examples that you provided in the readme
PS C:\Users\mchad\Desktop\build> .\repkg.exe extract -e tex -s -o "C:\Users\mchad\Desktop\scene (2)\Unpacked" "C:\Users\mchad\Desktop\scene (2)"
Could you add a feature which converts the output back to .tex ? (Recompiling Feature)
Why can't my win10 open pkg?
I personally could really use the functionality you're building. I can do something similar with Python code, but it's tedious.
Good luck with your development! :)
Hi there,
When I tried to convert a large .tex file (about 83 MB) using the program, it throws an error and skips that file.
* Extracting: materials/File Nov 08, 17 51 21.tex
* Reading: materials/File Nov 08, 17 51 21.tex
Failed to read texture
RePKG.Application.Exceptions.UnsafeTexException: Unsafe TEX detected, reason: Mipmap byte count exceeds maximum size: 64223148/50000000
at RePKG.Application.Texture.TexImageReader.ReadBytes(BinaryReader reader)
at RePKG.Application.Texture.TexImageReader.ReadMipmapV2And3(BinaryReader reader)
at RePKG.Application.Texture.TexImageReader.ReadFrom(BinaryReader reader, TexImageContainer container, TexFormat texFormat)
at RePKG.Application.Texture.TexImageContainerReader.ReadFrom(BinaryReader reader, TexFormat texFormat)
at RePKG.Application.Texture.TexReader.ReadFrom(BinaryReader reader)
at RePKG.Command.Extract.LoadTex(Byte[] bytes, String name)
Is there a way to avoid this maximum byte detection? Thanks for any response.
Oh~ I'm in some trouble:
run extract Command
Failed to read texture
RePKG.Application.Exceptions.UnknownMagicException: Unknown magic: '1XET�' in 'TexReader:Magic1'
在 RePKG.Application.Texture.TexReader.ReadFrom(BinaryReader reader)
Position: \TexReader.cs:line 47
in RePKG.Command.Extract.LoadTex(Byte[] bytes, String name) position \RePKG\Command\Extract.cs:line 351
So i tried using it and can´t find a way to get it to work.
The Windows Update History doesn´t let me uninstall the updates which changed the NETFramework Version and i can´t seem to install 4.7.2 since Windows detects a newer version and cancels the installation.
Is there a way to change / upgrade your tool to the Current version of NETFramework ?
Or maybe another workaround ?
so i'm trying to extract around 40 .tex files and after doing everything i could the error keeps popping, i put the command
extract -t -s C:\Users\Dell\Desktop\texconvert
wich is the directory with the tex files.
and it gives the "input file not found". have tried specifying the exact file in the route but nothing. how can i fix this pls.
CMD中的错误输出:
RePKG.Application.Exceptions.UnknownMagicException: Unknown magic: 'TEXS0001' in 'TexFrameInfoContainerReader'
在 RePKG.Application.Texture.TexFrameInfoContainerReader.ReadFrom(BinaryReader reader)
在 RePKG.Application.Texture.TexReader.ReadFrom(BinaryReader reader)
在 RePKG.Command.Extract.LoadTex(Byte[] bytes, String name)
Done
Hello, I'm sorry to bother you. My English is not very good, and I am currently using translation software. It's like this, I'm trying to unpack the mpkg file, which is the wallpaper file for Wallpaper mobile version. I encountered some issues while unpacking the tex file. I have only learned a little Python, and C # is a bit difficult to understand. However, I still browsed through your C # source code and found that in the texture type, 0=>ARGB8888, 4=>DXT5, 6=>DXT3, 7=>DXT1, 8=>RG88, 9=>R8. However, the texture type of this file is 05, so the program threw an exception. I don't know which texture format this is, but after researching,** I speculate it's ETC2. But I don't know how this texture format is encoded, **so I would like to ask where you can find relevant information. Look forward to your reply with the least possible delay.
https://steamcommunity.com/sharedfiles/filedetails/?id=3176607929
It's a bit difficult.
How to extract GIF files
Anyone who has successfully extracted gifs, please give the answer, thank you!
`* Extracting: materials/Untitled.json
File scene.pkg
needs to be unzipped
Need a gif of the inside
scene.zip
I ran the project but I got a hint "Verb 'repkg' is not recognized."
I don't have any ati-virus software and I have windows defender disabled so I'm sure this isn't the issue and it just closes instantly
Hello,
I was looking for an extractor for the tex files in wallpaper-engine and I found this software.
I tried using it to extracte the .tex files contained by default in wallpaper engine and I ran into this error by running this command:
RePKG.exe extract -t F:\app\Wallpaper-engine-extrator\fileToExtract
And this is the output:
Does this error has to do with my command or with the software ?
Here are the files in the extract directory:
Thanks for your answer and nice work.
I don't know why the owner couldn't just put a release on this repo, I had to download the entirety of Visual Studio to compile this as a result of that... But anyway, I uploaded it on MediaFire so you guys don't have to go through the same shit I went through :)
I didn't have the .exe, but upon checking the other issues, I found the .exe, which probably means I'm missing the page where I'm supposed to find that. I've also checked other issues, and seen I'm supposed to open it with the console, which I assumed was Command Promt, but I've tried using that, Git CMD and Git Bash, as well as just opening the .exe file (Which I've tried placing in both the Desktop and the RePKG Source folder, neither of which make a difference). I'm not sure where I've gone wrong, but would appreciate any help you can give.
Not familiar with your programming language and IDE, can you provide a compiled executable file? Thank you very much.
The output of the program is this:
System.ArgumentException: Crop rectangle should be smaller than the source bounds.
Parameter name: cropRectangle
at SixLabors.Guard.ThrowArgumentException(String message, String parameterName)
at SixLabors.ImageSharp.Processing.Processors.Transforms.CropProcessor..ctor(Rectangle cropRectangle, Size sourceSize)
at SixLabors.ImageSharp.Processing.CropExtensions.Crop(IImageProcessingContext source, Rectangle cropRectangle)
at RePKG.Application.Texture.TexToImageConverter.<>c__DisplayClass2_0.<ConvertToGif>b__0(IImageProcessingContext context)
at SixLabors.ImageSharp.Processing.ProcessingExtensions.ProcessingVisitor.Visit[TPixel](Image1` image)
at SixLabors.ImageSharp.Processing.ProcessingExtensions.Clone(Image source, Action`1 operation)
at RePKG.Application.Texture.TexToImageConverter.ConvertToGif(ITex tex)
at RePKG.Command.Extract.ConvertToImageAndSave(ITex tex, String path, Boolean overwrite)
at RePKG.Command.Extract.ExtractFile(FileInfo fileInfo)
Done
This happens when trying to convert the leaves1.tex file from the default wallpaper engine assets.
I'm including the file just in case my files are different (github does not support .tex files, so I renamed it to a .txt file).
leaves1.tex.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.