Hamcha / lumaupdate

Updater for Luma3DS.. as a 3DS homebrew!
Do What The F*ck You Want To Public License
146 stars 68 forks source link

Check for partial downloads / corrupt archives #29

Closed Hamcha closed 8 years ago

Hamcha commented 8 years ago

One time one user said on one reddit thread that something like this happened.

Seems sort of unlikely, but maybe considering adding some checks wouldn't be bad…

quizque commented 8 years ago

That's what the .bin.bak file is for but it would be nice. But, for this to happen Luma3DS would need to have checksums(sha,md5 ect) or he would need to host the checksum file him self

Hamcha commented 8 years ago

I was actually thinking of a really stupid check (like file size), if that matches and the archive can be opened and extracted, the chance of it being broken (but somehow working) are low enough.

An added check that can be done (as long as the file is small) is the MD5 sum. Github uses AWS S3 to host files (and both official and hourlies use it) and S3 provides an "Etag" header which can be computed in different ways, but most of the time (unless multipart upload is involved, which only happens with big enough files) the ETag will be the MD5 of the uploaded file.

I think I'd make this second check optional since it 1. Might break in some cases 2. Take time to calculate the MD5 of the archive.

quizque commented 8 years ago

It shouldn't take that long to calculate MD5. But also I got a question, Now this is a bit off topic but due to where I am right now I can't visit many pages and must do it trough email, but anyway my question is how did you make a 3d model banner?!?!?!? There is a mass lack of 3d banners in 3ds homebrews because most people don't know how to do it. If you know of a tutoiral I missed during my google serch please link it.

Hamcha commented 8 years ago

I haven't used a tutorial (or found one when I searched). but it's sort of simple:

Every File Explorer has a OBJ -> CGFX converter. Just create your OBJ with model and texture mapped with your 3D modelling app of choice, then follow this path through EFE: EFE -> New from File -> Nintendo 3DS Plugin -> CTR Graphics

You need to get scale and rotation right in your OBJ as they're kinda messed up (you can use my luma model as reference).

Since there are some issues on how textures are handled (alpha in particular) and I'd love a command line tool for doing the conversion, I'm working on a CGFX toolchain myself, but it's in a very primitive stage right now.

quizque commented 8 years ago

Ok thanks once i get it working I'll put a tutorial on GBATemp or Reddit

On Jun 8, 2016, at 1:01 PM, ‮ahcmaH notifications@github.com wrote:

I haven't used a tutorial (or found one when I searched). but it's sort of simple.

Every File Explorer has a OBJ -> CGFX converter. Just create your OBJ with model and texture mapped with your 3D modelling app of choice, then follow this path through EFE:

You need to get scale and rotation right as they're kinda messed up (you can use my luma model as reference).

Since there are some issues on how textures are handled (alpha in particular) and I'd love a command line tool for doing the conversion, I'm working on a CGFX toolchain myself, but it's in a very primitive stage right now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

quizque commented 8 years ago

So after a lot of fails trying to make a 3d banner I gave up, but I decided to see what would happen if I did it with your model. So after opening it in Wings 3D > Adding Textures > Exporting > Converting in EFE this happened. capture Its the same thing that has been happening to the other models and I can find a solution :/ I use EFE to convert and Wings 3D to make the models.

Hamcha commented 8 years ago

Sorry but I have no idea how that might have happened. I've only had issues with semitransparent textures so far, never something like that.

Have you been using luma.wings or luma.merged.wings ? The latter one has proper rotation/scale and has been all merged all in one mesh (and it's what I used to create the CGFX)

quizque commented 8 years ago

I have used the non merged one I'll try it rn

On Jun 9, 2016, at 4:52 PM, ‮ahcmaH notifications@github.com wrote:

Sorry but I have no idea how that might have happened. I've only had issues with semitransparent textures so far, never something like that.

Have you been using luma.wings or luma.merged.wings ? The latter one has proper rotation/scale and has been all merged all in one mesh (and it's what I used to create the CGFX)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Hamcha commented 8 years ago

To get back on topic, Integrity checks are in (both of them) with 245a597

Testing required.

quizque commented 8 years ago

I can test right now, I'll get back with the results

On Jun 10, 2016, at 5:54 AM, ‮ahcmaH notifications@github.com wrote:

To get back on topic, Integrity checks are in (both of them) with 245a597

Testing required.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

quizque commented 8 years ago

When I tried to build the new version it fails, this is the log. I got makerom and bannertool in my PATH the new ctrulib version and zlib.

Hamcha commented 8 years ago

What ctrulib commit are you compiling it with? I've just updated to 3a10698 and it compiles fine.

quizque commented 8 years ago

The latest one

On Jun 10, 2016, at 3:39 PM, ‮ahcmaH notifications@github.com wrote:

What commit are you running? I've just updated to 3a10698 and it compiles fine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Hamcha commented 8 years ago

"The latest one" works for me, though. Do you really have it installed correctly and everything? The error you reported happens with the stable version (1.1.0).

Also, if you want to continue please query me on IRC (Freenode, Efnet) or use emails directly to santo@padrepio.in

This issue has been resolved with e450d80.

quizque commented 8 years ago

Odd I'll try latter

On Jun 11, 2016, at 3:41 AM, ‮ahcmaH notifications@github.com wrote:

"The latest one" works for me, though. Do you really have it installed correctly and everything? The error you reported happens with the stable version (1.1.0).

Also, if you want to continue please query me on IRC (Freenode, Efnet) or use emails directly to santo@padrepio.in

This issue has been resolved with e450d80.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.