Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds for other platforms? #28

Open
Mamotromico opened this issue Sep 27, 2016 · 148 comments
Open

Builds for other platforms? #28

Mamotromico opened this issue Sep 27, 2016 · 148 comments

Comments

@Mamotromico
Copy link

Is there any chance to see builds for Linux / OSX?

Or add more information about the project so we can try to build/compile for another targets, not sure. Mostly curious about it.

@Openarl
Copy link
Owner

Openarl commented Sep 28, 2016

In theory the program is mostly portable. The application logic is written in Lua, and all the libraries are portable. The tricky part is the Lua host, SimpleGraphic.dll, which is a custom environment written by me in C++ which contains a 2D renderer and input handling. In theory it should be fairly portable but I've never actually attempted to do so, as I don't use either Linux or OSX. However if someone else is willing to try I'll hook them up with the source code.

@Mamotromico
Copy link
Author

Honestly I'd be willing to try, unless the code use a lot of system specific calls it shouldn't be that challenging considering its C++.

Btw that makes me even more impressed. This thing is amazing, kudos on the work so far.

@Openarl
Copy link
Owner

Openarl commented Sep 28, 2016

Alright then. I'll pack the source code for the various components and send it to you, along with any information that you might need to port it. Not sure how long it'll take me to sort all that out; hopefully not too long.

@Mamotromico
Copy link
Author

No problem :D

@philroberts
Copy link

I am also interested in this - just tried the program out in a windows VM and it's awesome!

Why don't you want to publish the SimpleGraphic source? Just curious.

@berserkingyadis
Copy link

Since my primary working computer is Linux and could not get any offline planner(this and emmitts) to work, I would definetly help in porting this aswell!

Can you hook me up with the sources and info too?

@Openarl
Copy link
Owner

Openarl commented Mar 15, 2017

I could do that, but I should note that I'm seriously considering rewriting the native host program entirely, mostly likely against Qt or something similar. Aside from improving portability, it will also allow me to easily support Unicode (the lack of present support for which is causing quite a bit of grief!)
So, attempting a port of the current host may not be a wise choice. I don't know when I'll get the time to work on the rewrite of the host though, as I'm quite short on time currently (as most of my free time is spent playing the game!) If anyone is willing to assist with that, or perhaps attempt it on their own, then that would be a great help though...

@berserkingyadis
Copy link

Not sure what you mean with native host program. You mean porting everything to C++/Qt? Or just the graphics stuff?

I thought about compiling the .dll as a .so file that it runs on linux for starters..

@Openarl
Copy link
Owner

Openarl commented Mar 16, 2017

My first reply to this issue explained what the host program is (SimpleGraphic.dll); that's already written in C++, but uses a custom engine, which is what I would be rewriting. The Lua code is all portable though, at least in theory, and would require only minor changes to accommodate Unicode.

@philroberts
Copy link

I had Qt in mind when I commented here. How much effort do you estimate is needed for a Qt rewrite? I'd be keen to mess around but can't promise I'll actually get anywhere with it.

@Openarl
Copy link
Owner

Openarl commented Mar 16, 2017

I've never used Qt or any similar framework before, so I'm not too sure. Excluding the Lua interface code (which can be reused), the engine used in SimpleGraphic.dll is about 8000 lines of code; it's not really that complex, and I suspect Qt can handle most of it in some way or another. Aside from input handling and other low-level OS interaction, the Lua code really just needs access to a simple 2D renderer to render its UI; and I'm not sure how much work would be required to set that up.

@berserkingyadis
Copy link

Ah, I misunderstood you then. I have experience with C++/Qt and would like to help. Whatever is needed to make this program runnable on other platforms and more portable is fine for me.

@AlpacaRotorvator
Copy link

I have been putting off getting serious with Qt for some time now, if you're willing to develop the new host in the open then I'd be more than happy to try to contribute some work into it too.

@jbigalet
Copy link

I'd be happy to port SimpleGraphic to linux, I would love to have PoB available without having to reboot to windows everytime I feel like theory crafting something.
It seems to only use the windows api & opengl, so it should not be that hard to rewrite the windows api part to something like glfw to have a multi-platform engine.
Is it possible to get the source code?

@Rai4n
Copy link

Rai4n commented Jul 20, 2017

What is the current status of rewriting the SimpleGraphic Module?

@Openarl
Copy link
Owner

Openarl commented Jul 21, 2017

I'm hoping to get it done before 3.0 is released, but I haven't been able to start work on it yet, so I'm still unsure if I can manage to get it done in time.

@philroberts
Copy link

I've actually been doing a bit of work on this here and there. It's starting to come together: progress pics. Mouse input not working yet and I only got to the second screen by adding support for the escape key, so can't actually do anything further yet.

Maybe you could give me some tips on that Openarl? I'm calling launch:OnKeyDown and launch:OnKeyUp with key = "BUTTON" when the mouse is clicked/released, but nothing happens.

I've also had the same code running on linux to the same degree of success, for those not on OSX.

@Openarl
Copy link
Owner

Openarl commented Jul 22, 2017

Ah, nice! So you're using Qt? Did you get a copy of the source for the current version, or are you working from scratch? I suspect the latter, as the answer to the mouse click problem is easily found in there (the key name is "LEFTBUTTON"), so here's the latest version. I think you'll want to re-use the existing Lua interface code (ui_*), as you may have a hard time reproducing some of it.

@philroberts
Copy link

Yes it's in Qt. Yup I've just been reverse engineering it from the Lua code, that source will be a big help!

@Rai4n
Copy link

Rai4n commented Jul 22, 2017

Looks really nice, hope you can continue with the Qt version :) So we can use PoB on Linux :D

@ccomly
Copy link

ccomly commented Jul 28, 2017

noice

@berserkingyadis
Copy link

thanks for the effort, really looking forward to it!

@philroberts
Copy link

OK if anyone is foolhardy enough to try building it, my latest code is attached:
pobfrontend.zip.

There's a readme that I just wrote off the top of my head without actually checking that it's accurate. The code is awful. AWFUL. Proceed at your own risk.

That said, as far as I know everything works except for updating. If any brave souls do give it a go let me know of any problems you have building it or any bugs you find and I'll try to help/fix.

@lfxgroove
Copy link

lfxgroove commented Aug 2, 2017

@philroberts Hi, I gave it a try and managed to compile it and almooost run it, I got the following error when starting (running on archlinux if that matters):

lfxgroove@krattgata $ ../build/pobfrontend
PANIC: unprotected error in call to Lua API (../PathOfBuilding/Launch.lua:38: module 'xml' not found:
        no field package.preload['xml']
        no file './xml.lua'
        no file '/usr/share/luajit-2.0.5/xml.lua'
        no file '/usr/local/share/lua/5.1/xml.lua'
        no file '/usr/local/share/lua/5.1/xml/init.lua'
        no file '/usr/share/lua/5.1/xml.lua'
        no file '/usr/share/lua/5.1/xml/init.lua'
        no file './xml.so'
        no file '/usr/local/lib/lua/5.1/xml.so'
        no file '/usr/lib/lua/5.1/xml.so'
        no file '/usr/local/lib/lua/5.1/loadall.so')

I've tried running luarocks install xml but that didn't seem to help unfortunately, any idea of what might be missing? Thanks in advance and thanks for doing this! Will take a look at the code later and see if it might be able to help with something there :)

Edit: It seems I'm trying to run with lua 5.1 while I've installed the xml package for lua 5.3, will take a look at updating my packages and give it a go again!

Edit 2: Tried it but now it can't find LoadXMLFile instead, any idea which library i should be using to get it? It seems that it is not given by the runtime itself as far as i can tell at least. @Openarl do you have any idea what it might be?

@ccomly
Copy link

ccomly commented Aug 2, 2017

