Building Pagascape from source to running Self Hosted mode on Windows and MSYS

Has been reports of the public PegaScape site suffering crashes and been offline, so I decided to create a Step by step tutorial about building the Pegascape Source and running it on Self Hosted mode.

For Linux instructions you can look into the tutorial: https://gbatemp.net/threads/building-pagascape-from-source-to-running-self-hosted-mode.650712/

This guide covers the installation of packages needed to be able to build Pegascape using 9.11.2 & 5.6.0, and an addendum to use the finished product as a portable product.

First you need a working MSYS2 environment, if you don´t have one you can use the tutorial: https://gbatemp.net/threads/install-msys-environment.652234/


In order to build Pegascape you need:
  • Python2
  • Node 9.11.2
  • NPM 5.6.0
  • g++
  • and some other supporting packages
Start a MINGW command window:
1711567758582.png
1711567772810.png


For install Python2 on MSYS2 you must to execute this commands:
Bash:
pacman -Syuu --needed --noconfirm mingw-w64-x86_64-python2
alias python=/mingw64/bin/python2
1711568123213.png

The alias is needed because the Pegascape build process calls the command python[Size].


Then install the rest of needed packages
Bash:
pacman -Syuu --needed --noconfirm mingw-w64-x86_64-gcc unzip curl git make
1711568158929.png
(I already have them installed :P)

On the Pegascape's repository (https://gbatemp.net/threads/pegascape-alternative.650182/post-10372685), the user @xradeon indicate you need node and npm, 9.11.2 & 5.6.0 versions respectively, then is necessary to follow the instructions on https://stackoverflow.com/questions...l-a-specific-version-of-node-on-ubuntu-debian (Answer 56):
Bash:
cd ~
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 9.11.2
node --version
npm --version
1711568232156.png



As instructed by the README.MD on the original repo: https://github.com/noahc3/PegaScape#self-hosting
after install NodeJS & NPM, executed the next commands to clone the repo and build using NPM:
Bash:
cd ~
git clone https://www.github.com/noahc3/PegaScape
cd ~/PegaScape/
npm install
1711568397199.png

1711569000295.png


The package is now compilated and ready to be used, Pegascape needs node to be executed, on MSYS2 you can run:
Bash:
node start.js --webapplet

Now the PegaScape server is running self hosted
1711569124081.png

In order to close the PegaScape site, you need to type .exit and press [ENTER]


If you want to use caffeine is recommended to leave out the parameter --webapplet since that one is for fake news and might cause the problem using caffeine.
Remember there are another parameters to start.js:

--webapplet To enable fake internet, allowing the Switch to pass the connection test and load things like Fake News.
--ip <html_server_ip_override> If the detected IP address for the HTML server is not preffered.
--host <dns_server_ip_override> If the detected IP address for the DNS server is not preffered.
--disable-dns if you want to disable the internal DNS server and use something else (dnsmasq, bind, etc).



Then if you like to create a portable package what do not need MSYS2 to run, you can download NODE portable version 9.11.2 from:
https://nodejs.org/dist/v9.11.2/win-x64/node.exe or https://nodejs.org/dist/v9.11.2/win-x86/node.exe for Windows 64 and 32 bits.





In order to use Pegascape you need:[/SIZE]
  • On your Switch console set Primary DNS to your IP Address (the one stated by Pegascape as «Responding with address XXX.XXX.XXX.XXX»), It's important both your console and your PC are on the same network.
  • On your Switch Console, set connect automatically to network to avoid Internet connection test fail.
  • On your Switch Console, Open Fake News, to load the exploit.
 
Last edited by impeeza,

tataniko

Well-Known Member
Member
Joined
Jul 20, 2016
Messages
183
Trophies
0
Location
- Planet Earth -
Website
www.facebook.com
XP
1,357
Country
Antarctica
  • Love
Reactions: impeeza

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,361
Trophies
3
Age
46
Location
At my chair.
XP
18,717
Country
Colombia
Yes. Thanks a lot. This is the great thing about this community a variety of source of information. Is for all the tastes


And add my former employer used to say: why make in easy way is the hardest one is possible 😝😂😂😂😜
Post automatically merged:

P.S. I never heard about msbuid but sounds nice
 

tataniko

Well-Known Member
Member
Joined
Jul 20, 2016
Messages
183
Trophies
0
Location
- Planet Earth -
Website
www.facebook.com
XP
1,357
Country
Antarctica
Your solution is added 1052 packages, mine is 1092. What a hack? :)

1711622832305-png.428256


However, I found something strange in Windows, the fake internet is not stable on Firmware 1.0, but there is no problem in higher firmware.

So need to use auto connection to skip internet test on the lowest firmware. Do you have any experience with your 1052 packages on Firmware 1.0 with internet test? :)
 

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,361
Trophies
3
Age
46
Location
At my chair.
XP
18,717
Country
Colombia
Your solution is added 1052 packages, mine is 1092. What a hack? :)

1711622832305-png.428256


