Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Some questions about other ebuild i make
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 20109
Location: here

PostPosted: Thu Nov 15, 2018 2:47 pm    Post subject: Reply with quote

Ok change sed command in src_prepare with
Code:
sed -i -e 's/"\$(dirname \$0)"/\/opt\/kag/' "${FILE}"

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 467

PostPosted: Thu Nov 15, 2018 3:24 pm    Post subject: Reply with quote

It's good, game start, but when i click on start, game crash. He try to read news, but game failed...

Look:
Code:
fulgurance@msi-gs73vr-6rf /usr/local/portage/games-action/kag $ kag
Running KAG
KAG is already executable. Proceeding...
Shared library libpng.so will be preloaded from the following path:
lib/libpng15.so
PID: 28251
Starting in directory: /opt/kag/
Engine
File not found startup_config.cfg - creating...

Creating video device...
Irrlicht Engine version 1.8.0-alpha
Linux 4.19.2-gentoo #1 SMP Wed Nov 14 16:13:48 CET 2018 x86_64
Using renderer: OpenGL 3.0
Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) : Intel Open Source Technology Center
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
Loaded texture: /opt/kag/Base/GUI/title.png
Loaded texture: /opt/kag/Base/GUI/DarkMicroStone.png
Loaded texture: /opt/kag/Base/GUI/BorderStone.png
Loaded texture: /opt/kag/Base/GUI/SimpleStone.png
Loaded texture: /opt/kag/Base/GUI/FramedStone.png
Loaded texture: /opt/kag/Base/GUI/PolishedStone.png
Loaded texture: /opt/kag/Base/GUI/ChatTexture.png
Loaded texture: /opt/kag/Base/GUI/Bubble.png
Loaded texture: /opt/kag/Base/GUI/MenuItems.png
Loaded texture: /opt/kag/Base/GUI/Starter_Gradient.png
Downloading checksums from http://update.kag2d.com/1/linux32-client-release/App/version.txt

CCurl: Failed to create file App/version.txt (err: 2)
Error downloading checksum from http://update.kag2d.com/1/linux32-client-release/App/version.txt (err:1)

CCurl: Failed to create file KAG_news (err: 2)
Loading JSON Downloads/KAG_news
Could not open Downloads/KAG_news
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 20109
Location: here

PostPosted: Thu Nov 15, 2018 5:15 pm    Post subject: Reply with quote

I can't test now because I'm in a 64bit system. I'm trying to see tomorrow.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 467

PostPosted: Fri Nov 16, 2018 12:16 am    Post subject: Reply with quote

No problem thantks !
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 20109
Location: here

PostPosted: Fri Nov 16, 2018 7:28 am    Post subject: Reply with quote

The problem is some permission on directory, some like this seems to work
Code:
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop user

DESCRIPTION="2D MMORPG about mining resources, building castles and destroying your enemies"
HOMEPAGE="https://www.kag2d.com/en/"
KEYWORDS="~amd64"
LICENSE="EULA"
SLOT="0"
SRC_URI="http://dl.kag2d.com/kag-linux32-client-release.tar.gz -> ${P}.tgz"
S="${WORKDIR}"

QA_PREBUILT="
   opt/kag/libJuxta.so
   opt/kag/KAG
   opt/kag/lib/libIrrKlang.so
   opt/kag/lib/libpng15.so
   opt/kag/lib/libsteam_api.so
"

KAG_DIR="/opt/${PN}"

pkg_setup() {
   enewgroup games
}

src_prepare() {
    default
    local FILE
    for FILE in *.sh; do
        sed -i -e 's/"\$(dirname \$0)"/\/opt\/kag/' "${FILE}"
    done
}

src_install()
{
   insinto "${KAG_DIR}"
   exeinto "${KAG_DIR}"
   doins -r {App,Base,Docs,lib,Manual,Mods,Security}
   fowners -R root:games "${KAG_DIR}"
   fperms -R 0775 "${KAG_DIR}"
   doins "autoupdate_ignore_custom.cfg"
   doins "autoupdate_ignore.cfg"
   doins "curl-ca-bundle.crt"
   doins "curl-license.txt"
   doins "forceupdate.sh"
   doins "irrlicht.ico"
   doexe "KAG"
   doins "libJuxta.so"
   doins "mods.cfg"
   doexe "nolauncher.sh"
   doins "readme.txt"
   doexe "rungame.sh"
   doexe "runlocalhost.sh"
   doins "steam_appid.txt"
   doins "terms.txt"
   dosym "${ED%/}/opt/kag/rungame.sh" "/usr/bin/kag"
   make_desktop_entry "kag" "KAG" "/opt/kag/irrlicht.ico" "Game"
}

pkg_postinst() {
   elog "For run kag user must be in games group"
}

but probably you can yet play with permission
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 467

PostPosted: Fri Nov 16, 2018 9:28 am    Post subject: Reply with quote

I have added me in games group and rebuild with your ebuild, but same error with failed to create somes files when game try to update... so hard.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 20109
Location: here

PostPosted: Fri Nov 16, 2018 9:53 am    Post subject: Reply with quote

Fulgurance wrote:
I have added me in games group and rebuild with your ebuild, but same error with failed to create somes files when game try to update... so hard.

You should re-login after that you added your user to a group
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 467

PostPosted: Fri Nov 16, 2018 1:25 pm    Post subject: Reply with quote

It's good after totally purge with remove all and totally reinstall kag. Good ! Thanks you very much for your help !
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum