SCAR for linux?
botmaster
2007-04-30 18:41:36
Is it possible to compile SCAR for the linux kernel? It shouldn't be too hard. All that really needs to be potentially (re)done is making SCAR access your window manager's API.
I think it would really help some people (like me) if it were possible to achieve linux binaries for x86 (most common architecture). The only reason I still use a dual partition is because of SCAR. Most of SCAR works with WINE windows emulator, but it can't use the crosshair or any colorfinding functions.
And no, I'm not asking for SCAR to be made open source - all I'm asking for is linux binaries.
ruler
2007-04-30 18:44:49
compile SCAR for the linux kernel?
wont be happening, many many reasons.
go out and buy windows if you want to use scar.
botmaster
2007-04-30 18:53:00
Don't need to buy it, already have it :D.
BTW, for what reasons? Too little people using it or because it's just too hard?
ruler
2007-05-01 02:04:48
All the GUI Objects, i don't know what library scar uses but does a alternative exist for linux?
All the window selecting, event sending, image conversion, is made for windows api.
botmaster
2007-05-01 06:47:59
Oh crap… you've got a point there, it would require rewriting the entire SCAR library into GTK+ compliant code or to adapt it to specific window managers. Hmm… well, I guess the only option I have left then is coding my own 'linux' SCAR. Will take forever though and prolly won't be functional for everything.
ruler
2007-05-01 18:57:35
From: botmaster
Oh crap… you've got a point there, it would require rewriting the entire SCAR library into GTK+ compliant code or to adapt it to specific window managers. Hmm… well, I guess the only option I have left then is coding my own 'linux' SCAR. Will take forever though and prolly won't be functional for everything.
makes no sense to make a new-scar when other projects already exist.
Freddy1990
2007-05-02 11:20:34
From: ruler
makes no sense to make a new-scar when other projects already exist.
Exactly…
And besides, botmaster, if you haven't noticed, I've said about a few hundreds of times that I'm going to build a linux version of SCAR, but you have to be PATIENT, it's not something that's going to happen over night.
NxTitle
2007-06-21 14:45:03
well, I've been attempting to make a SCAR for linux for a couple weeks now, using Xlib and GTK+ (or QT, if I change my mind).
So far i have figured out how to move and click the mouse, press keyboard keys, and I'm trying to figure out how to convert Delphi/Pascal colours to RGB and CMYK colours.
But these are the main problems I am running into:
1. Crosshair. I haven't found a way to simply drag a crosshair onto the runescape client. Since X and Windows work differently, there is no way to differentiate between the java applet and the rest of Mozilla Firefox, or Konqueror, or whatever one decides to use.
The only way I can think of to find a runescape client is to take a red box or something, and completely cover the client perfectly. Or even just so it fits with the top-left corner. But if this were ported to linux, the crosshair idea would not work.
2. Finding Colours. As far as I can tell, Xlib has no way to find a pixel colour on the screen. I'm currently looking at other libraries (GTK, QT) to see if maybe they have the functionality, but so far I'm out of luck. The only way, so far, that i can see doing this is if I were to repeatedly take a screenshot of part of the screen, then working from there, but that would hog the CPU and Memory too much for some computers.
I could probably make a program that loads the runescape client with nothing else around it, then there would be no need for a crosshair or dragging a box somewhere, as it would be much easier to find.
That's all I have so far… Freddy1990 would probably do a better job with this than i would, though…
Markus
2007-06-21 14:58:10
From: Nontitle
1. Crosshair. I haven't found a way to simply drag a crosshair onto the runescape client. Since X and Windows work differently, there is no way to differentiate between the java applet and the rest of Mozilla Firefox, or Konqueror, or whatever one decides to use.
The only way I can think of to find a runescape client is to take a red box or something, and completely cover the client perfectly. Or even just so it fits with the top-left corner. But if this were ported to linux, the crosshair idea would not work.
The crosshair is the only thing stopping SCAR from functioning on Linux, all other stuff works with Wine, the crosshair only works in windows created by Wine, not in external windows. Java doesn't work correctly in Wine (version 0.9.33, switched back to Windows), so using a windows client to crosshair isn't an option.
Maybe a special client can do the trick. From what I know, in Wine windows apps can run Linux apps. If we create a Wine/Windows client and link it with the Linux Java we can have a working Scar on Linux.
botmaster
2007-06-21 16:05:12
Hmm… About the pixel arrays, what about just simply redrawing the screen on a "virtual canvas", which would be the area defined by the crosshair. Its "the hard solution". Maybe its possible to do this with a mix of SDL for drawing functions, GTK+ as SCAR window elements etc., and X11 for the interaction with the window system. Sure, it might cause lag (a lot, lol :D), but for me it doesn't really matter as I don't run a lot of resource intensive scripts.
Also, I've encountered numerous memory access violations when using SCAR's menus under WINE causing an annoying WINE popup and sometimes memory corruption of SCAR. The only reason I still use Windows is because of these minor WINE troubles. Gah! :(
I don't really see this as a problem of scar, much more as a problem of WINE for not yet being able to replicate the Windows screen drawing functions. *whines about WINE*
Another possible solution:
Even so, it would be nice if Freddy1990 (or Kaitnieks even :p) released the code to TRUSTED people that could add an abstraction layer for Linux to the code and remove unnecessary windows components. This means, that there is a sorta "inbuilt" WINE inside SCAR. Sadly, I don't have the necessary experience in C, C++ or Delphi to do this (I'm a total noob). :rolleyes:
EDIT:
On a sidenote, running SCAR on Linux has the side effect of enabling the user to run more than ONE scar session at a time, with multiple mouses, multiple desktops, etc. This means that resource hogging virtual machines are a piece of the past. This is because Linux was developed as a multiuser environment. Running more users at once = more SCAR's open. Now the only problem left is figuring out how :p.
NxTitle
2007-06-21 18:55:28
Well, wine has come quite a long way from when it was first started, you would be surprised. But when I use SCAR 3.06, i would try starting the script (Wizzup's Essence Miner, leetest of them all :p ), and it would just close. The error was something about freeing an X pixmap. But what I was hoping to do was have SCAR scripts work natively in linux. There are two problems, though: 1, is that the source is closed, so that makes it harder to port. 2, is that it's written in delphi, and there's no delphi for linux. (there's Kylix, but it's just a piece of crap) So I'm going to use C++ and start from scratch.
I like your idea of taking advantage of the multiple sessions. it would be much more efficient using 20 sessions than using 20 "Windows-XP's-Inside-It's-Own-Virtual-Machine"s. The only problem I'd have with that is with runescape itself, not letting you have more than one client open. It's not impossible, though. I remember using a program called XClient that allowed you to dual login.
I also found ways in linux to get colors in pixels, and partial screenshots, so I'm done researching and I'm now actually starting on this project. I'm just not sure what type of licence to put this under. I want to make this open-source, but since SCAR isn't, I would think that would make too many problems.
From: markus
The crosshair is the only thing stopping SCAR from functioning on Linux, all other stuff works with Wine, the crosshair only works in windows created by Wine, not in external windows. Java doesn't work correctly in Wine (version 0.9.33, switched back to Windows), so using a windows client to crosshair isn't an option.
Maybe a special client can do the trick. From what I know, in Wine windows apps can run Linux apps. If we create a Wine/Windows client and link it with the Linux Java we can have a working Scar on Linux.
that's exactly what i was thinkin. Ive got it running on Debian and I'm going to try a bunch of stuff, like using a windows based runescape client or even using wine to run Microsoft Java. Im gonna try everything i can get to get it working, and if i do ill make sure everyone knows how.
oh yeah, and good ideas with multiple users and session. keep up the good work everyone!
NxTitle
2007-06-28 14:48:37
yes, speaking of which…
Before, i said the multiple sessions would work if there was a way for multiple runescape logins, and I found out how to, very easily.
when you log in to runescape, at the page that asks for high or low detail, go to the bottom and choose the unsigned client. You can do this for as many times as you want, as long as your computer is fast enough to do so.
n3ss3s
2007-07-06 12:43:03
From: Freddy1990
Exactly…
And besides, botmaster, if you haven't noticed, I've said about a few hundreds of times that I'm going to build a linux version of SCAR, but you have to be PATIENT, it's not something that's going to happen over night.
Freddy do not get pissed , someone else has said this before when talking about what it takes to get you encrypt and obf.
"give freddy some milk and chocolate chip cookies and he'll do it for free"
Jk,Jk
freyyr
2007-07-14 21:17:03
From: Nontitle
Well, wine has come quite a long way from when it was first started, you would be surprised. But when I use SCAR 3.06, i would try starting the script (Wizzup's Essence Miner, leetest of them all :p ), and it would just close. The error was something about freeing an X pixmap. But what I was hoping to do was have SCAR scripts work natively in linux. There are two problems, though: 1, is that the source is closed, so that makes it harder to port. 2, is that it's written in delphi, and there's no delphi for linux. (there's Kylix, but it's just a piece of crap) So I'm going to use C++ and start from scratch.
I like your idea of taking advantage of the multiple sessions. it would be much more efficient using 20 sessions than using 20 "Windows-XP's-Inside-It's-Own-Virtual-Machine"s. The only problem I'd have with that is with runescape itself, not letting you have more than one client open. It's not impossible, though. I remember using a program called XClient that allowed you to dual login.
I also found ways in linux to get colors in pixels, and partial screenshots, so I'm done researching and I'm now actually starting on this project. I'm just not sure what type of licence to put this under. I want to make this open-source, but since SCAR isn't, I would think that would make too many problems.
Don't give up too quickly on Object Pascal on Linux. The
Lazarus Project has a pretty complete IDE for development. I've never used it, but I think that the syntax is slightly different from Delphi. Might still be worth a look, though.