benjaminjackman / looty

Looty! A tool for Path of Exile that makes inventory searching fun!
GNU General Public License v2.0
61 stars 21 forks source link

Building on ubuntu 20.04 #49

Closed bjbeare closed 3 years ago

bjbeare commented 3 years ago

have you built looty on Ubuntu 20.04? I worked around a number of issues and then ran into an problem with bin/sbt still using http instead of https. Do you have a supported build solution for ubuntu 20.04?

I could build in a VM or on top of windows10 as an alternate. What would you suggest for the most trouble free development environment?

`[bjbeare@bjbeare-desktop looty]$ bin/sbt Using node v8 Getting org.scala-sbt sbt 0.13.6 ...

:: problems summary :: :::: WARNINGS module not found: org.scala-sbt#sbt;0.13.6

==== local: tried

  /home/bjbeare/.ivy2/local/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml

==== typesafe-ivy-releases: tried

  http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml

==== Maven Central: tried

  http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.pom

    ::::::::::::::::::::::::::::::::::::::::::::::

    ::          UNRESOLVED DEPENDENCIES         ::

    ::::::::::::::::::::::::::::::::::::::::::::::

    :: org.scala-sbt#sbt;0.13.6: not found

    ::::::::::::::::::::::::::::::::::::::::::::::

:::: ERRORS Server access Error: Connection timed out (Connection timed out) url=http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.6/ivys/ivy.xml

SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.6/sbt-0.13.6.pom

:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS unresolved dependency: org.scala-sbt#sbt;0.13.6: not found Error during sbt execution: Error retrieving required libraries (see /home/bjbeare/.sbt/boot/update.log for complete log) Error: Could not retrieve sbt 0.13.6 `

piotrszymaniec commented 3 years ago

I cannot help with linux, because I was building looty on win7 some time ago, and it was working fine for me. I used to work with Itellij IDEA, and my usual workflow would be:

  1. start sbt from sbt-launch-0.13.0.jar while being in looty directory (not in bin\ - thats important) - in my case i'd launch bin\sbt-win.cmd
  2. use command >clean to get rid of any old/or cached files in looty\looty\target\web\public\main\ directory
  3. make branch (or switch to created earlier) for development in git
  4. use command >compile
  5. do some changes
  6. use command >fullOptJS or ~fullOptJS if I wanted to develop and check changes reloading page in browser (you could also use fastOptJS and start looty with looty-dev.html - but i ran into some problem with it other day, so i was using fullOptJS from then on)
  7. load compiled browser plugin/addon from looty\looty\target\web\public\main\
  8. check my changes and commit to branch if im happy with my changes rinse and repeat I'm not sure if its optimal and what not, but it was ok for my little experiments. I hope you will solve your issues.

Btw author rarely shows up here, so if you have some direct questions to him, rather send an email.

bjbeare commented 3 years ago

Thanks. I'm trying with docker and an older version of ubuntu. If I get it working... I'll provide the Dockerfile.

piotrszymaniec commented 3 years ago

btw do you have some ideas you would like to implement in looty?

bjbeare commented 3 years ago

Yes. I play SSF from time to time. I would like to add functionality to search my stash and find good jewelry sets to maximize my resists. Later... i'd like to specify other constraints like maximize life or mana ... or specify which items are to be replaced from stash.

benjaminjackman commented 3 years ago

Hey Bruce, Looty is pretty old at this point, and I don't play POE anymore so I don't build it often.

When I do I build it on 18.04 I am using sbt version 0.13.0 which should be under the bin folder, also I am using java version 8 (newer versions probably won't work)

From the error It looks like maybe maven now requires https connections to download dependencies

I found this https://stackoverflow.com/questions/59764749/requests-to-http-repo1-maven-org-maven2-return-a-501-https-required-status-an but am not sure what i need to do change sbt to use it.

bjbeare commented 3 years ago

Thank you Ben. I appreciate the feedback. I'll look into what I need to do to update sbt.

benjaminjackman commented 3 years ago

Sure thing, I am trying on my side as well but i can't replicate that particular problem for whatever reason here.

bjbeare commented 3 years ago

bumping to a more recent version of sbt gets past that problem but the latest sbt runs into other errors. Yeah... it's the https issue for sure and the 0.13 version is ancient.

benjaminjackman commented 3 years ago

you can try to download the 0.13.6 version from here:

https://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.6/

and replace the sbt-launch-0.13.0.jar file in the bin folder with it, that one is new enough to use the https endpoints while still not so new as to break stuff (sbt was notoriously bad about breaking between releases back then)

edit: just download the jar file on that page if it wasn't clear

bjbeare commented 3 years ago

Looks like it worked. Not sure what this means. I'll have to read up on sbt.

[info] [SUCCESSFUL ] com.typesafe.play#twirl-parser_2.10;1.0.4!twirl-parser_2.10.jar (335ms) [info] downloading https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar ... [info] [SUCCESSFUL ] org.apache.commons#commons-lang3;3.1!commons-lang3.jar (153ms) [info] downloading https://repo1.maven.org/maven2/com/github/mdr/ascii-graphs_2.10/0.0.3/ascii-graphs_2.10-0.0.3.jar ... [info] [SUCCESSFUL ] com.github.mdr#ascii-graphs_2.10;0.0.3!ascii-graphs_2.10.jar (198ms) [info] Done updating. [info] Compiling 1 Scala source to /root/looty/project/target/scala-2.10/sbt-0.13/classes... [info] Set current project to root (in build file:/root/looty/)

Do I need do something to build a chrome (instead of firefox) version? Build once... run anywhere... so should just work, yes?

bjbeare commented 3 years ago

Ah... it occurred to me what the ">" prompt was about. lol. Success. Thank you.

on-8.1.16.v20140903.jar ... [info] [SUCCESSFUL ] org.eclipse.jetty#jetty-continuation;8.1.16.v20140903!jetty-continuation.jar (116ms) [info] Done updating. [info] LESS compiling on 8 source(s) [info] Compiling 71 Scala sources to /root/looty/looty/target/scala-2.11/classes... [info] 'compiler-interface' not yet compiled for Scala 2.11.5. Compiling... [info] Compilation completed in 7.797 s [info] Fast optimizing /root/looty/looty/target/web/public/main/looty-fastopt.js [success] Total time: 63 s, completed Jan 6, 2021 3:02:14 AM

piotrszymaniec commented 3 years ago

Do I need do something to build a chrome (instead of firefox) version? Build once... run anywhere... so should just work, yes?

I'd say that it runs mainly on chrome now, without issues (im using opera as matter of fact). In firefox I had to load it in debugging mode, which is not ideal for standard users - but for own usage as a dev its sufficient - if you insist on using firefox. Ben had problems with submitting latest ver of Looty to firefox for verification, so it ended up being removed from their plugin marketplace. While google were not making such problems and chrome is now target browser.

bjbeare commented 3 years ago

nah. i'm a chrome guy.

bjbeare commented 3 years ago

https://github.com/benjaminjackman/looty/pull/50