Is there a guide somewhere to create install scripts if you can get a game to compile?
-
@folly said in Is there a guide somewhere to create install scripts if you can get a game to compile?:
So how can I add "the path" in the script to make the binary find the files in the subdirectory's ?
You can just change directory before launching the game, if it expects the game data/assets to be present in the running folder. Modify the launch command to do that:
#... addPort "$md_id" "mog" "MazeOfGaliousRemake" "pushd $md_inst/mog-svn-20120228; $md_inst/mog-svn-20120228/mog" #...
-
@mitu i have also been following this guide and looking at other scripts.
for the most part i have a understanding of whats going on. but im still a little lost on this part
function build_cdogs-sdl() { cmake . -DCMAKE_INSTALL_PREFIX="$md_inst" -DCDOGS_DATA_DIR="$md_inst/" make md_ret_require="$md_build/src/cdogs-sdl" } function install_cdogs-sdl() { md_ret_files=( 'data' 'dogfights' 'graphics' 'missions' 'music' 'sounds' 'COPYING' 'src/cdogs-sdl' 'src/cdogs-sdl-editor' ) }
how do you find out what to put under
md_ret_require= and md_ret_files=(
or is it just trial and error.im working on a script for Nblood. and there is a lot in the folder and i have no idea on what is needed and not other then the file nblood that is needed to run
thanks for any pointers
-
@mitu said in Is there a guide somewhere to create install scripts if you can get a game to compile?:
@folly said in Is there a guide somewhere to create install scripts if you can get a game to compile?:
So how can I add "the path" in the script to make the binary find the files in the subdirectory's ?
You can just change directory before launching the game, if it expects the game data/assets to be present in the running folder. Modify the launch command to do that:
#... addPort "$md_id" "mog" "MazeOfGaliousRemake" "pushd $md_inst/mog-svn-20120228; $md_inst/mog-svn-20120228/mog" #...
Great reply, it's working ! :-)
Thanks. -
how do you find out what to put under
md_ret_require= and md_ret_files=(
or is it just trial and error.If you are not sure, you can copy/configure the whole directory, just like I did.
Look at my port, it copies 1 directory with all files and subdirectory's. -
I am experimenting with the b-em BBC-Micro emulator fork of kilograham, which is created for the rpi-pico, but it's also possible to build this for the RPI.
This RPI build will then run almost the same as the pico build but then on the RPI.
The one I want to use is, the one that createsxbeeb
andxmaster
, because this will run quite good, keyboard works, and you can exit the emulator.
But you have to run it in the match-box.I manually comiled and made configs so the
xbeeb
orxmaster
can run in retropie.
So I wanted to make a module-script for this.Trouble is that I have to clone multiple github repository's to compile this.
When it clones it will download far too much and when it has compiled thexbeeb
andxmaster
do not work.The far too much downloading thing is the
depth
I think. I was thinking this should automatically do the1
but it seems it doesn't.
Looking at the helper.sh seems I have to add thecommit
also if I want to manually add thedepth
.
I am a little bit anxious here, because is it possible that I can do something wrong that will hurt the repositories ?
I know thegit
command is quite powerfull and I don't want to ruin things here.I used these commands with and without "master".
( the kilograham is missing here, I don't know if it can be shared because of the roms it contains)gitPullOrClone "$md_build/pico-sdk" https://github.com/raspberrypi/pico-sdk.git "master" gitPullOrClone "$md_build/pico-extras" https://github.com/raspberrypi/pico-extras.git "master"
Should it be something like :
gitPullOrClone "$md_build/pico-sdk" https://github.com/raspberrypi/pico-sdk.git "master" "fc10a97c386f65c1a44c68684fe52a56aaf50df0" "1"
Do you have a suggestion ?
-
Post your scriptmodule (or a link to it) and I'll take a look. There are a few scriptmodules that need to build from multiple git repos/sources - see for instance
mupen64plus
orhatari
. -
Thanks for looking at it.
I will have look in the scripts you referring at.
Here is the link of my script :
https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-workdir-00/b-em-pico_pi-build.sh
It downloads more than 2Gb, but it should only download about 45 Mb.It's still a port script which has to be converted to emu script, but basically that doesn't matter now.
-
@folly I've looked at it, but I don't see anything wrong.
If you're building for the Pi, do you still need to download & build the pico-sdk & pico-extras ? Try without them. There are a few more dependencies that are not listed (liballegro5-dev
) and the build seems to stop by requiringruby
, but I don't think you'll need the PICO stuff to build the emulator. -
Thanks for looking at it. 😊
If you're building for the Pi, do you still need to download & build the pico-sdk & pico-extras ?
For this version, without regular menu, you do need it, otherwise it will compile the regular version with the normal menu.
Try without them.
I will try again, but this version seems to be too slow.
Perhaps it's faster in the match-box.There are a few more dependencies that are not listed (liballegro5-dev) and the build seems to stop by requiring ruby
I will add them in the script.
I wasn't aware that this version also needs it because I already had them on my computer for compiling the regular version.I will have a look at it once more.
Thanks for helping. 👍 -
It took me quite some time to get it working.
I have found some strange things along the way.
I found that I can use downloadAndExtract to download github repositories.
This solution works much faster than gitPullOrClone and it seems it downloads far less data too.The second thing I encountered was that the compiled binaries didn't work.
Strange because it manually works, so it made me wonder if it had something to do with the user who is doing it.
I tried many things, but addingsudo -u root
to thecmake line
does the trick.
Very strange because we already run the RetroPie-setup asroot
.So I wanted to share this with you.
Do you have any idea why it doesn't make working binaries withoutsudo -u root
?This is the link to the working script.
https://raw.githubusercontent.com/FollyMaddy/RetroPie-Share/main/00-workdir-00/b-em-pico_pi.shThe
xbeeb
and thexmaster
have both demo discs in them.
The 2048 game is created by Eben Upton.
F11 is thekilograham menu
Shift + F12 boots the disc.
F12 reset
EXIT with mouse closing window -
I am busy with the module-script for the supermodel3 :
https://github.com/FollyMaddy/RetroPie-Share/blob/main/00-scriptmodules-00/emulators/supermodel-mechafatnick.shI want to improve some stuff beginning with the resolution part.
We now put most configurations inside the Supermodel.ini.
For the resolution that is a bit tricky because not every one is using the same monitor or tv.
So I made 3 predefined emulators.cfg/runcommand lines, with different resolutions, inside the script.
But I want to reduce it to 1 line.What I would like to do is use
tvservice -s
or something similar and place a variable with detected video resolution inside the emulators.cfg line.Something like this :
Supermodel-mechafatnick = "XINIT:pushd /opt/retropie/emulators/supermodel-mechafatnick;tvservice -s;./supermodel $(tvservice -s|cut bla bla bla) %ROM%"When I do something like this, the variable isn't detected.
Do you know how I could accomplish this ?
-
@folly said in Is there a guide somewhere to create install scripts if you can get a game to compile?:
I am busy with the module-script for the supermodel3 :
https://github.com/FollyMaddy/RetroPie-Share/blob/main/00-scriptmodules-00/emulators/supermodel-mechafatnick.shTerrible, terrible script.
I want to improve some stuff beginning with the resolution part.
We now put most configurations inside the Supermodel.ini.
For the resolution that is a bit tricky because not every one is using the same monitor or tv.Use the
%XRES%
and%YRES%
macros to get the current resolution and use it inemulators.cfg
, runcommand will take care of detecting the proper resolution (tvservice
is only available on a Pi) and will set the values accordingly. See how it's used in jzintv or ioquake3. -
Thanks for your advice.
Terrible, terrible script.
Doesn't sound very positive.
Hopefully your advice won't make it worse then. -
Doesn't sound very positive.
Don't listen to naysayers. If your script works, then it's fine.
Hopefully your advice won't make it worse then.
You should be able to use a single emulator entry instead of passing the video res. via CLI or hardcoding it in the
.ini
file. -
Working on creating some script modules, this thread has some good information that got me started so it seemed like a good place to post rather than starting a whole new one.
What is the significance of the
CMakeLists.txt
param incmake <params> ..
vs
cmake CMakeLists.txt <params> ..
They seem to create the same output file. However...
I had a module I was working on that failed to build when I tried to call it with
retropie_packages.sh <module> build
. I had already built it once, so when I tried a second time and themkdir build && cd build
wasn't able to make the dir (because it already existed), the&& cd build
part didn't do anything, so it tried tocmake
&make
from the wrong dir and, predictably, failed.Another module, which had the
CMakeLists.txt
param (the above one did not), did not fail entirely. It still was not able tomkdir && cd
to the build dir, but instead of failing, this one just built it right there in the maintmp/build/module
folder. Is this param the reason why? Do I want to leave it in or out? Does it make a difference?Also, it still made the same file, but it put it in the wrong place. So if I were to use
retropie_packages.sh <module> install
after this, it would be installing the old one from the "build" dir and not the new one I just built in the wrong place, so this isn't a solution.I think I could begin the build function with a
[[ -d build ]] && rm -rf build
to remove the dir if it exists? I notice no one else does this, though. Am I just not expected to useretropie_packages.sh
in this way? Or I'm supposed to manually remove the inner build dir in between uses, or...? I guess I'm looking for some hints on the proper way to write and use a scriptmodule. -
@sleve_mcdichael said in Is there a guide somewhere to create install scripts if you can get a game to compile?:
What is the significance of the CMakeLists.txt param in ...
The correct way to invoke
cmake
iscmake <PARAMS> <path_to_folder_containing_CMakeLists.txt>`
... the
&& cd build
part didn't do anything, so it tried to cmake & make from the wrong dir and, predictably, failed.Don't use
&&
then, just have the 2 commands separately... this one just built it right there in the main
tmp/build/module
folder. Do I want to leave it in or out? Does it make a difference?No, but some programs enforce a separate build folder (out-of-tree build) so you may get an error when building directly in the source folder.
Also, it still made the same file, but it put it in the wrong place. So if I were to use retropie_packages.sh <module> install after this, it would be installing the old one from the "build" dir and not the new one I just built in the wrong place, so this isn't a solution.
If you change the build parameters, then do a cleanup first.
I think I could begin the build function with a [[ -d build ]] && rm -rf build to remove the dir if it exists?
I don't think that when building with
cmake
this step is necessary, so that's why is not enforced. This is an issue only when repeatedly re-building without cleaning up, so it's more of an artifact of re-trying the build with a 'dirty' state.
You should first compile the program separately - not as a scriptmodule - to get thecmake
build options right, then add it to the build function and try it fromretropie_packages.sh
. -
-
-
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.