Re: [Freeciv-Dev] Issues while building Freeciv-Web.

2013-05-20 Thread Andreas Røsdal

On Mon, 20 May 2013, Chaitanya Sharma wrote:

Hi,
I've been trying to build / setup a local development environment for freeciv, 
but am running into a lot of issues during
the process.

I'm following the README,  and while running sync for freeciv image extract, 
this is the below error I get.

Any suggestions to fix this would be greatly appreciated. Thanks!


Hi Chaitanya!

Take a look at this README:
https://github.com/andreasrosdal/freeciv-web/

I think you have to run these scripts to get it working:

/freeciv-img-extract/setup_links.sh
/freeciv/apply_patches.sh

Feel free to ask me any more questions if you are stuck.


Regards,
Andreas___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Issues while building Freeciv-Web.

2013-05-20 Thread Chaitanya Sharma
Thank You!

I just did that, but I think I also have some file encoding issues.,
for example a simple attempt to read the config file throws a lot of errors.

 config.read(../freeciv/freeciv/data/misc/colors.tilespec)
Traceback (most recent call last):
  File stdin, line 1, in module
  File
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py,
line 305, in read
self._read(fp, filename)
  File
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py,
line 546, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors:
../freeciv/freeciv/data/misc/colors.tilespec
[line  6]: '}\n'
 [line 10]: '}\n'
[line 13]: '}\n'
[line 16]: '}\n'
 [line 19]: '}\n'
[line 22]: '}\n'
[line 25]: '}\n'
 [line 28]: '}\n'
[line 31]: '}\n'
[line 34]: '}\n'
 [line 37]: '}\n'
[line 40]: '}\n'
[line 45]: '}\n'


-Chaitanya



On Mon, May 20, 2013 at 5:21 PM, Andreas Røsdal andre...@pvv.ntnu.nowrote:

 On Mon, 20 May 2013, Chaitanya Sharma wrote:

 Hi,
 I've been trying to build / setup a local development environment for
 freeciv, but am running into a lot of issues during
 the process.

 I'm following the README,  and while running sync for freeciv image
 extract, this is the below error I get.

 Any suggestions to fix this would be greatly appreciated. Thanks!


 Hi Chaitanya!

 Take a look at this README:
 https://github.com/**andreasrosdal/freeciv-web/https://github.com/andreasrosdal/freeciv-web/

 I think you have to run these scripts to get it working:

 /freeciv-img-extract/setup_**links.sh
 /freeciv/apply_patches.sh

 Feel free to ask me any more questions if you are stuck.


 Regards,
 Andreas
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Issues while building Freeciv-Web.

2013-05-20 Thread Chaitanya Sharma
Please find the diff below, which got sync for freeciv-img-extract to work
for me.
This looks pretty weird, but does work., Let me know you think.


Otherwise, PNG Crush fails not finding : pre-freeciv-web-tileset-1.png

Could not find file: pre-freeciv-web-tileset-1.png
Could not find file: freeciv-web-tileset-1.png
   CPU time decoding 0.000, encoding 0.000, other 0.000, total 0.000 seconds

cp: freeciv-web-tileset-1.png: No such file or directory


Can you suggest on what should be done about the missing png file ?


-Chaitanya






