Author Topic: [App][Guide] soloEasy/AutoSolo--Setup solomining with a double-click on Windows!  (Read 25460 times)

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
Need suggestions for more programs like this to create! Currently I have one to help you create cgminer config and one to automate solo-mining. Anything else people would like to see? :D

~100 installs so far :)

Hello! In the spirit of cgEasy (http://forum.litecoin.net/index.php/topic,36.0.html) I have created a program that doesn't just generate a simple miner config for you, but instead downloads the latest version of cgminer and litecoin, launches litecoin, creates a configuration file for litecoin to support solomining, uses a modified version of cgEasy to setup your solo-mining configuration, and leaves you with two .bat files, one to start the litecoin client, and one to start the miner.

---------------------------------------------------------------------------------------------------------------------------------------------------

Disclaimer: As you see with most open-source, free programs, I am not at all responsible for ANY damages incurred from the use of this software! The only damage I can really see this thing doing is writing over your litecoin.conf (which shouldn't be an issue at all unless you are using advanced features). However, if anything happens, I am sorry and would be happy to try to help you out with it, however, by downloading and using this software AutoSolo.jar (& friends), you agree to not hold me responsible for anything this program might possibly do. The main reason I put this disclaimer is so that if someone accuses my program of doing something (even though it more than likely didn't) I still can't be blamed. I know my program is safe.

This program is provided as-is, with no warranty, implied or otherwise.

 

---------------------------------------------------------------------------------------------------------------------------------------------------

All downloads:
Compiled version (ready to run, just download, put in it's own folder, and double-click!): http://www.mediafire.com/download.php?7ilfq3p1972yvea
Source code: http://www.mediafire.com/download.php?eynf360r7tnbcui

---------------------------------------------------------------------------------------------------------------------------------------------------

Video Tutorial: http://www.youtube.com/watch?v=h_qJd9btOac

What you need:
--~5-10 minutes of time
--A GPU worth mining on (ATi, preferably desktop, but mobile ones will work too)
--What kind of gpu you have (ex. 5970)
--Internet connection (this program will download around 20MB, but blockchain is pretty large currently)
--Windows (Will run on linux, but won't do what it's intended to do, as it creates .bat files (which linux doesn't use), edits your AppData/Roaming directory (which linux doesn't have), and executes .exe files (which linux doesn't support (alright, wine, sure....)). Please DON'T run this on linux, it won't do anything for you.
--Java

What you DON'T need (that you would normally need to set solo mining up)
--More than 5-10 minutes
--Knowledge of shaders for your GPU (my program looks up the shader count, all you enter is what card you have (like 5970, or 7950)
--Knowledge about creating .conf files that work
--Basic understanding of ports
--Basic understanding of networking (localhost, specifically)
--Ability to create .bat files or use command line to launch litecoin
--Knowledge of cgminer flags
--Knowledge of clock defaults for your card (if you choose to OC with my software, it provides the default engine and core clocks for your card as found on Wikipedia)

If you want to read the source code before you run this program:
http://www.mediafire.com/download.php?eynf360r7tnbcui
Note: this program downloads other programs I made, as well as litecoin and cgminer from my server. Looking through the code you can find the links to all of these files. The source code to all of the downloaded programs are in the above link. The files (such as cgminer.zip and litecoin.zip) that it downloads are NOT included in the source folder above. If you want to download those too to check them out, just follow the URLs in the source code using a web browser.

---------------------------------------------------------------------------------------------------------------------------------------------------
It's this easy:
1.) Download AutoSolo.jar (http://www.mediafire.com/?7ilfq3p1972yvea)
2.) Place AutoSolo.jar in it's own folder (can be named whatever and can be wherever) (Should look like this:)



3.) Double-click AutoSolo.jar and type "I gree" (without the quotes) in the box that pops up, and press enter. (Should look like this when it comes up:)



4.) Wait for the program to download and extract litecoin and cgminer. In the folder, you will see a lot of files appearing and disappearing, this is normal.

5.) When this comes up:


You can close the command line box (the one with a black background and white text).

6.) Click on the cgEasy window, it will guide you through configuration. If you have any questions pertaining to the use of cgEasy, consult http://forum.litecoin.net/index.php/topic,36.0.html . The background and font colors mentioned pertain to the cgminer mining window.
When you are done filling it out, it should look like this:


Press enter, and that window will close.

7.) Your folder that your originally had AutoSolo.jar in should now look like this:



If it does, congrats, you now have litecoin installed and configured to run solo mining, and cgminer ready to mine! After installation litecoin should already be open. If it is not, double click "launchLitecoin.bat". If litecoin is already running, this script will kill the process and start litecoin back up in server/solo mode.

You are now ready to mine! Double click on "launchMiner.bat" and cgminer will start up. A vanilla version of cgEasy.jar is located in your cgminer folder, so in the future if you want to generate more configs, just go into that cgminer you see in the above picture, and double-click cgEasy.jar.

