Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-25 Thread kaputtnik
See https://code.launchpad.net/~widelands-dev/widelands-website/add_DISPLAY_to_update_help/+merge/295756 -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers is subscribed to branch lp:widelands-website.

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-25 Thread kaputtnik
Creating such a view isn't as difficult. Problematic would be to redirect the output to such a view. So for now i would suggest another approach: Setting DISPLAY through update_help.py: # Because wl_map_object_info needs access to a graphical server, which is running at # DISPLAY :1 we have

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread GunChleoc
I have never developed any Django stuff before, so I have no idea how long it will take to code such a button - sounds like potentially a lot of work for very little gain. Unless you know how to do it and can do it fast? And I'm still in favour of documenting this in the readme, so if somebody

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread kaputtnik
Adding it to the README isn't good, because the README.txt is for local testing and setting the environment variable is only needed on the server. We could deploy this on wl.widelands.org, set the environment variable, run update_help and unset the environment variable again. Doing so we have a

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread GunChleoc
Sounds good to me - if DISPLAY=":1" works, let's ad it to the README.txt and consider this fixed then? -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers is subscribed to branch lp:widelands-website.

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread kaputtnik
Thanks SirVer for explanation :-) So my thoughts where half correct :-D > Maybe a Django admin module would do the trick? Thats what i meant with "or we create a view for updating the encyclopedia so that the SDL is initialized through the browser." Now we know that the website uses the server

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread SirVer
Just a short drive by to explain how graphics on the server works: We run Xvfb, a virtual framebuffer that fakes a X11 environment at 800x600 at 32bit resolution that supports opengl through mesa. This server runs on ":1" on the server, so running export DISPLAY=":1" and then running any

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread GunChleoc
The browser context and the i18n:: call are the only differences in C++ until the point that the error occurs. Maybe a Django admin module would do the trick? -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers is subscribed

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-24 Thread kaputtnik
It's a bit difficult to explain... wl_map_info is working on the server. It is used to get some informations when uploading a map and to extract the picture from the mapfile. Everytime a user uploads a map wl_map_info is executed. The difference to wl_map_object_info is, that wl_map_info is

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-23 Thread GunChleoc
OK, I get it now - I misunderstood and thought that wl_map_info was working. I have no clue how to initiaize SDL on the server then. The easiest solution would be to ship the JSON files with the source code, like we do for the developers. It's a bit weird though to ship files with the game that

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-23 Thread kaputtnik
I don't believe that set_locale() is the culprit. I think when uploading a map the SDL is initialized through the browser and when trying to do it manually on the server it fails. This happens also with wl_map_info when trying to use it in console on the server ( i uploaded the map "Crossing

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-23 Thread GunChleoc
The only thing that is different is the call to i18n::set_locale("en"); in line 53 - could you try removing that line to see if it works? And if it does, move that line down? -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-22 Thread kaputtnik
Review: Needs Fixing in widelands code Because the culprit is in widelands wl_map_object_info and not on the website code, i leave this branch merged. But i do not deploy it on the productive website until wl_map_object_info is fixed. Klaus, the map_info uses also an initialized SDL to get

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-22 Thread Klaus Halfmann
kaputtnik: waht you need is a, so called, headless mode. Either SDL can provide this (No idea how o do this, thiugh). Or you can set um some X-Server thats works on some local Bitmaps, which may be sufficent for your case. Perhpas it is not needed so set up any graphics fo this case, but the

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-22 Thread kaputtnik
Widelands is updated on the server and a cronjob was fixed to get the WIDELANDS_SVN_DIR updated (many thanks to janus for help). I have installed this on the alpha site and get an error when trying to update the help: --- $ ./manage.py update_help JSON files will

[Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-22 Thread noreply
The proposal to merge lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website has been updated. Status: Needs review => Merged For more details, see: https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 -- Your team Widelands Develop

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-22 Thread GunChleoc
Should be all fixed now. -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers is subscribed to branch lp:widelands-website. ___ Mailing list: https://launchpad.net/~widelands-dev Post

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-21 Thread kaputtnik
Review: Needs Fixing image_url Ah, ok, i just looked in the tables in column "Stores" ... but this column meant only wares, not workers. Some nits: 1. Please check for correct indentation (python prefers spaces for indentation). The file update_wlhelp.py has a mix of tabs and spaces. See also

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-21 Thread GunChleoc
> One thing i noticed: Military buildings does not show how many soldiers > they could "store". But i didn't know how this was handled before. My version says "Keeps X Soldiers" for militarysites, both the current website and my branch. --

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-20 Thread kaputtnik
Review: Approve testing I have merged this branch into the actual website code and ran ./manage.py update_help and update_help_pdf Both works fine :-) I didn't checked for correct output but i think it looks good. One thing i noticed: Military buildings does not show how many soldiers they

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-20 Thread GunChleoc
Review: Resubmit > Have you tried the wl_django1_8 branch? That was a great idea - should be ready to go now :) -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers is subscribed to branch lp:widelands-website.

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-05-14 Thread GunChleoc
The C++ code has been updated now to specify the output dir on the command line. I can't get the website code to run after my recent system upgrade though, so I don't know how to finish up this branch :( -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-04 Thread GunChleoc
> The json files are only needed by the website, so why not call > wl_map_object_info from update_help.py I am already doing that. > and storing the files somewhere beneath > MEDIA_ROOT? Something similar like we have with uploading a map. That's the plan now :) --

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-03 Thread kaputtnik
Ah, now i understand... the update process is a bit uncomfortable anyway: 1. call '[sudo] wl_map_object_info' to generate updated json files 2. call ./manage.py update_help to update the database The json files are only needed by the website, so why not call wl_map_object_info from

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-03 Thread GunChleoc
If we install Widelands from the PPA, it will end up in /usr/local/games. The executable then tries to write the JSON files to /usr/local/games/data/map_object_info. Permission is denied for creating the directory. It's a security measure - a bit like Windows getting prissy when you try to

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-03 Thread kaputtnik
> I managed to run Widelands from an installation now, but we will need to add > an argument to the executable now to choose the path for the JSON files, > because we won't want to run this with sudo. Could you please explain a bit more? Because widelands is installed on the server, it should

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-03 Thread GunChleoc
Thanks for pointing out the diff comment, I had missed that. We won't only get 404s when deleting the media files, but also when deleting the Django models. How about we add a commandline switch to the update script, so we can decide whether we need to clean house or not? We won't need to do

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-03 Thread kaputtnik
Review: Approve testing Works :-) Maybe we could adjust media/css/help.css to fit the table style with the one from the wiki? Currently the table headers have a really small font size and does not not show the wooden background. You could load the wiki.css before help.css and adjust only

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-02 Thread SirVer
pedia/+merge/287410 > You are reviewing the proposed merge of > lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website. -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 Your team Widelands Developers

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-02 Thread GunChleoc
It is already part of the .deb - I just tested with sudo make install. However, when I try to change the Python call to subprocess.check_call([os.path.normpath('wl_map_object_info')]) it doesn't work. -- https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-03-01 Thread SirVer
rate them this way. > > We should test this on the alpha server before deploying it on the live > server. > -- > https://code.launchpad.net/~widelands-dev/widelands-website/encyclopedia/+merge/287410 > You are reviewing the proposed merge of > lp:~widelands-dev/wideland

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-02-29 Thread GunChleoc
My idea is to generate them on the server - I have added a call to the executable in update_help.py. It will also run a python script that checks for basic JSON validity. My idea is that they aren't part of the Widelands installation as such and that they shouldn't be packaged, so I prefer to

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-02-29 Thread SirVer
Review: Approve must not be merged before the corresponding WL branch is deployed on the website. lgtm to me in general, though I did not test it. What is the plan for generating the JSON files? It seems you expect them to be dumped into the JSON directory in the repo - do you want to check

[Widelands-dev] [Merge] lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website

2016-02-28 Thread GunChleoc
elands-dev/widelands/map_object_info -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/encyclopedia into lp:widelands-website. === modified file 'templates/wlhelp/index.html' --- templates/wlhelp/index.html 2015-05-23 16:1