Orx - Portable Game Engine
Welcome, Guest
Please Login or Register.    Lost Password?
Scroll and Config Code Questions
(1 viewing) 1 Guest
Go to bottom
TOPIC: Scroll and Config Code Questions
#8694
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
Aside from maybe SVG I can't really think of anything.

I've got LiquidFun building now, after a huge paradigm shift from autoconfig to cmake, and after having some fun with the combination of -Werror and -fPIC breaking the build. I've noticed there are two libraries, a regular and a debug. Did you have to manually append the d to the debug library, or did it build like that automatically? I assume not to worry about building freeglut?
 
Logged Logged
  The administrator has disabled public write access.
#8695
iarwain
Administrator
Posts: 3108
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Scroll and Config Code Questions 1 Month ago Karma: 71
SVG could be interesting, I've used nanoSVG in the past but I could probably integrate it to orx at some point.

Regarding LiquidFun, I don't remember if I had to modify the project to have the -d suffix or if it came like that, sorry. And yes, no need to build the tests and/or freeglut.
 
Logged Logged
 
Want to follow orx's development? Go subscribe to the orx-dev group at: https://groups.google.com/forum/?fromgroups#!forum/orx-dev
  The administrator has disabled public write access.
#8696
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
So I'm on the last dependency now, openal. When configuring in cmake it's telling me it cannot find PortAudio, PulseAudio, JACK, and SDL2. It also says it couldn't execute qmake. Should I worry about any of these or are they not necessary?

Edit: it builds as is, just curious. Also wondering if libcommon.a does anything and if libOpenAL32.a should just be renamed to libopenal32.a (is it just an arbitrary name, or is it a different build configuration)? I just like to double check with this sort of thing, make sure it's all correct.
 
Logged Logged
 
Last Edit: 2017/04/22 18:36 By krypto42. Reason: Additional details
  The administrator has disabled public write access.
#8697
iarwain
Administrator
Posts: 3108
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Scroll and Config Code Questions 1 Month ago Karma: 71
This is going to be the interesting one. It'll need to find the dsound (directsound) backend, but it looks like it's trying to find the Linux backends instead.
If it doesn't find the dsound backend, you'll have n audio.
Not sure about qmake though.
It shouldn't need renaming given that Windows is case insensitive, I'm not sure what case is currently used as I'm not on a computer.
 
Logged Logged
 
Want to follow orx's development? Go subscribe to the orx-dev group at: https://groups.google.com/forum/?fromgroups#!forum/orx-dev
  The administrator has disabled public write access.
#8698
iarwain
Administrator
Posts: 3108
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Scroll and Config Code Questions 1 Month ago Karma: 71
As a side note, you'll also need ranlib to pack a few dependent libraries inside the glfw and openal ones. I'll have the details when I get on my computer later.
 
Logged Logged
 
Want to follow orx's development? Go subscribe to the orx-dev group at: https://groups.google.com/forum/?fromgroups#!forum/orx-dev
  The administrator has disabled public write access.
#8699
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
Well, it seems to have found directsound:
-- Building OpenAL with support for the following backends:
-- WinMM, DirectSound, MMDevApi, WaveFile, Null
--
-- Building with support for CPU extensions:
-- Default, SSE, SSE2, SSE3, SSE4.1

Maybe it just searches for any sound headers it can? I know it's looking in the correct directory because it's finding windows.h and not finding the ALSA includes which are in my linux includes but not mingw's.

As a side note, you'll also need ranlib to pack a few dependent libraries inside the glfw and openal ones.
How does that work exactly? Does it happen at compile time or is this just adding more things to the archive?
 
Logged Logged
  The administrator has disabled public write access.
#8700
iarwain
Administrator
Posts: 3108
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Scroll and Config Code Questions 1 Month ago Karma: 71
Well, then you're all set. Regarding the deps, here are the two little scripts I manually run after compiling:

glfw.sh:
Code:

ar xv libopengl32.a | cut -f3 -d ' ' | xargs ar rvs libglfw.a && rm *.o && echo 'done'


openal.sh:
Code:

ar xv libole32.a | cut -f3 -d ' ' | xargs ar rvs libopenal32.a && rm *.o && echo 'done'
ar xv libcommon.a | cut -f3 -d ' ' | xargs ar rvs libopenal32.a && rm *.o && echo 'done'

 
Logged Logged
 
