Amit Rana wrote:
> The main thing is that why does calling "generate.py api" generate 
> files in lowercase.
>
> Tracing the "generate.py api", I found that eventually the 
> "build-data" job of qooxdoo-0.8-sdk\component\apiviewer\api.json file 
> is called which in turn runs the "api"  job on python generator. This 
> generates all the data files (class files) in the custom/api/script 
> folder (like qx.class.js etc).
> Now, since I don't know much about python, so I cannot explore how 
> this job runs internally by python and why does it generate files in 
> lowercase instead of uppercase.
>
> Now, I have 2 options:
> 1. Know the internal working and try to generate files in uppercase.
> 2. Understand how offline access is able to resolve case name and 
> implement similar thing for server.

I think I found it! It has nothing to do with *reading* the files from 
disk (as I thought). It is the generator when *writing* the files to 
disk. You can easily test  the following patch: Locate the file 
tool\pylib\misc\filetool.py. Then change the lines:


    def normalize(filename):
        return os.path.normcase(os.path.normpath(filename))


to

    def normalize(filename):
        return os.path.normpath(filename)

This should do the trick :). Let me know if it works.



>
> amit
>
> P.S. : Pretty strange that only I faced this issue =-O

I believe it was a combination of factors. For one, our old tool chain 
on Windows was based on Cygwin, which produced mixed case file names 
alright. But when we switched to Python-only tools (with 0.8), it was 
possible to run the generator with native Python implementations. Now 
running *that* turned on a platform-dependend feature in Python that 
would convert the file names to all-lower case.
Now this alone wouldn't have sufficed. It took the additional piece of 
an application (a web server in your case) that was particular about 
character case, so Tomcat would distinguish "qx.class.js" from 
"qx.Class.js" (while most other Windows apps, including browsers, would 
not).

So it was your combination of tools that brought up the issue - good one :).

T.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to