$ ./pobfrontend
module 'xml.LoadXMLFile' not found:
no field package.preload['xml.LoadXMLFile']
no file './xml/LoadXMLFile.lua'
no file '/usr/share/luajit-2.0.5/xml/LoadXMLFile.lua'
no file '/usr/local/share/lua/5.1/xml/LoadXMLFile.lua'
no file '/usr/local/share/lua/5.1/xml/LoadXMLFile/init.lua'
no file '/usr/share/lua/5.1/xml/LoadXMLFile.lua'
no file '/usr/share/lua/5.1/xml/LoadXMLFile/init.lua'
no file './xml/LoadXMLFile.so'
no file '/usr/local/lib/lua/5.1/xml/LoadXMLFile.so'
no file '/usr/lib/lua/5.1/xml/LoadXMLFile.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './xml.so'
no file '/usr/local/lib/lua/5.1/xml.so'
no file '/usr/lib/lua/5.1/xml.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
PANIC: unprotected error in call to Lua API (../PathOfBuilding/Launch.lua:39: attempt to call field 'LoadXMLFile' (a nil value))

Installed rocks:

luafilesystem
1.6.3-2 (installed) - /usr/lib/luarocks/rocks-5.1

lub
1.1.0-1 (installed) - /usr/lib/luarocks/rocks-5.1

xml
1.1.3-1 (installed) - /usr/lib/luarocks/rocks-5.1

looks similar to above

edit: i dont get it from what package is xml.so supposed to be coming from?

@philroberts
Copy link

Oh right my bad! There are three libs that come with PathOfBuilding that I hackishly copied into the base dir. If you look in runtime-win32.zip from the main PathOfBuilding repo you'll find a lua directory with xml.lua, base64.lua and sha1.lua. Copy those into your PathOfBuilding clone and try again. Sorry about that. I told you it was awful!

@philroberts
Copy link

philroberts commented Oct 3, 2019

I've just pushed updated code for the Qt PathOfBuilding driver here.
New things:

  • A half-decent README.md
  • Stubbed RenderInit so it doesn't need to be commented in the lua code
  • Reduced render calls significantly so should reduce CPU usage. Renders are basically triggered by input events + import/download finish events only now.

@ManWithBear
Copy link

@philroberts correct me if I'm wrong, but your pobfrontend is replacement / updated source code for SimpleGraphic.dll?
So I can build it on Mac and put inside PathOfBuilding folder to build it for Mac as well?

@philroberts
Copy link

@philroberts correct me if I'm wrong, but your pobfrontend is replacement / updated source code for SimpleGraphic.dll?
So I can build it on Mac and put inside PathOfBuilding folder to build it for Mac as well?

You're correct, it's a replacement for the executable. I have had it running on Mac, and there is some mac-specific advice in the build instructions. Some people had issues with retina display, and I think some fixes were posted here but I never took the time to incorporate them as I was unable to test. If you have any problems I can try to help.

@ManWithBear
Copy link

@philroberts sounds awesome! Have you tried to run it on iOS devices?
I'm right now in process of making PoB finally work on my Catalina. Would love to see it on iPad as well.

@ManWithBear
Copy link

@philroberts FYI, I was able successfully run PoB on my Catalina, yay :) Huge thanks.
I as well combined all steps in makefile

@philroberts
Copy link

Great work! No I haven't tried it on iOS.

@aspel
Copy link

aspel commented Dec 11, 2019

I have created a macOS bundle, can someone test it on Retina display?

https://github.com/aspel/pobfrontend/releases

@ManWithBear
Copy link

ManWithBear commented Dec 11, 2019

@aspel nice.
When I try to save build, it throw exception that folder is not exist / not writable.
Any ideas? Catalina

@aspel
Copy link

aspel commented Dec 11, 2019

@ManWithBear as temporary solution. Try replace in PathOfBuilding.app/Contents/MacOS/Modules/Main.lua

self.defaultBuildPath = self.userPath.."Builds/"

self.defaultBuildPath =  os.getenv("HOME").."Builds/"

@chaka-september
Copy link

chaka-september commented Dec 11, 2019

This looks great, it works fine on my 2014 Macbook pro retina screen. Somethings are a bit small and some don't fit in the frames, but overall it works.

I've noticed a weird issue where it's only showing the bottom left side on a 1080p second screen and I don't seem to be able to scroll it. Running Catalina 10.15.

I've uploaded some screenshots here: https://imgur.com/a/OkY0OJU

I just wanted to add, thanks for all the hard work this is really useful.