However, I found something strange in Windows, the fake internet is not stable on Firmware 1.0, but there is no problem in higher firmware.

So need to use auto connection to skip internet test on the lowest firmware. Do you have any experience with your 1052 packages on Firmware 1.0 with internet test? :)


Sorry, I am on Fw 4.0.0


And about the packages may be differences between msys and native windows command line
 

tataniko

Well-Known Member
Member
Joined
Jul 20, 2016
Messages
183
Trophies
0
Location
- Planet Earth -
Website
www.facebook.com
XP
1,357
Country
Antarctica
I tested your build, the fake internet worked well but after something is kicked out. It is strange behavior.

I believe, your msys build is more proper than prebuilt, especially the auto ip, dns (node start.js --webapplet) is very stable. It is nice job. :)

But we are far from the perfect PegaScape server on Windows. I never had any issue on Firmware 1.0 with Noah public DNS.
 
  • Like
Reactions: impeeza

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,361
Trophies
3
Age
46
Location
At my chair.
XP
18,717
Country
Colombia
I tested your build, the fake internet worked well but after something is kicked out. It is strange behavior.

I believe, your msys build is more proper than prebuilt, especially the auto ip, dns (node start.js --webapplet) is very stable. It is nice job. :)

But we are far from the perfect PegaScape server on Windows. I never had any issue on Firmware 1.0 with Noah public DNS.
Yeah, Some of those homebrew are thinked for the linux world.
 
  • Like
Reactions: tataniko

tataniko

Well-Known Member
Member
Joined
Jul 20, 2016
Messages
183
Trophies
0
Location
- Planet Earth -
Website
www.facebook.com
XP
1,357
Country
Antarctica
I tested your modules deeper, there is no real difference between your msys solution & prebuilt solution. :)

They are similar & not compiled, but based on prebuilt node-pty. Msys didn't compile the node-pty, but used node-pty-prebuilt like me.

Can you create PegaScape modules with real dependencies? :)
 
  • Love
Reactions: impeeza

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,361
Trophies
3
Age
46
Location
At my chair.
XP
18,717
Country
Colombia
I tested your modules deeper, there is no real difference between your msys solution & prebuilt solution. :)

They are similar & not compiled, but based on prebuilt node-pty. Msys didn't compile the node-pty, but used node-pty-prebuilt like me.

Can you create PegaScape modules with real dependencies? :)
tomorrow will try, thanks a lot for your help.
 
  • Love
Reactions: tataniko

tataniko

Well-Known Member
Member
Joined
Jul 20, 2016
Messages
183
Trophies
0
Location
- Planet Earth -
Website
www.facebook.com
XP
1,357
Country
Antarctica
tomorrow will try, thanks a lot for your help.
I thank you for your sacrifice for community, you have lot of skill & opportunity with msys. :)

You are right, we have to deal with Linux. PegaSwitch & PegaScape have the same dependencies, so now we have a chance with your skill to get an ultimate PegaScape solution with USB WIFI Dongle like PegaSwitch before. :)
https://github.com/RetroGamer74/ESP8266_Homebrew_2.0_Switch_Pegaswitch

PegaScape USB WIFI Stick is a real challenge. :)
Post automatically merged:

I can imagine a PegaScape WIFI Dongle powered from game card slot.

This is better than Dragon Injector before. :)
 
Last edited by tataniko,

DrahosR

Well-Known Member
Newcomer
Joined
Jun 20, 2021
Messages
46
Trophies
0
Age
34
XP
69
Country
Afghanistan
Your "step-by-step" tutorials are extremely hard to follow. I understand you want to give credits where they're due, but you ask people to find links in other threads and follow other people tutorials, plus your links point to places without files. Then you use words like "bash" what does that mean when you put code underneath? I got lost somewhere along.
You wrote "On the Pegascape's repository" we'll need some files, but instead of linking to the actual files, you linked to another thread, and basically sent us on a goose chase after the files.
Here you wrote: "
  1. Download the latest version from: https://github.com/msys2/msys2-installer/releases, there you will find several packages, the most easy to use is msys2-x86_64-YYYYMMDD.exe
But I got this page as result and nowhere are links with exe files on it I had to google
  1. msys2-x86_64-YYYYMMDD.exe and then found this file msys2-x86_64-20240113.exe under this link: https://www.msys2.org/
 

Attachments

  • github.JPG
    github.JPG
    126 KB · Views: 8
  • Wow
Reactions: impeeza

tataniko

Well-Known Member
Member
Joined
Jul 20, 2016
Messages
183
Trophies
0
Location
- Planet Earth -
Website
www.facebook.com
XP
1,357
Country
Antarctica
Hi, if you lost in the darkness, just download the Portable PegaScape from here & share others. :)
https://gbatemp.net/threads/portable-pegascape-win32.652285/

Please note, it seems the fake internet is not stable in Windows on Firmware 1.0, so set auto connection to network to avoid any crash. No other issue was found. :)
 
  • Love
  • Like
Reactions: DrahosR and impeeza

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    S @ salazarcosplay: @BigOnYa How have you been