sandman Posted May 5, 2007 Share Posted May 5, 2007 I just made an .sh file, here's the code:#!/bin/sh PATH=/home/autoit/Desktop; export PATH wine "C:\Program Files\AutoIt3\SciTE\SciTE.exe" exit 0I added chmod and ran this with ./SciTE.sh, and it finds the .sh file all right, but it says that 'wine' is an invalid command. I have checked a few times now and I am completely sure WINE is installed, because typing this in terminal works fine:wine "C:\Program Files\AutoIt3\SciTE\SciTE.exe"But for some reason it is unknown in the .sh file. I don't know, I'm a Linux n00b.. just got it a few days ago But anyway, does anyone have any idea what I am doing wrong here? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
SkinnyWhiteGuy Posted May 5, 2007 Share Posted May 5, 2007 On the wine line, try putting the path to the wine binary in front of wine. That should fix it. Link to comment Share on other sites More sharing options...
sandman Posted May 5, 2007 Author Share Posted May 5, 2007 (edited) On the wine line, try putting the path to the wine binary in front of wine. That should fix it.Ummm..Where's the path of the WINE binary? I've always just used 'wine'.Oh, wait, /bin/wine, right? Edited May 5, 2007 by sandman [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
SkinnyWhiteGuy Posted May 5, 2007 Share Posted May 5, 2007 Not too sure right now, but that sounds right. If it's not there, try to locate it (I always use "find <filename> / | grep <filename>" to help me locate files that want to hide from me). Link to comment Share on other sites More sharing options...
-Ultima- Posted May 5, 2007 Share Posted May 5, 2007 (edited) Er, isn't defining the PATH variable screwing with where the OS looks for executables (like wine)? Just don't bother setting the PATH variable, or cd to the directory first if you absolutely need to start SciTE in that directory. Edited May 5, 2007 by -Ultima- [ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ] Link to comment Share on other sites More sharing options...
SkinnyWhiteGuy Posted May 6, 2007 Share Posted May 6, 2007 Uh, no, not define an environment variable PATH, put in the complete line to the wine binary, e.g. "/usr/bin/wine" or wherever it might be instead of just "wine". Link to comment Share on other sites More sharing options...
-Ultima- Posted May 6, 2007 Share Posted May 6, 2007 Ehm... I was responding to the original script, and not your suggestion. I was saying exactly that -- the PATH variable shouldn't need to be touched in the script, and as long as you don't touch it, the shell should be able to figure out the path to wine on its own, even without specifying the path. [ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ] Link to comment Share on other sites More sharing options...
sandman Posted May 6, 2007 Author Share Posted May 6, 2007 Ehm... I was responding to the original script, and not your suggestion. I was saying exactly that -- the PATH variable shouldn't need to be touched in the script, and as long as you don't touch it, the shell should be able to figure out the path to wine on its own, even without specifying the path.Then why isn't it? [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
Locodarwin Posted May 6, 2007 Share Posted May 6, 2007 Then why isn't it?Because you're setting the PATH to where wine isn't. Listen to -Ultima-. The PATH environment variable tells the shell where to find executables. You don't need to specify it, and by doing so you're breaking it. Remove the PATH statement from your shell script.-S (Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now