Homebrew RELEASE TinWoo Installer

Status
Not open for further replies.

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
OK, I must have uploaded the wrong version - I deleted the config file from mine, started the app and it was in English.

Also, I uploaded the wrong lang.cpp file - it should have this in it:

case 99:
languagePath = "romfs:/lang/en.json";
 
Last edited by mrdude,
  • Like
Reactions: binkinator

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
FYI -1.0.6 is now on the github release page.

Fixed - added case99 to languages.
Added - L2 and R2 buttons for faster scrolling through your games.
Added: Some other bugfixes.
Added: http option to install from a http directory - you can get php indexers from here, if you want to serve your games from a NAS or website:

PHP Server for game installs from your own server
https://github.com/TheLogicMaster/phpTinfoilServer

NSP Indexer
https://github.com/proconsule/nspindexer

**Note some fixes were take from fixes to AtomXL-installer.
https://github.com/dezem/AtmoXL-Titel-Installer
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
FYI -1.0.6 is now on the github release page.

Fixed - added case99 to languages.
Added - L2 and R2 buttons for faster scrolling through your games.
Added: Some other bugfixes.
Added: http option to install from a http directory - you can get php indexers from here, if you want to serve your games from a NAS or website:

PHP Server for game installs from your own server
https://github.com/TheLogicMaster/phpTinfoilServer

NSP Indexer
https://github.com/proconsule/nspindexer

**Note some fixes were take from fixes to AtomXL-installer.
https://github.com/dezem/AtmoXL-Titel-Installer

I just did some extra stuff with NSPIndexer to serve up my entire stash (3x8TB drives) with it. HTTP option is a fantastic add! If anyone has issues getting nspindexer running in Windows/IIS (Linux and Docker are plug and play)…hit me up!
 
Last edited by binkinator,

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
I just did some extra stuff with NSPIndexer to serve up my entire stash (3x8TB drives) with it. HTTP option is a fantastic add! If anyone has issues getting nspindexer running in Windows/IIS (Linux and Docker are plug and play)…hit me up!
I just pushed an update to the dev branch to fix a crash on an empty url.
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
I just pushed an update to the dev branch to fix a crash on an empty url.
Cool!

What to put in the URL bit?

permutations I’ve tried:

192.168.4.27
http://192.168.4.27
http://192.168.4.27/index.php
http://192.168.4.27/index.php?DBI
http://192.168.4.27/index.php?tinfoil

so far I get:

664AE822-90F9-401A-ADF2-80D9D0DC435C.jpeg

My nspindexer instance is up and running dev release 0.5 and reachable from my iPad (on the same network as my Switch.) I limited the number of games to make sure it’s not pagination or slow response on the server side.


2F7007CF-A4E6-4D2C-818C-3386EA97F8B5.png

e: I don’t have to send it each link one at a time, do I?
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
I used this one:

https://github.com/TheLogicMaster/phpTinfoilServer

Put the index.php in a folder and a Games folder in the same folder as index.php, then put the nsp in the games folder. Then point your switch the folder where the index,php is installed.

I have that one too…will give it a go.

nspindexer will do recursion.

e: getting something different but not 100% green yet…

URL I’m using (on same server as nspindexer)

image.jpg

result I’m getting:

image.jpg


here are my two php scripts (and the URL for each) side by side:


6B23B34A-44F1-4352-8875-BC9018F01161.jpeg


As an aside, here is what nspindexer looks like with both tinfoil and DBI options…looks like it’s closer to tinfoil.

E4EC3F59-753A-47B6-AEE2-FDE9253E04D8.jpeg
 
Last edited by binkinator,
  • Like
Reactions: peteruk

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
I have that one too…will give it a go.

nspindexer will do recursion.

e: getting something different but not 100% green yet…

URL I’m using (on same server as nspindexer)

View attachment 308525

result I’m getting:

View attachment 308526


here are my two php scripts (and the URL for each) side by side:
Don't put the url as index.php in the switch

Rename the php to index.php - The url you type is: example!

http://192.168.0.10/folder-with-index-php

Put the games folder in the same place you have index.php.
 
  • Like
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
Don't put the url as index.php in the switch

Rename the php to index.php - The url you type is: example!

http://192.168.0.10/folder-with-index-php

Put the games folder in the same place you have index.php.

Here's the setup now (folder with index.php is tinwoo folder with games in the same) Responds with data in the browser but same error from the switch side.

1651616906672.png

With or without trailing slash/

image.jpgimage.jpg


image.jpg
 
Last edited by binkinator,

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
BTW, I will keep testing as long as you care to, however this is not life and death so feel free to say “bugger off for the night” at any time. Really appreciate all you’ve done already.
 

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
Maybe you need to chmod the folder the games are in to 755, I put the files on a raspberry pi to test.

3h5alNU.jpg

LQZq4iM.jpg

GUe6ly7.jpg


You probably didn't give your folder the correct permissions.
 
  • Like
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
Maybe you need to chmod the folder the games are in to 755, I put the files on a raspberry pi to test.

You probably didn't give your folder the correct permissions.

I’ve changed permissions (on Windows IIS at the moment) to no avail.

Was able to hit my phpTinfoilServer with Tinfoil:
0ECB6BF7-DD61-479D-AA53-64B5D5501ABA.jpeg CFCFAC50-ACA0-4724-930C-1BCCDF111C14.jpeg

I switched to the dev branch and recompiled so we’re both looking at the same thing
(color change is just my Tinwoo/Tinfoil themes I made for chronoss’ Blue Abstract switch theme)

image.jpg
I no longer get the pop up error but now it just hangs here:

image.jpg

In the code it appeared that we’re looking for …/index (with no extension) so I did a mod rewrite that silently redirects index to index.php but that didn’t help either.

I’m hugely suspicious of my web server so I’m going to try it on my rPi as well and see if it’s server side.
(Upside is I’m way more comfortable with Linux anyhow.)
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
Got it! Definitely server side!

Your shit works great, @mrdude!
(I will figure out how to get IIS and nut.exe to work with this on my own time outside your TinWoo thread.)

PHPTinfoilServer had a docker-compose and I was able to serve my games from a container and install without issue.

image.jpg

image.jpg

image.jpg

Thanks again for an awesome HomeBrew.
 
  • Like
Reactions: mrdude

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
Got it! Definitely server side!

Your shit works great, @mrdude!
(I will figure out how to get IIS and nut.exe to work with this on my own time outside your TinWoo thread.)

PHPTinfoilServer had a docker-compose and I was able to serve my games from a container and install without issue.

View attachment 308557

View attachment 308558

View attachment 308559

Thanks again for an awesome HomeBrew.
Maybe you can share your php file with the forum?

There's also this:
https://github.com/ibnux/php-tinfoil-server

or

https://github.com/TheyKilledKenny/PHPinfoil/
 
Last edited by mrdude,
  • Like
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
Maybe you can share your php file with the forum?

I certainly can. I only wish it were more clever...

Very simple directory structure...everything self contained
Code:
total 14
drws--Srwt+ 1 wwiii wwiii   0 May  3 20:15 .
drws--Srwt+ 1 wwiii wwiii   0 May  3 20:53 ..
-rw-r--r--+ 1 wwiii wwiii 212 May  3 20:15 docker-compose.yml
drws--Srwt+ 1 wwiii wwiii   0 May  3 17:13 games
-rws--Srwt+ 1 wwiii wwiii 530 May  3 16:50 index.php
(ignore permissions...I'm using cygwin on Windows)

The index.php file was pulled directly from the site you linked previously: https://github.com/TheLogicMaster/phpTinfoilServer

Code:
<?php
$gameDir = "games/";
$ignoreDirs = array('.', '..', '.convert');
$games = array_diff(scandir($gameDir), $ignoreDirs);
$addr = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]/$gameDir";
$output = '{"files":[';
foreach ($games as $game) {
  $dir = rawurlencode($game);
  $output = $output. '{"url":"'. "$addr$dir". '","size":'. filesize($gameDir. $game). '},';
}
$output = rtrim($output, ","). '],"directories":[],"success":"Hello Piracy!"}';
echo $output;
?>

Here are the contents of my docker-compose.yml file. It's slightly modified from README.md with port 80 instead of 8080 and the directory structure for the volumes is the current ./ directory.

Code:
version: "3.4"

services:
  php:
    image: php:7-apache
    container_name: php
    restart: unless-stopped
    ports:
      - 80:80/tcp
    volumes:
      - ./:/var/www/html
      - ./games:/var/www/html/Games

Simply run the following in the same directory:



docker-compose up



requires a db and google drives. I don't use either so I will leave this to someone else to try.

trying this one now.

The site is up...let's see if Tinwoo likes the format.


1651662616539.png


e: works like a champ from my raspberry pi (go Linux!)

image.jpg


(I really want to figure this Windows thing though) 😡
 
Last edited by binkinator,

mrdude

Developer
OP
Developer
Joined
Dec 11, 2015
Messages
3,071
Trophies
1
Age
56
XP
8,244
I certainly can. I only wish it were more clever...