Want to follow orx's development? Go subscribe to the orx-dev group at: https://groups.google.com/forum/?fromgroups#!forum/orx-dev
  The administrator has disabled public write access.
#8701
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
So why exactly is ranlib needed for library injection?
 
Logged Logged
  The administrator has disabled public write access.
#8702
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
Ok, here's the build script. I added two additional makefiles for glfw, but when I get the chance I'll change that to a "sed" command to temporarily modify an existing one. The zip mimics the structure of the orx directory, so all that's needed is to unzip and merge it with the orx build directory and run it. It should build everything correctly. My build machine is Linux Mint 18, so it assumes a Debian based system, I'm not sure if it will work on Fedora or some other distro. You may need to install some dependencies, like mingw-w64 in order to get it to work. Let me know if everything's configured properly, it seems to build both 32 and 64 bit dlls just fine, but so far that's untested.

The other thing is I'm not sure if Freetype is building correctly anymore, since I added the external MXE libraries to the includes it's failed. I'll need to know if any other dependencies are necessary for that.

PS. I had to modify your library injection commands a bit.
File Attachment:
File Name: orx-ab8cc8ba31ea5dc96e793b9209d79dc4.zip
File Size: 5756
 
Logged Logged
  The administrator has disabled public write access.
#8703
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
Whoops, forgot to add the cmake toolchain files to the zip.
File Attachment:
File Name: orx-80a7be931a0eafc70976d41c7cdb3d9f.zip
File Size: 6737
 
Logged Logged
  The administrator has disabled public write access.
#8704
iarwain
Administrator
Posts: 3108
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Scroll and Config Code Questions 1 Month ago Karma: 71
krypto42 wrote:
So why exactly is ranlib needed for library injection?

To regenerate the archive indices (it's not part of the scripts I pasted, I usually run it on Windows manually whereas I use the scripts on Linux).
Orx wouldn't build for me otherwise.
 
Logged Logged
 
Want to follow orx's development? Go subscribe to the orx-dev group at: https://groups.google.com/forum/?fromgroups#!forum/orx-dev
  The administrator has disabled public write access.
#8705
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Month ago Karma: 0
Ah I see. I added that to the script, and I ran a diff afterward, both with the generated libraries and the outputs given from using nm -s, but there was no difference. I'll keep it in there if it's different on other machines though.

I also added parallelization to the make commands, so it'll build everything a bit faster. I've been looking into running each dependency's build commands in parallel (1 job for glfw, 1 for libsndfile, etc.) but I'm not quite sure how to do that yet while preserving the output. I've attached the updated script, let me know what you think.

Should I keep the usage of the cmake toolchain files, or should I aim to get rid of them and make the build script itself the only file?

Finally for completeness, even though I know it's not necessary for building orx itself, I have this when building freetype:
Library configuration:
external zlib: yes (pkg-config)
bzip2: no
libpng: yes (libpng-config)
harfbuzz: no

However, building fails due to something wrong with linking libpng. In any case, which ones are necessary for building freetype?
File Attachment:
File Name: build_deps.zip
File Size: 2138
 
Logged Logged
 
Last Edit: 2017/04/24 01:43 By krypto42. Reason: Wouldn't let me include the script without being zipped.
  The administrator has disabled public write access.
#8708
iarwain
Administrator
Posts: 3108
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Scroll and Config Code Questions 3 Weeks, 5 Days ago Karma: 71
Sorry for the delay, I completely missed your last post.
Regarding CMake, it's really up to you. Which way do you feel would be the most maintainable?

Regarding FreeType, I haven't compiled it in a very long time and I don't remember which deps I've used last time. I'm pretty sure libpng and harfbuzz wouldn't be needed for what we use it.
I'll try to check it over the week.
 
Logged Logged
 
Want to follow orx's development? Go subscribe to the orx-dev group at: https://groups.google.com/forum/?fromgroups#!forum/orx-dev
  The administrator has disabled public write access.
#8717
krypto42
Fresh Boarder
Posts: 19
graphgraph
User Offline Click here to see the profile of this user
Re:Scroll and Config Code Questions 1 Day, 19 Hours ago Karma: 0
It's ok. I had quite a bit of a delay myself due to life stuff that happened/still is happening.
Well, having toolchain files is easier at the moment, although a single file for cross compiling would be ideal, just to minimize the number of files.
 
Logged Logged
  The administrator has disabled public write access.
Go to top