Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #2

Open
dobesv opened this issue Apr 16, 2012 · 5 comments
Open

Windows support #2

dobesv opened this issue Apr 16, 2012 · 5 comments

Comments

@dobesv
Copy link
Contributor

dobesv commented Apr 16, 2012

So far cipr install works fine, but trying to use cipr run fails because the executable in windows is different.

Also in windows I'm not sure whether the executable actually accepts command-line parameters, either.

Running the app directly by loading main.lua into the simulator fails because cipr expects certain environment variables to be setup:

cipr._packageDir = os.getenv('CIPR_PACKAGES')
cipr._projectDir = os.getenv('CIPR_PROJECT')

I wonder whether this code could be changed to just calculate those paths relative to the script itself?

@six8
Copy link
Owner

six8 commented Apr 16, 2012

Lua running through Corona wasn't that good at reporting the file's location which made it hard to determine where to load relative to it. CIPR_PACKAGES could be stored in .ciprcfg which would obviate the need for that setting. Then you would just need to be able to figure out CIPR_PROJECT in order to load .ciprcfg.

Doesn't Windows have environment vars though?

@dobesv
Copy link
Contributor Author

dobesv commented Apr 16, 2012

I changed it to work like this:

cipr._packageDir = os.getenv('CIPR_PACKAGES') or system.pathForFile(".cipr/packages", system.ResourceDirectory)
cipr._projectDir = os.getenv('CIPR_PROJECT') or system.pathForFile(".", system.ResourceDirectory)

which seems to correctly point the project dir at the same folder as main.lua and the packages dir at .cipr/packages relative to that.

@six8
Copy link
Owner

six8 commented Apr 16, 2012

Cool, if it works out can you send me a pull request for all your windows changes?

@dobesv
Copy link
Contributor Author

dobesv commented Apr 16, 2012

Sure.

Does clom.shell.execute() throw an exception if the command returns an error code? Or ... how should that work?

@six8
Copy link
Owner

six8 commented Apr 16, 2012

Throws an exception if the return code isn't 0.

On Sunday, April 15, 2012 at 11:43 PM, dobesv wrote:

Sure.

Does clom.shell.execute() throw an exception if the command returns an error code? Or ... how should that work?


Reply to this email directly or view it on GitHub:
#2 (comment)

Repository owner deleted a comment from chasedson Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants