mgusmano / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

Verify Path.PathSeperator is used for linux compatibility #226

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
NA

Original issue reported on code.google.com by DanelK...@gmail.com on 27 Sep 2012 at 10:32

GoogleCodeExporter commented 8 years ago
Let me hijack this issue and add a specific case where it is affected, JsType(, 
Filename)

If "/" is used it is converted to "\", however "\" is not used as path 
separator but rather becomes a part of the filename.

Both these two generate a file named "out\Globals.js":

[JsType(JsMode.Global, Filename="out\\Globals.js")]
[JsType(JsMode.Global, Filename="out/Globals.js")]

Original comment by Hultqvis...@gmail.com on 8 Jan 2013 at 4:14

GoogleCodeExporter commented 8 years ago
When using:
[assembly: JsExport(DefaultFilenameAsCsFilename = true)]

I get all generated files in the project root with names such as:
"SubPart\ClassA.js"
"SubPart\ClassB.js"
rather than being located in the "SubPart" directory with name "Class..js"

Original comment by Hultqvis...@gmail.com on 8 Jan 2013 at 10:06

GoogleCodeExporter commented 8 years ago

Original comment by DanelK...@gmail.com on 9 Jan 2013 at 7:54

GoogleCodeExporter commented 8 years ago

Original comment by DanelK...@gmail.com on 12 Jan 2013 at 7:20

GoogleCodeExporter commented 8 years ago
fixed

Original comment by sebastia...@gmail.com on 12 Jan 2013 at 8:10

GoogleCodeExporter commented 8 years ago
From my findings there are still issues with the naming.

If a file is located in "Test" and has any the following
[JsType(JsMode.Global, Filename="out\\Globals.js")]
[JsType(JsMode.Global, Filename="out/Globals.js")]
It will generate the file: "out\Globals.js" in the directory "Test"

17:08:08.160: SaveJsFiles: Start: 
            Test/out\Globals.js

Also using
[assembly: JsExport(DefaultFilenameAsCsFilename=true)]
the output paths are all using "\" resulting in file names such as 
"Path\To\Files.js" - single file name no path.

Original comment by Hultqvis...@gmail.com on 22 Jan 2013 at 4:13

GoogleCodeExporter commented 8 years ago
If anyone else has this issue, here is my workaround.
It's a bash script that I run after the build process.

for n in *\\*.js
do
    o=${n//\\/\/}
    mv "$n" "$o"
done

Original comment by Hultqvis...@gmail.com on 30 Jan 2013 at 6:53

GoogleCodeExporter commented 8 years ago
The issue in my last comments are now fixed in v5.00.5000

Original comment by Hultqvis...@gmail.com on 30 Jan 2013 at 12:38