@jhovanic
Copy link

Hi,
I'd like to help with this as well because I like theorycrafting :)
Have a couple of questions:

  1. Is there a build of the tool already running for MacOS?
  2. Is there a reason you built it with C++ and Lua? Could it be possible to do it in electron?

Let me know if I can help with this

@ManWithBear
Copy link

ManWithBear commented Dec 12, 2019

@jhovanic

  1. You can get app from @aspel repo, or compile itself from mine

  2. Most likely Openarl have been most proficient with this languages.

  3. It possible to do in any technology / language as long as it Turing complete. But most likely noone want to rewrite it from zero. You can give it a try :)

@aspel
Copy link

aspel commented Dec 12, 2019

Finally, I have fixed resolution for Retina.
@ManWithBear @chaka-september could you please check?

@jhovanic
Copy link

@ManWithBear totally, we don't want to rewrite it but was wondering if we could reuse and replace some of the components to make it easier for people to contribute. If we have a working version then GREAT!!! :) can we make it part of the releases then?

@ManWithBear
Copy link

Unfortunately we cannot. We have no write access to this repo. BUT
@aspel @LocalIdentity can we make independent PoB organisation on GitHub and make PoB community driven?

@lucasberaldito
Copy link

Don't know if it helps the thread, but there's a version of Path of Building online, so if internet connection is not a issue give it a shot at: https://pob.party/

@jhovanic
Copy link

jhovanic commented Jan 7, 2020

@lucasberaldito thank you for this info, I was aiming at something like that!!!

@bernhardfritz
Copy link

bernhardfritz commented Jun 18, 2020

Path of Building for macOS and Linux: https://github.com/bernhardfritz/pobfrontend/releases

Credit goes to @aspel
I merely forked his repo and used community PoB instead of Openarl's.

keep an eye on PR aspel/pobfrontend#5

@Farazon
Copy link

Farazon commented Jun 18, 2020

hi @bernhardfritz thanks for getting it up to date. The builder itself works like a charm, but I noticed that some of the gems and items are not updated to the 3.11 versions - will this be added as well?

@bernhardfritz
Copy link

The items and gems you are referring to would need to be updated for https://github.com/PathOfBuildingCommunity/PathOfBuilding in order for them to also be included in pobfrontend. PathOfBuilding is a dependency of pobfrontend so to say. I suggest you raise an issue for the community pob, as it seems in active development: https://github.com/PathOfBuildingCommunity/PathOfBuilding/issues

@Farazon
Copy link

Farazon commented Jun 20, 2020

The main data has been updated for POB - how do I go about getting mine up to date? Would it require another forking?

@Farazon
Copy link

Farazon commented Jun 21, 2020

Is anyone able to update this with the latest version of PathOfBuilding? Much appreciated

@agaro1121
Copy link

agaro1121 commented Jun 24, 2020

@bernhardfritz thank you for the contribution.
I downloaded the binary but it seems to crash on opening.
Are there any known issues?

I tried this on Mac OSX Mojave 10.14.6

EDIT: I opened the runnable in my Mac with catalina. It works just fine. Thank you

@hsource
Copy link

hsource commented Jan 14, 2021

I've updated the latest version for 3.13. Here's the forum thread with details

@geocine
Copy link

geocine commented Jan 23, 2021

Don't know if it helps the thread, but there's a version of Path of Building online, so if internet connection is not a issue give it a shot at: https://pob.party/

How is this possible, interested to know tech behind this. I mean how did you convert it to web based so to speak?

@Farazon
Copy link

Farazon commented Jan 23, 2021 via email

@hsource
Copy link

hsource commented Jan 30, 2021

Hi Harry, Thanks for your effort in updating the PoB. Are you able to make it compatible with the 10.14 Mojave OSX version? Kind regards Stefan

I updated a version with an older binary and put it in the thread! It might work. I don't have a 10.14 Mac to test on unfortunately, so can't confirm

@MichalBunkowski
Copy link

Is it possible to make it work on Big Sur? I have MacBook Pro 2019 with macOS Big Sur 11.1

@Farazon
Copy link

Farazon commented Apr 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests