Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build on Pi4/debian 10 buster #258

Closed
Exarkuniv opened this issue Jan 12, 2022 · 17 comments
Closed

build on Pi4/debian 10 buster #258

Exarkuniv opened this issue Jan 12, 2022 · 17 comments

Comments

@Exarkuniv
Copy link

im trying to see if i can get this to work on my Pi4. I know that a older version of nxengine did at some point but it now fails when it trys to compile.

i came across and though i would give it a try.

i follow the instructions on the linux link and like here #217 i dont see the bin folder.

but i did see that the Linux/osx build instructions are outdated #252

i did try to run the AppImage.sh but i xmllint: command not found.

then i tried

# Build and install NxEngine-Evo into `build/AppData/usr`
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/AppDir/usr -Bbuild -H.
ninja -Cbuild all install

# Download, extract and add non-free assets to the install
export APP_ID=org.nxengine.nxengine_evo
build-scripts/utils/common.download-extern.sh
build-scripts/utils/common.install-extern.sh build/AppData/usr/share/nxengine build/nxextract

that also did not work.

im lost at this point any help would be great.

@isage
Copy link
Collaborator

isage commented Jan 12, 2022

Did you tried installing xmllint?

@xordspar0
Copy link
Contributor

xordspar0 commented Jan 13, 2022

I recently built nxengine-evo on my Raspberry Pi 3B with build-scripts/build-appimage.sh. I already had xmllint installed on my system, but you can install it with apt install libxml2-utils.

@Exarkuniv
Copy link
Author

@xordspar0 thank you for that. i did not get into how to install xmllint. that was on tomorrows todo list

@Exarkuniv
Copy link
Author

Exarkuniv commented Jan 13, 2022

that helped for part of it, the other is i needed to have jq installed also. once i got these two installed i was able to run the build-scripts/build-appimage.sh

i get this error

./build-appimage.sh: line 73: extern/appimage-builder.AppImage: cannot execute binary file: Exec format error

i was able to run

# Build and install NxEngine-Evo into `build/AppData/usr`
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/AppDir/usr -Bbuild -H.
ninja -Cbuild all install

# Download, extract and add non-free assets to the install
export APP_ID=org.nxengine.nxengine_evo
build-scripts/utils/common.download-extern.sh
build-scripts/utils/common.install-extern.sh build/AppData/usr/share/nxengine build/nxextract

and that seemed to work i did not get a error. i would like to see if i can get the build-appimage.sh to work as it seems to be a all in one.
again thanks for the help

@xordspar0
Copy link
Contributor

Oops, I forgot about that. Yes, the build-appimage.sh script specifically downloads the x86_64 binary for appimage-builder. When I built nxengine-evo for on my Raspberry Pi I built appimage-builder myself. There is no ARM binary available for appimage-builder. I should look into adding an ARM build to their CI and then updating build-appimage.sh to download the correct version for the current architecture.

@Exarkuniv
Copy link
Author

@xordspar0 ahh. well that would make sense. since the manual way did seem to work ill see if i can get that to run

building appimage builder seems it might be a bit more work then what i trying to do. lol

@xordspar0
Copy link
Contributor

Yes, just compiling a binary with cmake is simpler and probably better if you're not trying to share the compiled game with anyone.

@Exarkuniv
Copy link
Author

im working on making a install script for RetroPie. we have one for libretro core. and a old one for the original NXengine.

so im seeing if i can make one for NXEngine-evo since it is improved

@xordspar0
Copy link
Contributor

xordspar0 commented Jan 13, 2022

Oh nice, thanks for doing that! That has been on my to do list. I will definitely use it when it's ready. Since a RetroPie script basically defines a package that you can install, it might be helpful to look at distributions that package nxingine-evo: AUR, Alpine, pkgsrc

@Exarkuniv
Copy link
Author

Nice thanks. that will help me alot. since i need to figure out where things need to be installed and whatnot

@Exarkuniv
Copy link
Author

so far i have the download source and build working fine.
now my questionis when i run

# Build and install NxEngine-Evo into `build/AppData/usr`
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/AppDir/usr -Bbuild -H.
ninja -Cbuild all install

# Download, extract and add non-free assets to the install
export APP_ID=org.nxengine.nxengine_evo
build-scripts/utils/common.download-extern.sh
build-scripts/utils/common.install-extern.sh build/AppData/usr/share/nxengine build/nxextract

i get two folders AppData and AppDir. they both look like they have the same things in them.
do i need both of them or just one.

@xordspar0
Copy link
Contributor

Those are for the AppImage build process. For the RetroPie script, I wouldn't use the scripts in build-scripts. I would do something like what the AUR package does, which is basically cmake, then copy data files & run nxextract, then make install.

Here's a start. This is untested, so you will probably need to make some small modifications. I also don't know where RetroPie scripts normally install games to. If it's something other than /usr then you will need to change the INSTALL_PREFIX in the cmake command.

curl "https://github.com/isage/nxengine-evo/archive/v${_ver}.tar.gz" | tar -xf -
cd "nxengine-evo-v${_ver}"
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr ..
make

cd ..
wget "https://www.cavestory.org/downloads/cavestoryen.zip"
unzip cavestoryen.zip
cp -r CaveStory/data/ ./

wget "https://github.com/nxengine/translations/releases/download/v${_langver}/all.zip"
mkdir translations && unzip all.zip -d translations
cp -r translations/data ./

build/nxextract

make DESTDIR=./ install # This installs everything to ./usr so you can look at everything and test it out before installing it for real. Remove the DESTDIR=./ if you want to install it to the system (requires root permissions).

@Exarkuniv
Copy link
Author

Exarkuniv commented Jan 14, 2022

oh damn. thanks. you did not need to do that. :)
FYI the applmage build does work. i have it running, probably not the best way to go about it, but it does, lol

i will use what you have posted, since thats like most of the work right there

@Exarkuniv
Copy link
Author

here is my script from your work so far.

function sources_nxengine() {
   git clone https://github.com/nxengine/nxengine-evo.git
}

function build_nxengine() {
     cd nxengine-evo
     mkdir build 
     cd build
     cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/retropie/ports/nxengine ..
     make

     cd ..
     wget "https://www.cavestory.org/downloads/cavestoryen.zip"
     unzip cavestoryen.zip
     cp -r CaveStory/data/ ./
	cp -r CaveStory/Doukutsu.exe ./

    wget "https://github.com/nxengine/translations/releases/download/v1.14/all.zip"
    mkdir translations && unzip all.zip -d translations
    cp -r translations/data ./

	build/nxextract
}

this is how a Retropie script is layed out.
i could not get curl "https://github.com/isage/nxengine-evo/archive/v${_ver}.tar.gz" | tar -xf - to work so i had to use git clone.
for the most part everything else whet great.

but at the end when i run make DESTDIR=./ install

i get make: *** No rule to make target 'install'. Stop.

am i missing something since im using git instead of what you posted?

@Exarkuniv
Copy link
Author

nevermind i got it

@Exarkuniv
Copy link
Author

Exarkuniv commented Jan 14, 2022

I want to say thank you for all the help. i got it to work and install perfectly.

I will update this with a link to my repo with the complete install sctipt.

UPDATE

https://github.com/Exarkuniv/Nxengine-Evo-RPi

@Exarkuniv
Copy link
Author

with the help @s1eve-mcdichae1 the install script has been cleaned up.
ill close the ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants