News:

Beta test the new forum at https://simutrans.forum/

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

TileCutter 0.5.7 Release

Started by Ashley, March 01, 2011, 10:45:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashley

If you do encounter any issues while using TileCutter please submit a bug report by posting in reply to this thread with the following information:

1. Circumstances and description of the issue
2. tilecutter.log and TileCutter5.exe.log (if present) - These can be found under "%USERPROFILE%\Application Data\tilecutter\" on Windows, "~/Library/Logs/tilecutter.log" on OSX and "~/.tilecutter/tilecutter.log" on all other platforms.
3. Copy of the tilecutter.config file - This can be found either in the program's installation directory, at "%USERPROFILE%\Application Data\tilecutter\" on Windows or "~/.tilecutter/tilecutter.config" on all other platforms.


Changes 0.5.7:
FIX: Many unicode issues relating to information passed into program
FIX: Logger now handles multiline output properly
FIX: Proper handling of UTF-8 files
FIX: Translations for file dialogs now work properly
CHANGE: tilecutter.py/tilecutter.pyw are now wrapper scripts that call main.py -
       should be a small speed boost from bytecode compilation of main program
CHANGE: Now known as "tilecutter.exe" rather than "tilecutter5.exe"
FIX: Issues relating to scope in main.py/mainwindow.py
ADD: Basis for Mac-specific distribution via py2app
ADD: New translations imported from SimuTranslator
ADD: Some new translation strings added to SimuTranslator:
    "&File", "&Tools", "&Help"
FIX: Improper action when load dialog closed with X rather than cancel
FIX: Close button on dialog didn't work (language, about and preferences)
CHANGE: TCP load/save now uses the string versions of pickle/unpickle, rather than working on files directly
FIX: Display refreshing on OSX - no OnPaint method defined for window
WORKAROUND: Bug where setting title of parent window causes child windows to need a refresh
           Solved by adding OnPaint method to child window and calling this via update() method
CHANGE: TCP load/save functions moved into seperate module - tcp.py
CHANGE: Objects to be pickled/unpickled have standard prep_serialise/post_serialise functions to handle stuff that shouldn't be passed to pickle
ADD: Framework for addition of JSON-based save format
FIX: Loading files at root of drives on Windows now works (.tcp files and .png files)
ADD: If directories in a save path do not exist (for .tcp and .dat/.png export) the directories will be created
FIX: Robustness for file opening, fails nicely if file doesn't exist now
CHANGE: To allow files to be opened with the GUI from the command line (argv emulation on OSX for example) the CLI must
       now be invoked explicitly. You *must* specify the -c flag to invoke the command line processing. Any existing automation
       scripts which make use of TileCutter for command line processing will likely need to change.
ADD: Drag and drop of .tcp files onto dock icon opens file both while running and not
ADD: Should be able to double-click on .tcp files on OSX to open them automatically
CHANGE: Configuration is now stored per-user under user-specific directories
       On OSX config is stored at: ~/.tilecutter/tilecutter.config
       On Windows config is stored at: %USERPROFILE%\Application Data\tilecutter\tilecutter.config
       On all other platforms config is stored at: ~/.tilecutter/tilecutter.config
CHANGE: Default logging behaviour is to log to a platform-dependant location (you can still override this by changing the logfile setting in the config)
       On OSX default logging location is: ~/Library/logs/tilecutter.log
       On Windows default logging location is: %USERPROFILE$\Application Data\tilecutter\tilecutter.log
       On all other platforms default logging location is: ~/.tilecutter/tilecutter.log
ADD: If directories in the config file path don't exist they will be created as needed
FIX: Start state of radio buttons on OSX
ADD: Replace methods for finding default file locations with os.path.expanduser()

Known Bugs
- Panel display bug when choosing different languages, workaround is to resize the window
- Handling of Unicode paths on Windows still isn't perfect - will be fixed in next version


What's new
Many tweaks and optimisations, especially for non-Windows platform support
Much better handling of configuration/log file storage with platform-specific locations used

What's coming in the next version:
Max OSX distribution with native App and distribution
New bigger UI icons to improve interface
MSI installer for Windows
And lots more!

Notes

Please see here for TileCutter documentation

All the paths in the main window are relative to the project save location path. This is intended to allow you to put all your work files in one directory, and then to be able to move or zip that directory and send it to someone else while preserving all the links to the images. Also note that the images are not saved with the project file, only links to them are (this may change at some point).

It's also worth pointing out that in order for the one click exporting to work (e.g. makeobj integration) you need to have filled out the correct details in the dat editing window. The image array information is automatically generated and appended to whatever you type into this box.

Download
You can download this release of TileCutter from the following link:

TileCutter_win_0.5.7.zip (5.4 MB)

You can also download a source distribution:

TileCutter_src_0.5.7.zip (232 KB)

NOTE: The source distribution requires that you have Python 2.6 or better installed already, and depends upon the wxWidgets library.

And you can check out the source for this release from the SVN, using this URL:

svn://entropy.me.uk/timothy/tilecutter/tags/0.5.7/

And the current latest version from this one:

svn://entropy.me.uk/timothy/tilecutter/trunk/

I recommend upgrading to this version over all previous versions of TileCutter, especially the 0.3 branch.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

jonasbb

Why is the shebang #!/usr/local/bin/python ?
#!/usr/bin/python is better, because it uses the defaul install location.

Ashley

Indeed, it should probably be /usr/bin/python as it is the default on most platforms. I'll make a note to change that for the next release.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

jonasbb


The Hood

Spotted a bug in the dat output: when I output a 1x2 building the images were indexed wrong so I had to change image[0] to image[1] etc.

Ashley

Could you post an example with .tcp file please so i can check?
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Václav

It seems like there are big problems again.

1. Python source or windows version don't run by me - log file from windows version attached
2. Python source write log file only if it is already present in dir - else it is not created - log file attached too

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Ashley

#7
Second problem I think can be fixed, more Windows/unicode problems.

Does the Windows version produce a tilecutter.log file at all?

Could you also try deleting/moving the tc.config file from the program's directory - on first run it will then create a new config file with default settings. Does it run then or fail with the same error?

Log file should be created under:

%USERPROFILE%\Application Data\tilecutter\

If there's nothing in the tc.config/tilecutter.config to specify otherwise. Or maybe it's failing for the same unicode-related reason, hmm.


Edit:

I've isolated the bug and set up an environment to test this for myself with usernames containing non-ASCII characters. The next release should solve these issues finally.

One thing I've found (and not yet sure if I can fix) is that when using the windows binary version if the path containing the TileCutter program contains non-ASCII characters it fails to load since it can't locate the .dll containing the Python environment.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

The Hood

I can't find the actual file I was working on, but this should be similar:

http://www.mediafire.com/?jasqvkyr2oy22po

VS

#9
I can't open a project created a few moments ago... Running source version on Windows, there is nothing in console. Path contains pure ascii.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Ashley

VS, can you post the log file and the tcp file please?
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

VS

Ah! Sorry, I forgot again about the logger. Attached in the original post... Breakage starts with missing local variable, then continues with unicode further down.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Ashley

Ok that was an easy bug to fix, I'll post a new minor release which solves yours and Vaclav's problems asap.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

janika600(hun)

Traceback (most recent call last):
  File "tilecutter.py", line 21, in <module>
  File "main.pyc", line 22, in <module>
  File "logger.pyc", line 18, in <module>
  File "config.pyc", line 17, in <module>
  File "config.pyc", line 66, in Config
  File "ntpath.pyc", line 301, in expanduser
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 33: ordinal not in range(128)
Traceback (most recent call last):
  File "tilecutter.py", line 21, in <module>
  File "main.pyc", line 22, in <module>
  File "logger.pyc", line 18, in <module>
  File "config.pyc", line 17, in <module>
  File "config.pyc", line 66, in Config
  File "ntpath.pyc", line 301, in expanduser
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 33: ordinal not in range(128)

what's this? what i need to do?

Ashley

There will be a new release soon which will fix these Unicode issues.

Sorry it's taking longer than expected, I've been rewriting a lot of the backend code of TileCutter to make sure it works well in future. An entirely new save format for example.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

The Hood

Rather bizarrely, TileCutter seems to have stopped working on my XP machine (it was working last weekend).  When I launch (either from start menu or by clicking on icon in folder) it appears in the taskbar, but I can't see the window for it anywhere and can't get at it.  Any ideas? (Windows 7)

Ashley

Sorry, is it XP or Windows 7?

Also are you using the .exe or .py version?

Could you post the log file and your tilecutter.config/tc.config file? Note that in 0.5.7 the location of the config and log file have changed (details at the top of the thread).
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

The Hood


Ashley

#18
Strange, the config file has window position set to (-32000,-32000), so on init the program will be setting the window to a position outside your screen. I have no idea how this could've happened but you should be able to fix it by either changing those values to 0 or deleting the config file and letting TileCutter recreate it.

I've added some more logging to the next version so if this happens again with that version I might be able to work out why.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

mEGa

Hi Timothy,
New french design contributor,
I could translate Tilecuter into French. How do I have to make?
Which are the source files? tc_fr.tab ?

Note : I have Linux version

Regards
Current projects in progress : improvements of few designed french paks

Václav

#20
Yes - translation file for your language is tc_fr.tab.

Ask chief of SimuTranslator for making of account. But someone of you, French people, surely already has account there. But I don't know who. But, of course, the more people making translation the better.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

mEGa

Current projects in progress : improvements of few designed french paks

Ashley

Hi mEGa, thanks for your kind offer of translating TileCutter into French. The best way to go about this would be to get an account on SimuTranslator as VaclavMacurek suggests. I can then integrate the translated texts directly into the project next time I build a release.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

The Hood

Quote from: Timothy on March 09, 2011, 11:36:46 PM
Strange, the config file has window position set to (-32000,-32000), so on init the program will be setting the window to a position outside your screen. I have no idea how this could've happened but you should be able to fix it by either changing those values to 0 or deleting the config file and letting TileCutter recreate it.

I've added some more logging to the next version so if this happens again with that version I might be able to work out why.

Bizarre, but thanks for the pointer.  I'll let you know if it happens again and if I can spot any pattern.

mEGa

Quote from: Timothy on March 10, 2011, 11:06:08 AM
Hi mEGa, thanks for your kind offer of translating TileCutter into French. The best way to go about this would be to get an account on SimuTranslator as VaclavMacurek suggests. I can then integrate the translated texts directly into the project next time I build a release.

Hi Timothy,
I have just asked it but the new website does not responding. I will try as soon as possible.
Regards
Current projects in progress : improvements of few designed french paks

Václav

SimuTranslator page has not open registration process - like this forum. For this is needed to ask Frank (chief of SimuTranslator) for making account.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

mEGa

Quote from: VaclavMacurek on March 11, 2011, 10:48:47 AM
SimuTranslator page has not open registration process - like this forum. For this is needed to ask Frank (chief of SimuTranslator) for making account.

Hi Vaclav.

OK; thanks for your response.
Current projects in progress : improvements of few designed french paks

jonasbb

@mEGA: Please check your PM in this forum or your email for the Translator account.

Spartanis

Hi!. I Used Tilecutter rather lovingly on my laptop windows 7 for some time now.. but me lappie has gorn quite.. um.. zappy.. O_o SO i had to use my main box, which is Linux Ubuntu machine. I was wondering if its possible to have a LINUX version?

I tried running it under WINE, but.. the Wine-o spat teh dummy at me about DLL module error or summat...

THe Error Log file states:
Traceback (most recent call last):
  File "tilecutter.py", line 21, in <module>
  File "main.pyc", line 28, in <module>
  File "wx\__init__.pyc", line 45, in <module>
  File "wx\_core.pyc", line 4, in <module>
  File "wx\_core_.pyc", line 12, in <module>
  File "wx\_core_.pyc", line 10, in __load
ImportError: DLL load failed: Module not found

Ashley

Hi Spartainis,

Just use the source version on Linux, Ubuntu ought to come with Python installed. Just run the tilecutter.pyw file :)

If it doesn't work or gives you an error about wxpython you'll need to install this. See something like: http://wiki.wxpython.org/InstallingOnUbuntuOrDebian / http://www.wxpython.org/download.php
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Spartanis

Quote from: Timothy on September 06, 2011, 10:57:38 AM
Just use the source version on Linux, Ubuntu ought to come with Python installed. Just run the tilecutter.pyw file :)

Got and download the source file. Spotted the .pyw file. So far so good. I double click it, and i get this dlg box saying "Run, Run in terminal, Display etc etc" I tried all buttons, but nothing is happening (expect the display one...)

So, i did the next thing, Get wxpython. After reading the website, i sat there thinking "oh crud, my head's gonna have a stroke in a minnie..."

I checked my.. um.. synaptic package manager, and even that list is somewhat confusing.. (mind you, i typed wxpython in the search field.)

I really appreciate your help Timothy. I feel i'm annoying you aint I? :P