Hi, recently I started support and create various debian packages, I see that this game is open source and seem good. I see also that linux build not have good support and isn't in major distributions repository for now. I think is good thing create deb package and upload to official repository for have also this game installable for everyone want simple with one click on debian and all derivates. edit: Now is working and ready for test Based on the dipendencies the test build is possible build it on Debian >= 7 (Wheezy now on testing but near to stable) and Ubuntu >= 12.04 LTS and all derivates with repository based on these. Procedure for test deb build is: - download 2.0.22 source https://github.com/po-devs/pokemon-online/archive/2.0.22.tar.gz - extract it and open terminal into extracted directory - take debian folder from https://github.com/Fantu/pkg-pokemononline and put into extracted directory - install all build dependencies: sudo apt-get install cdbs dpkg-dev debhelper quilt qt4-qmake libqt4-dev libzip-dev libphonon-dev libqt4-opengl-dev g++ libqrencode-dev - launch packages creation with: debuild -i -b -us -uc The package can be create also on clean chroot and/or for other distributions/versions with pbuilder For install created packages for testing installing -client and -data packages and shared libraries sudo dpkg -i pokemon-online-data_2.0.22-1_all.deb libpo-battlemanager1_2.0.22-1_amd64.deb libpo-pokemoninfo1_2.0.22-1_amd64.deb libpo-utilities1_2.0.22-1_amd64.deb pokemon-online-client_2.0.22-1_amd64.deb For install also client plugins: sudo dpkg -i pokemon-online-client-plugins_2.0.22-1_amd64.deb For install also server: sudo dpkg -i pokemon-online-server_2.0.22-1_amd64.deb For install also server plugins: sudo dpkg -i pokemon-online-server-plugins_2.0.22-1_amd64.deb *-dev and *-dbg are optional After install is there are dependencies missed install it with: sudo apt-get install -f Please report here all test with architectures not tested for now List of all architectures supported by Debian: alpha (unofficial port) amd64: build OK - client working - tested by Fantu (v2.0.22-1) armel armhf avr32 (unofficial port) hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k (unofficial port) mips mipsel powerpc powerpcspe (unofficial port) s390 s390x sh4 (unofficial port) sparc sparc64 (unofficial port) If you will have problems with building/running package post here and I'll help to solve. Please post also successfull tests.
Build problem solved, the binary file and library compiled are included in package but all other files need to be added. Other files to include are all in bin directory? What files and directories are not needed for linux and should be excluded? Are all static file and arch indipendent? (for insert it in -common package) For now I set arch to any, there the know build problem on same arch different from i386 and amd64 or can be build for all arch supported by debian? (ia64,mips ,mipsel,powerpc,s390,s390x,sparc,armel,armhf,hppa,hurd-i386...) Thanks for any reply
Files needed: - Themes folder (contains graphic themes) - db folder (contains all the pokemon database) - qml folder (contains all the code for the new battlewindow, in a scripting language) - Music folder (contains default battle music) - trans folder (contains translations) - languages.txt - version.ini Your help is very much appreciated ^^ All the files above are arch-independent.
Thanks for reply, build dependency that I had insert for now is all and with sufficent version or something is wrong or missed? qt4-qmake, libqt4-dev (>= 4.5), libzip-dev, libphonon-dev, libqt4-opengl-dev, g++ (>= 4.5) There are special dipendencies for running game not linked by build? For now autodetect these on deb creation: Depends: libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libphonon4 (>= 4:4.2.0), libqt4-declarative (>= 4:4.7.0~rc1), libqt4-network (>= 4:4.6.1), libqt4-opengl (>= 4:4.5.3), libqt4-script (>= 4:4.5.3), libqt4-xml (>= 4:4.5.3), libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.8.0), libstdc++6 (>= 4.6), libzip2 (>= 0.10), phonon Version are refered to my fast test done on Ubuntu 12.04, package will be done for debian sid (if will be accepted on official debian repository there will be porting to derivates and probably backports)
If the user wants to use the new battle window, he needs liqt4-declarative-shaders and liqt4-declarative-particles (I think those are the names, I don't have access to linux right now, VM still installing) Also there are plugins that can be added by passing CONFIG+="po_clientplugins" as an argument to qmake (they are put in the "myplugins" folder). They don't need any other libraries. But if we want to add it to the official debian repository, maybe we should edit the name of the libraries (utilities, battlelib, pokemonlib) to something that's more explicit to pokemon-online?
phonon-backend-gstreamer or phonon-backend-vlc should also be added for sound other than that, I think all the libraries are good! Edit: It's compiling and the file are quite big! Removing the "-g" flag and adding the "-Os" flag during compilation should fix this... Edit2: Code (shell): cd . && qmake-qt4 'QMAKE_CC = cc' 'QMAKE_CXX = g++' 'QMAKE_CFLAGS_RELEASE = -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'QMAKE_CXXFLAGS_RELEASE = -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' There, if you want to reduce the size of the package significantly (generated binaries 10 times lighter), -g should be removed and -Os added. I've no idea why debuild adds -g by default!
phonon-backend-vlc is already included as dependency of phonon or phonon-backend-gstreamer if already installed libqt4-declarative-shaders libqt4-declarative-particles added as client package dipendencies, I not see dev package for these, must be included also for build or is correct only for run? I had already tried yesterday change flags but give library compile error, I'll try again after I had completed a working draft of the package. Qt version used by developer is 4.8 right? I see it as recommended and also that 2 added dipendencies is added in wheezy (debian 7) with qt 4.8, increased qt dipendencies to 4.8. Now I create also -data package and after probably client will be ready for first effective test --- See the dipendencies the test build is possible on debian >= wheezy and ubuntu >= 12.04 Command to execute for build PO 2.0.07 with my debian subdir: debuild -i -b -us -uc --- For see all lintian (quality check) information do this change: Modify these lines on /etc/devscripts.conf: DEBUILD_LINTIAN=yes DEBUILD_LINTIAN_OPTS="-iIEcv --pedantic --show-overrides" Is not necessary fix all lintian on upstream, I can apply patches on deb package only with quilt To fix upstream probably is only the things relative to libs and man. Edit: There is a question also about menu entry, there is already one official somewhere or I do one standard? If I create one I am in doubt about the exact section, following this: http://www.debian.org/doc/packaging-manuals/menu.html/ch3.html#s3.5 Games/Simulator is more for games simulator of real life Which one subsection would be better?
Hi, libqt4-declarative-shaders and libqt4-declarative-particles are indeed runtime dependency, since they are QML libraries.
Thanks for reply, I added data and debug package and menu entry. Now there is a problem of execution of client, library include are correct with default lib path but binary for now not include data path and need "cd /usr/share/games/pokemon-online/" before launch Pokemon-Online for working. I do fast search but for now I not found how to set path include for qmake-qt4, someone can tell me please?
Maybe make a sh file that does that? Code (text): #!/bin/sh PO_BIN=`readlink -ens "$0"` PO_DIR=`dirname "$PO_BIN"` export LD_LIBRARY_PATH="$PO_DIR:$LD_LIBRARY_PATH" cd "$PO_DIR" exec ./Pokemon-Online That's the file in scripts/start-client.sh. Maybe put it in the same directory as the pokemon online binary, and use that as the program? (that way you don't need to install the libs in /usr/libs/ either, they can also just be in the pokemon online folder)
libs are include already correctly on actual deb build test, I search option for add includepath on binary make by qt for mantain generic unix build local instead modify upsteam for install on system instead of local dir. edit: can be this? http://doc.qt.digia.com/stable/qcoreapplication.html#applicationDirPath I tried to search it with grep on source for try change it but there isn't
Can you update your github with the current changes? :) Also, isn't it possible to add a launcher file to the debian package repository? That launcher file would be run instead of Pokemon-Online, and would be the one appearing in the user menu. It would also run pokemon online in the correct directory. If not, I don't know qmake options to do that. If there's a make option to do it, you can just pass it to qmake and it will forward it. Also, another solution that will work is add DEFINES+=-DPO_DATA_REPO="/usr/share/games/pokemon-online/" as an argument to qmake. (PO will use the directory in the define PO_DATA_REPO as its main directory if it's defined)
Thanks for reply, github is updated, I have done push to origin each commit: https://github.com/Fantu/pkg-pokemononline/commits/master If you had change cache parameters of browser you probably need to force update with F5 Add also an sh file for do cd and exec for have binary working is bad thing, I'll try the defines you write, probably is good solution. I had also done .desktop file but icon is missed, there is 32x32 pixel XPM icon file for client?
I found it with grep, you are sure that override it is ok? src/Teambuilder/Teambuilder.pro:207: DEFINES += -DPO_DATA_REPO="/usr/shared/games/pokemon-online/"
The one you found with grep is only triggered when CONFIG+=debian is passed to qmake. Plus i made a typo in it, i put usr/shared/ instead of usr/share (if i hadn't made the typo you could use CONFIG+=debian instead of DEFINES+=-DPO_DATA_REPO="/usr/share/games/pokemon-online/")
Sorry, I not see the file, now I try it, I see the comments on github, after complete good and working client I'll do also server package, now I remove also bin/database from -data edit: tried CONFIG debian: see commit c8cce4ebec20244fc3c3f0d10cdec18082096fa6 Give this error on build: /usr/bin/uic-qt4 loadline.ui -o ui_loadline.h g++ -c -m64 -pipe -std=c++0x -U__STRICT_ANSI__ -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -Wall -W -D_REENTRANT -DQT_WEBKIT -D-DPO_DATA_REPO=/usr/share/games/pokemon-online/ -DQT_NO_DEBUG -DQT_DECLARATIVE_LIB -DQT_PHONON_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/phonon -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4 -I/usr/include/qt4/phonon_compat -I/usr/X11R6/include -I. -I. -o main.o main.cpp <command-line>:0:1: error: macro names must be identifiers
Oh, sorry. It should be DEFINES+=PO_DATA_REPO="/usr/share/games/pokemon-online/" then (without -D before) By the way, i changed the source for next version (if it helps) to fix it
Fixed on last commit but other error: g++ -c -m64 -pipe -std=c++0x -U__STRICT_ANSI__ -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -Wall -W -D_REENTRANT -DQT_WEBKIT -DPO_DATA_REPO=/usr/share/games/pokemon-online/ -DQT_NO_DEBUG -DQT_DECLARATIVE_LIB -DQT_PHONON_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/phonon -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4 -I/usr/include/qt4/phonon_compat -I/usr/X11R6/include -I. -I. -o main.o main.cpp main.cpp: In function ‘int main(int, char**)’: main.cpp:70:22: error: expected primary-expression before ‘/’ token main.cpp:70:22: error: ‘usr’ was not declared in this scope main.cpp:70:22: error: ‘share’ was not declared in this scope main.cpp:70:22: error: ‘games’ was not declared in this scope main.cpp:70:22: error: ‘pokemon’ was not declared in this scope main.cpp:70:22: error: ‘online’ was not declared in this scope main.cpp:70:34: error: expected primary-expression before ‘)’ token make[2]: *** [main.o] Errore 1
mm, try adding \ before the " DEFINES+=PO_DATA_REPO=\"/usr/share/games/pokemon-online/\" Edit: it compiled
tried also with this but give same error, variable seem not declared on use on main.cpp, now I tried modify with QString following lines before but I probably not have sufficent knowledge for do correct and good edit: failed
for now fixed with this change on main.cpp: #elif defined(PO_DATA_REPO) QDir::setCurrent( "/usr/share/games/pokemon-online" ); #endif Now client is working and ready for test Basing on the dipendencies the test build is possible on Debian >= 7 (Wheezy now on testing but near to stable) and Ubuntu >= 12.04 LTS and all derivates with repository based on these. Procedure for test deb build is: - download 2.0.07 source https://github.com/po-devs/pokemon-online/archive/2.0.07.tar.gz - extract it and open terminal into extracted directory - take debian folder from https://github.com/Fantu/pkg-pokemononline and put into extracted directory - install all build dependencies: sudo apt-get install cdbs dpkg-dev debhelper quilt qt4-qmake libqt4-dev libzip-dev libphonon-dev libqt4-opengl-dev g++ - launch packages creation with: debuild -i -b -us -uc The package can be create also on clean chroot and/or for other distributions/versions with pbuilder For install created packages for testing installing -client and -data packages, -dbg is optional After install is there are dependencies missed install it with: sudo apt-get install -f If there will be problems with build/runing package post here and I'll help to solve. I also edit the first post with test build details and all architectures test report. Now I must go, Merry Christmas edit: these lintian error about libraries I think must fixed upstream: W: pokemon-online-client: package-name-doesnt-match-sonames libbattlelib1 libpokemonlib1 libutilities1 This error refer to package for "libraries only" missed, I think is more good change names for refer all to pokemon online if possible, after I'll do correct libraries packages, with also -dev and symbols for pass debian quality check and standard I: pokemon-online-client: spelling-error-in-binary usr/lib/libbattlelib.so.1.0.0 Extracter Extractor also man page for binary file and upstream changelog would be a good thing but not a priority
ok thank you very much! Would it be possible to put the libraries in a pokemon-online folder instead and refer to them that way? using ln to link the executable to the libraries. Otherwise, I will change the name of the libraries. Also, is it possible to add the plugins? You can compile them with CONFIG+=po_clientplugins , and they are stored in bin/myplugins. They should be put in the "myplugins" folder of the data folder. Thank you!
About library I think that we must manage them well according to the standards http://www.debian.org/doc/debian-policy/ch-sharedlibs.html http://www.debian.org/doc/manuals/maint-guide/advanced.en.html#librarypackage I not found package with library not following stardard for now, debian standard are rigid and time-consuming to follow but the quality that results is excellent. I use debian since 2004 on my personal servers and never had any problems. We also use it on server for works and and I saw debian continue to operate in critical situations where I did not think it was possible. About desktop my mother, my sister and other few people with very low computer knowledge using ubuntu LTS for years without problems, some people believe Ubuntu much easier than windows xp. For example I see one people that before with xp call experts also for install simple programs and every few months format computer due to problems, since ubuntu 10.04 LTS call only on start few times and after nothing, this year I see his computer have installed hundreds of packages alone and the computer still works fine. I think also deb packages is very good, simply and solid for user, and also fast for mantainer after have been well understood. Returning to libraries if they are used only by client (and not by server plugins or other future things) I try to search another time if possible include they otherwise. However, would be only to renamed upstream to avoid the risk of conflicts with other software, now them have non-specific names. About deb packages for libraries, is not a problem for me doing it folloing the standard with also -dev packages, symbols ecc About plugins I'll add it, in other package optional, flagged as recommended or suggest of the client, I thinks is more good for the standard and also not waste space if not necessary. Or you think they are essentials and must be included in data package installed as dependency? There are particular dependency for build/running it not visible? I'll add also server package, require data package, libraries or other things?
Thanks I compiled the plugins now, seem strange that are all library, for now I'll put all it in a single -client-plugins package with files under /usr/share/games/pokemon-online/myplugins build not show error for dependency missed, is right or need other packages for build client plugins? for example need libqrencode-dev and libqrencode3 for running (following Howtobuild.txt)
One plugin depends on libqrencode (and you need -dev to compile it). But since it is dynamically loaded maybe the automatic detection tool cannot find the dependency. Other plugins only depend on package PO already depends on.
Plugins client done and commit also to my github. There are 2 problems: - QRCodePlugin seem not build also with is dependency added - libraries not on /usr/lib but on /usr/share are bad things and do also lintian error I must change it or will never accepted on debian, ubuntu ecc official repository, or someone have more good idea? Probably I'll try to put client library under /usr/lib/pokemon-online and client plugins /usr/lib/pokemon-online/plugins edit: done, I tried to adding libraries path to client seem not working: #elif defined(PO_DATA_REPO) QDir::setCurrent(PO_DATA_REPO); QDir::setCurrent( "/usr/share/games/pokemon-online" ); + QCoreApplication::addLibraryPath ( "/usr/lib/pokemon-online" ); #endif Pokemon-Online: error while loading shared libraries: libpokemonlib.so.1: cannot open shared object file: No such file or directory Someone can tell me how to do it correct please?
you can't load libraries in the code since those libraries are needed before the code runs. But you can use ln to link the executable to the libraries. Also the qr code plugin doesn't build yet because it's disabled for version 2.0.07 (since no android compatible with version 2, and qr code plugin is to be used with version 2)
qr dependency remove for now I not found working way for build binary with link to different library path... I think too much time on computer has made me stupid^^'' For now restored client libraries to /usr/lib Client plugins are now to /usr/lib/pokemon-online/plugins I also change client plugins folder on code for more easy add plugins I see that there are also server plugins on other directory, is more good client plugins on /usr/lib/pokemon-online/clientplugins and server plugins on /usr/lib/pokemon-online/serverplugins?
yes! Thanks for everything, but i'm going to be inactive for a few days until beginning of january (holidays and all). I'll be back after that in full mode!
I start make package for shared libraries (I see that also server use it) but before probably need to be renamed, for example remove double lib at end of pokemonlib and give name more specify for not risking conflicts with other software, even if probably all other have already more specific name. Is a problem do this upstream? I need also know headers file to add on -dev packages.
The headers files are in src/PokemonInfo, src/Utilities and src/BattleManager (i think). I'll rename the libraries.
Alright. I'm releasing 2.0.1 very soon, on my repo (the coyotte508 one and soon the po-devs one) the names are changed. Edit: Done! When you have the debian package, i'll be happy to link it in the downloads page!
Thank you, as soon as I have time I proceed with the debian packages. About version increase probably will be seen wrong by most systems, should be for example 2.1.0 or 2.0.10 About server binary also need to be renamed, is possible do also that upstream? About packages when ready I'll propose them for upload on debian repository and will be available on all new versions of debian and derivates for all architectures possible. I will need help to test them, I will keep updated the first post of this topic with a quick and easy way on how to prepare the test packages.
You can change to 2.0.10 if you want! also TARGET = Server in Server/Server.pro, you can change it to something like: Code (text): config(debian): TARGET = Pokemon-Online-Server !config(debian): TARGET=Server Also, do you want me to delete the pkg-pokemononline repo in the organization po-devs and move yours there instead? (i'd give you admin rights over it of course) Also, even before you put the debian package into official debian repo, it would be better to put it on the downloads page so people can have it right now (and test!)
I have done new commit for new version, patch for fix build taken from upstream git and I have added the shared libraries (for now on -dev packages header are missed). About server on previous version build successfull now not for qtwebsocket missed, I see that is not on debian packages now, have it locally I think is not an option for debian standard. The source of that are here (http://gitorious.org/qtwebsocket) right? package it when is beta on upstream make impossible upload or backports to stable probably. Is necessary for server or is used only by plugin or optional and I can disable it for now on debian build? About deb package is always good build for each distributions/versions for minor bugs, is also one of the things that makes the software of these distributions generally of better quality in comparison to other generic binary such as those for Windows systems. I have update the instructions for build and test them on first post.