OPTIONAL: There is another version of cgEasy there, the one for solo-mining configuration. You can delete that. If you want to create more configs using the cgEasy.jar in cgminer, double click, and follow the instructions. For server, put "localhost:9332", for worker put "username" and for password put "password". The launchMiner.bat file launches the config in cgminer called launch.bat. if you create other configs using cgEasy.jar, instead of clicking on "launchMiner.bat", go into your cgminer folder and double-click on the launch configuration you want to use.

---------------------------------------------------------------------------------------------------------------------------------------------------

FAQ:
1.) Why do you have it download cgminer and litecoin from your server instead of from the respective developer's servers?
Very good question. There were several reasons for this decision, although in future versions I may switch it.
Reason 1: If cgminer or litecoin updates come out that don't affect core things my program relies on (litecoin-qt.exe being called that, cgminer config not accepting current flags), I can update the files on my server, and when someone uses the client I provide, it will download the latest version of both programs. If I did a direct link to cgminer 2.6.2 as a download from ckolivas, then when new versions of the program come out I would have to release a new client version, making it harder for both me and the average end-user.
Reason 2: This one is sorta petty, but I wanted the folders to extract to litecoin and cgminer, not their full folder names, and having them extract to that instead of having to extract them, then move them over to a new folder, and add a bunch more stuff to delete, these .zip files extract exactly how I want.
Reason 3: If someone decides to spam my application and download a ton of copies of stuff, it will take down my website, not more important websites/links such as those direct to cgminer and litecoin.

2.) What exactly does your program do, step-by-step?
Well...
1.) Download soloEasy.jar
2.) Create a .bat file to launch soloEasy.jar
3.) soloEasy.jar downloads and extracts litecoin.zip and cgminer.zip from my webserver
4.) soloEasy.jar downloads some other misc. things (such as a jar for cleaning up and a modified version of cgEasy)
5.) soloEasy.jar launches cgEasy and creates .bat files for launching cgEasy's output configuration and litecoin in the future
6.) cgEasy helps the user to create a cgminer config
7.) soloEasy.jar launches the cleanup jar and quits
8.) The cleanup jar cleans up files such as AutoSolo.jar, soloEasy.jar, misc. bat files and more, including itself

(Some of the above may be slightly out of order, it's been a long day, but it's pretty darn close)

3.) Why did you make this software?
I made it for two main reasons:
1.) Solo-mining is important for the integrity of the litecoin network at this point in time, so making it easier to do gets more people to do it and gets the network to be more secure
2.) I learned quite a lot in making this program, knowledge that will be very useful in the future

4.) Who is this software geared towards?
Being that this software doesn't support advanced features, this program is geared towards people who don't know how to setup litecoin solomining and how to setup cgminer. However, it could be useful still to those who know how to set it up but don't want advanced features, as it is quite fast.

5.) How did you make the jar file delete itself?
The cleanup jar file creates a .bat file to delete cleanup.jar, then launches it, then cleanup.jar closes, the bat file deletes cleanup.jar and itself.

6.) The source code is confusing to recompile...
Sorry about that. Since it grabs compiled versions of the code inside of that zip you downloaded, you would essentially have to either re-route packets on your network (hard), change the download links (to something identical, or change how the program handles the files), or change the program to use local copies.

I don't really expect people to recompile my program for these reasons...(although I'm totally fine if they want to put in that kind of effort). I much more suggest, if you don't trust my program, decompiling all the linked jars (download them from my website, following the source code), and downloading cgminer.zip and litecoin.zip from my servers, and doing checksums of the contents against the true version over trying to recompile and reroute everything. But then again if you don't trust my program, your probably don't trust my instructions on how to trust my program :P.

7.) How can I be sure your program doesn't have anything malicious in it?
My best suggestion is to decompile the code (or look at the source code).

8.) Is there a linux version?
Not currently. I have personally never done litecoin mining on linux, so don't really plan on making a version for this, especially considering linux's idiosyncratic behavior with active directory...

9.) Will this work if I already have litecoin installed?
Yes! I always recommend backing up your wallet.dat file just in case, but my program won't install litecoin if it's already installed. It will download litecoin and use that downloaded version of the client, but the only thing it will change in your Litecoin folder in AppData/Roaming is your config file named litecoin.conf. However, if something does screw up, I'm not responsible for any damages the do, so backup your wallet.dat just in case :).

10.) Does your program install anything else aside from litecoin and downloading cgminer?
If by "install" you mean "put on the local hard drive", then it does "install" some other files, namely .bat files, and some other jar files I created to help the program along (such as clean up, or create cgminer configs). These files are, though, all deleted (aside from the 2 end .bat files) during the course of my program.

11.) Is there any advantage to setting up solo mining myself instead of using your application?
If you are an advanced user then yes, there's more advanced configuration which my program doesn't do which some people may find useful.

12.) What if I want to mine to this computer from multiple other computers on my network?
To do this, you will need to edit your litecoin.conf file (located in your Litecoin folder in AppData/Roaming). You will need to add rpcallowip=192.168.0.* or 192.168.*.* (depending on if your network has multiple layers or not).

13.) Can I redistribute your program?
Certainly! You are free to do just about anything with this software except:
1.) Copyright it
2.) Make it do something malicious
3.) Use any of my code in anything malicious

If this program helped you and you would like to donate: Lc4voQEwLviTWexckVwe8YRf2qB6JcD5N4
« Last Edit: August 23, 2012, 11:17:50 PM by vorksholk »

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
<Reserved>

Offline Garr255

  • Jr. Member
  • **
  • Posts: 72
    • Cognitive Mining
Good work, I'll try it out now. Keep things like these coming!

Edit: you have your links backwards :P

Edit:

After typing "I agree" the first time, a command prompt shortly popped up and generated "launch.bat" consisting of
Code: [Select]
color 02
java -jar soloEasy.jar
exit

The second time the process continued all the way through.

Also in some places where the guide refers to "*.jar" it actually means "*.bat"
« Last Edit: August 05, 2012, 04:31:04 AM by Garr255 »
Get some! http://dispenser.bitbank.me/ | Invest! http://cognitivemining.com/
First they ignore you, then they laugh at you, then they fight you, then you win.

Offline Garr255

  • Jr. Member
  • **
  • Posts: 72
    • Cognitive Mining
Also, in your "launch litecoin" bat that looks like this:

Code: [Select]
cd litecoin
taskkill /F /IM litecoin-qt.exe
ECHO YOU CAN CLOSE THIS WINDOW
litecoin-qt.exe -server

It should be this:

Code: [Select]
cd litecoin
taskkill /F /IM litecoin-qt.exe
@echo YOU CAN CLOSE THIS WINDOW
litecoin-qt.exe -server

Because capital echo doesn't work, and showing the echo command and the echo is redundant.

or you could add the line
 @title YOU CAN CLOSE THIS WINDOW
« Last Edit: August 05, 2012, 04:36:16 AM by Garr255 »
Get some! http://dispenser.bitbank.me/ | Invest! http://cognitivemining.com/
First they ignore you, then they laugh at you, then they fight you, then you win.

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
Good work, I'll try it out now. Keep things like these coming!

Edit: you have your links backwards :P

Edit:

After typing "I agree" the first time, a command prompt shortly popped up and generated "launch.bat" consisting of
Code: [Select]
color 02
java -jar soloEasy.jar
exit

The second time the process continued all the way through.

Also in some places where the guide refers to "*.jar" it actually means "*.bat"
Good work, I'll try it out now. Keep things like these coming!

Edit: you have your links backwards :P

Edit:

After typing "I agree" the first time, a command prompt shortly popped up and generated "launch.bat" consisting of
Code: [Select]
color 02
java -jar soloEasy.jar
exit

The second time the process continued all the way through.

Also in some places where the guide refers to "*.jar" it actually means "*.bat"

Wow, thanks for the catches! Edited the post to reflect the CORRECT links (can't believe I screwed that one up!). Any idea why it did that weird disappearing .bat thing the first time? That's strange, I tested like 20 times and it didn't happen :( What windows version are you on?

As well, the echo seemed to work on my end, but I'll update it to what you said :)

I'll look into the .jar/.bat confusion tomorrow :)

EDIT: The update for changing echo settings has been pushed to the server! Thanks!

Edit: Also couldn't find where you were talking about the .jar/.bat confusion, could you please point them out to me? Thanks :)
« Last Edit: August 05, 2012, 04:55:32 AM by vorksholk »

Offline Garr255

  • Jr. Member
  • **
  • Posts: 72
    • Cognitive Mining
Also couldn't find where you were talking about the .jar/.bat confusion, could you please point them out to me? Thanks :)

It is toward the end of the program, where its telling you how to launch either program.
Get some! http://dispenser.bitbank.me/ | Invest! http://cognitivemining.com/
First they ignore you, then they laugh at you, then they fight you, then you win.

SupaDupaJenkins

  • Guest
Mined a block pretty fast , this made it super easy to setup thankyou! :D

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
It is toward the end of the program, where its telling you how to launch either program.

Fixed it, thanks! Originally I planned to have two .jar files at the end that launched either program, but .bat files turned out to be a better idea. Thanks!

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
Updated OP, added video tutorial:

http://www.youtube.com/watch?v=h_qJd9btOac

Offline xorred

  • Newbie
  • *
  • Posts: 11
when running the miner, it errors out with "No suitable long-poll found for pool http://localhost:9332"
« Last Edit: August 06, 2012, 01:47:36 PM by xorred »

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
when running the miner, it errors out with "No suitable long-poll found for pool http://localhost:9332"

Yeah, when solo mining you don't need longpoll support, if you leave cgminer running you will see that it updates when it gets a new block :)

Offline xorred

  • Newbie
  • *
  • Posts: 11
you missed the part "errors out". The application dies "windows is trying to find a solution to the problem". etc

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
you missed the part "errors out". The application dies "windows is trying to find a solution to the problem". etc

Oh. Did my program run okay, and the issue is with starting cgminer, or did my program crash? What windows version are you using?

Offline xorred

  • Newbie
  • *
  • Posts: 11
Win7 x64. It errors out when trying to run cgminer.

Offline vorksholk

  • Jr. Member
  • **
  • Posts: 70
Would you mine copy+pasting the contents of launch.bat from your cgminer folder?