Open VXsz opened 8 months ago
Hi, great guide to help people understand this. I want to add something small as I've had a problem trying to run thingy.exe. If thingy.exe immediatly closes after opening it, that means that there is an error in main.rs. In my case it could not find the input file where you put in the images to be cropped. To fix it, open main.rs in visual studio (code) and change the string in line 6 from "./input" to the directory where your images are stored. NB: windows will use the \ when copying an adres from file explorer; change this to / instead otherwise it will not work.
This tutorial was a life saver for someone who doesn't know squat about coding. One thing that wasn't mentioned though is that you have to put all the template images in the same folder as thingy.exe.
heads up, if you get a linker error, when installing build tools select Desktop development with C++
Hello, I have an error in step 6
The compiled program in target/debug called thingy.exe have an error
thread 'main' panicked at src/main.rs:7:10:
called Result::unwrap()
on an Err
value: Os { code: 3, kind: NotFound, message: "Le chemin d’accès spécifié est introuvable." }
stack backtrace:
0: 0x7ff7eebe12dd - std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library\std\src....\backtrace\src\backtrace\dbghelp64.rs:91
1: 0x7ff7eebe12dd - std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library\std\src....\backtrace\src\backtrace\mod.rs:66
2: 0x7ff7eebe12dd - std::sys_common::backtrace::_print_fmt
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library\std\src\sys_common\backtrace.rs:68
3: 0x7ff7eebe12dd - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library\std\src\sys_common\backtrace.rs:44
4: 0x7ff7eebf7019 - core::fmt::rt::Argument::fmt
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library\core\src\fmt\rt.rs:165
5: 0x7ff7eebf7019 - core::fmt::write
at /rustc/3f5fd8dd41153bc5fdca9427e9e05be2c767ba23/library\core\src\fmt\mod.rs:1168
6: 0x7ff7eebddf81 - std::io::Write::write_fmttarget\debug\thingy.exe
(exit code: 101)
Prepare to put effort into your inside jokes. I've never used rust before so somethings will be vague, but I've managed to get it running.
Step 1:
Step 2:
git
, then opening your CMD and typinggit clone https://github.com/Atakku/lpg
, this will clone the repo into the folder that the cmd it's currently at. I recommend knowing how the cmd works, if you want a specific location just go to it with the explorer and then click on an empty area on the path bar (left of search box in the explorer) and type cmd instead of what's written, this will open a cmd instance in the location directly.Step 6:
cd lpg
, you probably don't have any modules installed, so after that runcargo run
this will start downloading required modules and compile the program, once done you can find the compiled program in target/debug called thingy.exeYou can also grab it here as I did compile it, no virus %100 free download [Will post link once I get permission from repo author]
How it works you might ask? I had to figure it out from the code just like you
Basically, you make a folder beside the exe called "input", go inside the folder and paste all the pics inside, once that's done all you have to do now is run it and it will start doing it's thing and output to a folder called... output, in this process you won't get any activity inside the cmd shell that opens so there are no indicators of anything happeing, but it's processing images. To find the images, go down to LethalPosters/Paintings (just click thru the folders, it's trying to emulate how it works inside modpacks) and you will find all the images inside each respective folder and all of them were generated, it generates only upto 15 images of random combos (afaict) but you probably change the limit inside the code and re-compile, but the size will increase with it as each image can take from 700kb to 1.2mb and it will buildup fast.