#78 Declined
Repository
triton/premake-cs-fixes premake-cs-fixes
Branch
cs-translate
Repository
premake/premake-dev premake-dev
Branch
default

Fixed C# Make files in OSX by translating the source files path.

Author
  1. João Matos avatarJoão Matos
Reviewers
Description

Hey Jason, so there are some problems in OSX C# Makefiles, they fail because of some path issues. Is this the correct way to go about fixing the issue?

Comments (3)

  1. Jason Perkins

    No this isn't correct, and will break the Visual Studio exporters. How did the paths become incorrect in the first place? They should always be specified with forward slashes.

    1. Jason Filsinger

      I think the problem is cs.listsources calls path.translate which defaults to using double backslashes if no path delimiter is specified. Replacing path.translate(value) with path.translate(value, '/') inside cs.listsources should fix the problem.

      1. Jason Perkins

        I think this the cause, yes. Right solution would be to remove the call to translate entirely, as paths should already be using forward slashes. Or wrap it with something like:

        if _OS == premake.WINDOWS then value = path.translate(value) end
        

        But I think the forward slashes should work?

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.