Very simple directory structure...everything self contained
Code:
total 14
drws--Srwt+ 1 wwiii wwiii   0 May  3 20:15 .
drws--Srwt+ 1 wwiii wwiii   0 May  3 20:53 ..
-rw-r--r--+ 1 wwiii wwiii 212 May  3 20:15 docker-compose.yml
drws--Srwt+ 1 wwiii wwiii   0 May  3 17:13 games
-rws--Srwt+ 1 wwiii wwiii 530 May  3 16:50 index.php
(ignore permissions...I'm using cygwin on Windows)

The index.php file was pulled directly from the site you linked previously: https://github.com/TheLogicMaster/phpTinfoilServer

Code:
<?php
$gameDir = "games/";
$ignoreDirs = array('.', '..', '.convert');
$games = array_diff(scandir($gameDir), $ignoreDirs);
$addr = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]/$gameDir";
$output = '{"files":[';
foreach ($games as $game) {
  $dir = rawurlencode($game);
  $output = $output. '{"url":"'. "$addr$dir". '","size":'. filesize($gameDir. $game). '},';
}
$output = rtrim($output, ","). '],"directories":[],"success":"Hello Piracy!"}';
echo $output;
?>

Here are the contents of my docker-compose.yml file. It's slightly modified from README.md with port 80 instead of 8080 and the directory structure for the volumes is the current ./ directory.

Code:
version: "3.4"

services:
  php:
    image: php:7-apache
    container_name: php
    restart: unless-stopped
    ports:
      - 80:80/tcp
    volumes:
      - ./:/var/www/html
      - ./games:/var/www/html/Games

Simply run the following in the same directory:



docker-compose up




requires a db and google drives. I don't use either so I will leave this to someone else to try.


trying this one now.

The site is up...let's see if Tinwoo likes the format.


View attachment 308579

e: works like a champ from my raspberry pi (go Linux!)
You can get php for windows from here: https://windows.php.net/download#php-8.1

Read the readme that comes with it - it's very simple, although you will need to turn off some ports in windows firewall. Also when you start it don't use 127.0.0.1 - use your pc IP address.
 
  • Like
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
Here’s a working solution for Windows That most can follow:

@proconsule54 did a quick and dirty (but completely functional) writeup for installing XAMP so I’ll keep it DRY and link it here:

https://gbatemp.net/threads/nsp-indexer.591541/page-8#post-9577894

When he gets to the part about “delete all and copy nsp indexer inside” simply delete everything inside the htdocs directory and place the contents of either of the projects @mrdude linked:

https://github.com/TheLogicMaster/phpTinfoilServer

1) copy index.php into htdocs
2) make a folder in htdocs called Games and copy all your .nsp and .xci files into it.

or

https://github.com/TheyKilledKenny/PHPinfoil/

1) copy PHPinfoil.php to htdocs and rename it to index.php
2) change line 56:
from $Host = $_SERVER['HOST'];​
to $Host = "";​
(yes, we're setting the Host variable to blank...seems to work better this way.)​
3) change line 57:
from $Folder = "data/games";​
to $Folder = "games";​
4) make a directory in htdocs called cache and make sure it’s writable.
5) make a folder in htdocs called Games and copy all your .nsp and .xci files into it.



Finale: in both cases, you simply place your PC’s IP address as the URL in Tinwoo and you’re golden!

example (don’t be daft….use YOUR IP, not mine.)
image.jpg





 
Last edited by binkinator,
  • Like
Reactions: WiiuGold

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
You can get php for windows from here: https://windows.php.net/download#php-8.1

Read the readme that comes with it - it's very simple, although you will need to turn off some ports in windows firewall. Also when you start it don't use 127.0.0.1 - use your pc IP address.
Appreciated. I’ve got PHP running. I compiled my own from src and built some custom extensions as well as a part of NSPIndexer. It works perfectly from a browser. The trouble here is that I’m serving it with IIS so it behaves just a little bit differently than Linux or XAMP or even a Docker container running Apache. It’s surely something I have misconfigured in IIS that I need to sort out on my own (making mistakes is how I learn.)
 

renegade2k82

Well-Known Member
Member
Joined
Oct 1, 2016
Messages
102
Trophies
0
XP
266
Country
United States
How do i completely remove this?It got corrupted on my switch and now every time i launch it it crashes.So what is the title id under astmophere/contents and how to completely remove it so i can start fresh and add it back?
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,191
Country
United States
Remove /switch/tinwoo directory then download the latest update from GitHub and place it in the same directory.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=IbRHBlExCm0