diff --git i/freeciv-img-extract/img-extract.py
w/freeciv-img-extract/img-extract.py
index 9a7b9c9..bba0d75 100755
--- i/freeciv-img-extract/img-extract.py
+++ w/freeciv-img-extract/img-extract.py
@@ -14,6 +14,7 @@
 '''

 import os, sys
+import io

 import ConfigParser
 import Image
@@ -112,7 +113,11 @@ def increment_tileset_image():
 for file in files:
   config = ConfigParser.ConfigParser()
   print(Parsing  + file );
-  config.read(file);
+  data = open(file, r).readlines()
+  data = (.join(data)).replace(\n, )
+  data = io.BytesIO(data)
+
+  config.readfp(data)
   print(config.sections());

   if extra in config.sections():





On Mon, May 20, 2013 at 6:06 PM, Chaitanya Sharma gopi.dai...@gmail.comwrote:

 Thank You!

 I just did that, but I think I also have some file encoding issues.,
 for example a simple attempt to read the config file throws a lot of
 errors.

  config.read(../freeciv/freeciv/data/misc/colors.tilespec)
 Traceback (most recent call last):
   File stdin, line 1, in module
File
 /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py,
 line 305, in read
 self._read(fp, filename)
   File
 /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py,
 line 546, in _read
 raise e
 ConfigParser.ParsingError: File contains parsing errors:
 ../freeciv/freeciv/data/misc/colors.tilespec
 [line  6]: '}\n'
  [line 10]: '}\n'
 [line 13]: '}\n'
 [line 16]: '}\n'
  [line 19]: '}\n'
 [line 22]: '}\n'
 [line 25]: '}\n'
  [line 28]: '}\n'
 [line 31]: '}\n'
 [line 34]: '}\n'
  [line 37]: '}\n'
 [line 40]: '}\n'
 [line 45]: '}\n'


 -Chaitanya



 On Mon, May 20, 2013 at 5:21 PM, Andreas Røsdal andre...@pvv.ntnu.nowrote:

 On Mon, 20 May 2013, Chaitanya Sharma wrote:

 Hi,
 I've been trying to build / setup a local development environment for
 freeciv, but am running into a lot of issues during
 the process.

 I'm following the README,  and while running sync for freeciv image
 extract, this is the below error I get.

 Any suggestions to fix this would be greatly appreciated. Thanks!


 Hi Chaitanya!

 Take a look at this README:
 https://github.com/**andreasrosdal/freeciv-web/https://github.com/andreasrosdal/freeciv-web/

 I think you have to run these scripts to get it working:

 /freeciv-img-extract/setup_**links.sh
 /freeciv/apply_patches.sh

 Feel free to ask me any more questions if you are stuck.


 Regards,
 Andreas



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] Issues while building Freeciv-Web.

2013-05-20 Thread Andreas Røsdal


I suggest you start from scratch, I have attached the exact commands
I used to setup freeciv-web localy just now. Please try it,
and let me know if you encounter any error-messages underway.

** Install freeciv-web on Ubuntu Linux:
skipping step 1 and step 2 from readme.

cd ~/freeciv-build
git clone https://github.com/andreasrosdal/freeciv-web.git
cd freeciv-web
sudo cp publite2/nginx.conf /usr/local/nginx/conf/
cd freeciv
svn co svn://svn.gna.org/svn/freeciv/trunk@22812 freeciv
./apply_patches.sh
cd freeciv
./autogen.sh --enable-fcweb
make
sudo make install
cd ..
sudo cp data/fcweb/ /usr/local/share/freeciv/ -rf
cd ..
cd freeciv-img-extract/
sh setup_links.sh
sh sync.sh
cd ..
cd freeciv-proxy
sh sync.sh
cd ..
cd freeciv-web/src/main/webapp/meta/php_code/
cp local.php.dist local.php
vim local.php
cd ../../WEB-INF/
cp resin-web.xml.dist resin-web.xml
vim resin-web.xml
cd ../../../../
sh build.sh
cd ../scripts/
./start-freeciv-web.sh

start browser, and goto http://localhost


Good luck!


Regards,
Andreas

On Mon, 20 May 2013, Chaitanya Sharma wrote:


Please find the diff below, which got sync for freeciv-img-extract to work
for me.This looks pretty weird, but does work., Let me know you think.


Otherwise, PNG Crush fails not finding : pre-freeciv-web-tileset-1.png

Could not find file: pre-freeciv-web-tileset-1.png
Could not find file: freeciv-web-tileset-1.png
   CPU time decoding 0.000, encoding 0.000, other 0.000, total 0.000 seconds

cp: freeciv-web-tileset-1.png: No such file or directory


Can you suggest on what should be done about the missing png file ?


-Chaitanya






diff --git i/freeciv-img-extract/img-extract.py
w/freeciv-img-extract/img-extract.py
index 9a7b9c9..bba0d75 100755
--- i/freeciv-img-extract/img-extract.py
+++ w/freeciv-img-extract/img-extract.py
@@ -14,6 +14,7 @@
 '''
 
 import os, sys
+import io
 
 import ConfigParser
 import Image
@@ -112,7 +113,11 @@ def increment_tileset_image():
 for file in files:
   config = ConfigParser.ConfigParser()
   print(Parsing  + file );
-  config.read(file);
+  data = open(file, r).readlines()
+  data = (.join(data)).replace(\n, )
+  data = io.BytesIO(data)
+
+  config.readfp(data)
   print(config.sections());
 
   if extra in config.sections():





On Mon, May 20, 2013 at 6:06 PM, Chaitanya Sharma gopi.dai...@gmail.com
wrote:
  Thank You!
I just did that, but I think I also have some file encoding issues., 
for example a simple attempt to read the config file throws a lot of
errors.

 config.read(../freeciv/freeciv/data/misc/colors.tilespec)
Traceback (most recent call last):
  File stdin, line 1, in module
  
File/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/li
b/python2.7/ConfigParser.py, line 305, in read
    self._read(fp, filename)
  
File/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/li
b/python2.7/ConfigParser.py, line 546, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors:
../freeciv/freeciv/data/misc/colors.tilespec
[line  6]: '}\n'
[line 10]: '}\n'
[line 13]: '}\n'
[line 16]: '}\n'
[line 19]: '}\n'
[line 22]: '}\n'
[line 25]: '}\n'
[line 28]: '}\n'
[line 31]: '}\n'
[line 34]: '}\n'
[line 37]: '}\n'
[line 40]: '}\n'
[line 45]: '}\n'


-Chaitanya



On Mon, May 20, 2013 at 5:21 PM, Andreas Røsdal andre...@pvv.ntnu.no
wrote:
  On Mon, 20 May 2013, Chaitanya Sharma wrote:
Hi,
I've been trying to build / setup a local
development environment for freeciv, but am
running into a lot of issues during
the process.

I'm following the README,  and while running
sync for freeciv image extract, this is the
below error I get.

Any suggestions to fix this would be greatly
appreciated. Thanks!


Hi Chaitanya!

Take a look at this README:
https://github.com/andreasrosdal/freeciv-web/

I think you have to run these scripts to get it working:

/freeciv-img-extract/setup_links.sh
/freeciv/apply_patches.sh

Feel free to ask me any more questions if you are stuck.


Regards,
Andreas




___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev