Page 1 of 14 1 2 3 11 ... LastLast
Results 1 to 10 of 131

Thread: Building from the SVN?

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    9

    Default Building from the SVN?

    Okay, I might be a total idiot here, but how would I go about downloading the latest KoLmafia code from the SVN and building it? I have the JDK and basic computer skills, although no java knowledge. Thanks![br]Posted on: August 24, 2006, 04:56:28 PM[hr]I figured it out! Ahh, that feels good. Anyway, for other aspiring devel noobs like myself, here's a quick intro on what to do running under WinXP/2k. If I made any mistakes, feel free to correct me.

    First, grab a copy of the following software:
    Apache Ant (http://ant.apache.org/bindownload.cgi)
    SVN Client (Windows: https://subversion.apache.org/)
    JDK 1.4 or later (1.5.0 is the latest) (http://java.sun.com/ , you can find it)

    Next, find a directory where you want the builds to go. SVN will create a subdirectory. Open command prompt ("cmd" for XP/2k users) and type:
    svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia

    Once it finishes, go to the subdirectory and type:
    ant

    Then look under the dist folder for the .jar file.

    Note: Ant can be a bit tricky to install. There's a guide at the ant website though. If you're having problems with that step, post here and I'll explain more in detail.

    EDIT: Edited address for Java and made it clicky -Daychilde
    Edited to update to the correct url for svn, the previous one quit working. -efilnikufecin
    Last edited by Bale; 03-25-2017 at 07:26 PM.

  2. #2
    Senior Member
    Join Date
    Mar 2006
    Posts
    729

    Default Re: Building from the SVN?

    [quote author=bluestars link=topic=374.msg2036#msg2036 date=1156461865]

    JDK 1.4 or later (1.5.0 is the latest) (sun.java.com, you can find it)

    [/quote]

    It appears to actually be java.sun.com

  3. #3
    Senior Member
    Join Date
    Mar 2006
    Posts
    729

    Default Re: Building from the SVN?

    double posting here, but look how old that previous post is.

    I moved this topic here, and set it sticky so that it could easily be found for future reference. I'm sure everyone can see why.

    [blue]( just so you know, it's not double-posting if it's been more than 24 hours... also, now that I have the merge-double-post mod in place, unless a glitch happens upon posting (happens upon rare occasion), nobody *can* double-post anymore -Daychilde )[/blue]

  4. #4
    Junior Member
    Join Date
    Dec 2006
    Posts
    5

    Default Re: Building from the SVN?

    [quote author=bluestars]Open command prompt ("cmd" for XP/2k users) and type:
    svn co https://svn.sourceforge.net/svnroot/kolmafia kolmafia

    Once it finishes, go to the subdirectory and type:
    ant
    [/quote]

    I have a batch file made called update.bat.. it goes a little something like this:
    Code:
    svn co https://kolmafia.svn.sourceforge.net/svnroot/kolmafia kolmafia
    
    cd kolmafia
    
    ant
    my snv co line is slightly different.. it seems to work for me, does it matter?

  5. #5
    Developer
    Join Date
    Mar 2006
    Posts
    1,367

    Default Re: Building from the SVN?

    Technically, no, but kolmafia.svn.sourceforge.net is the URL that Sourceforge tells us we should use.

    Once you've checked out KoLmafia once, you can change your update.bat file to say something like "cd kolmafia" followed by "svn update". A clean checkout can help if you're having some weird problems, but update is recommended to save time/bandwidth.

  6. #6
    Senior Member
    Join Date
    Sep 2006
    Posts
    329

    Default Re: Building from the SVN?

    I don't know anything about ant, but was able to build a jar file using the instructions above. So first of all, thanks for that. Now, I'd like to go one step further and build a MacOS X application and .dmg file. Can someone please explain how to do that? As I say, I know nothing about ant, but I looked at the build.xml file and didn't see anything there that looked promising, but maybe I just missed it. I don't actually know that much about building MacOS X applications, either, so I don't know if all I need is the proper build.xml "descriptions" or if some other process would be needed.

    Thanks, as they say, in advance, for any help anyone can provide with this.

  7. #7
    Developer
    Join Date
    Mar 2006
    Posts
    1,367

    Default Re: Building from the SVN?

    If all you need is the application bundle:

    • Load up JAR Bundler, located in "/Developer/Applications/Java Tools"
    • Select the KoLmafia.jar generated in a build
    • Drag and drop the "limeglass.icns" file in the "lib" folder into the icon section
    • Make sure the Java runtime compatibility is 1.4+
    • Add a key/value pair, with "app.name" being the key, and anything you want being the value.
    • Generate the application bundle


    [br][br]If you actually need the DMG for one reason or another:

    • Create a "KoLmafia-x.x" folder
    • Inside the "KoLmafia-x.x" folder, create a "KoLmafia" folder
    • Also inside the "KoLmafia-x.x" folder, create a symbolic link to "/Applications"
    • Load up JAR Bundler, located in "/Developer/Applications/Java Tools"
    • Select the KoLmafia.jar generated in a build
    • Drag and drop the "limeglass.icns" file in the "lib" folder into the icon section
    • Make sure the Java runtime compatibility is 1.4+
    • Generate the application bundle inside of the "KoLmafia" folder created earlier
    • Drag and drop the "KoLmafia-x.x" folder onto Disk Utility
    • Save the .dmg file where it'll be easy to access

  8. #8

    Default Re: Building from the SVN?

    I use Windows XP and sometimes build from the SVN to get the latest fixes/updates.

    I noticed that the build-with-ant process ends up creating a .jar file, whereas the "official" versioned releases are .exe .

    Are the advantages to using a compiled .exe instead of a .jar (which I presume is intrepreted) significant? I'm sure the "performance" of the .exe is much better, but given that practically everything you want to do with KOLmafia requires an external-round-trip response from the KOL server, I suspect that the performance difference may not be noticeable in practical use.

    But if the advantages are significant, could someone give some hints as to how to build the exe? I guess it's analogous to the Mac example above.

    Thanks a bunch,
    -TH3Y

  9. #9
    Developer
    Join Date
    Mar 2006
    Posts
    1,367

    Default Re: Building from the SVN?

    [quote author=th3y link=topic=374.msg5165#msg5165 date=1184861813]
    Are the advantages to using a compiled .exe instead of a .jar (which I presume is intrepreted) significant? I'm sure the "performance" of the .exe is much better, but given that practically everything you want to do with KOLmafia requires an external-round-trip response from the KOL server, I suspect that the performance difference may not be noticeable in practical use.
    [/quote]

    The EXE simply asks Java to run the JAR wrapped inside it. In other words ... if you're interested in speed, you're better off with the JAR.

  10. #10
    Junior Member
    Join Date
    Dec 2006
    Posts
    5

    Default Re: Building from the SVN?

    I hadn't been paying 100% attention for awhile, I used to check the svn revisions at the following link before I updated: http://svn.sourceforge.net/viewvc/kolmafia?view=rev

    Now the link doesn't work for me.. Where do I go to view the latest updates? I tried browsing to the SVN but it seemed fairly foreign to me.

Similar Threads

  1. building kolMafia
    By capitol in forum Community Support
    Replies: 18
    Last Post: 06-27-2012, 07:56 PM
  2. 10605: Provide GUI for building Simple deeds.
    By RSS Bot in forum Latest SVN Changes
    Replies: 0
    Last Post: 02-24-2012, 05:50 PM
  3. Bug Macro building doesn't check for Funkslinging
    By Yvain in forum Bug Reports
    Replies: 9
    Last Post: 09-15-2010, 10:29 AM
  4. Need help building/making script work.
    By hippymon in forum Scripting Discussion
    Replies: 3
    Last Post: 06-12-2007, 02:46 AM
  5. MOVED: Building from the SVN?
    By efilnikufecin in forum Community Support
    Replies: 0
    Last Post: 01-20-2007, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •