-
Notifications
You must be signed in to change notification settings - Fork 159
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
ThirdParty iOS Dependencies #144
Comments
Ping @rtissera |
PS: ffmpeg is only experimental video support and requires extra license compliance, see https://www.ffmpeg.org/legal.html And OpenSSL should not be required, as we use mbedtls for SSL support |
Beware of LGPL legal requirements if using OpenAL Soft on iOS too.
We are using Apple stock OpenAL on Evoland 2 iOS without EFX.
I will drop later instructions and possibly an archive from our
dependencies used for Evoland 2 iOS and tvOS.
Le mar. 8 mai 2018 à 18:35, Nicolas Cannasse <[email protected]> a
écrit :
… PS: ffmpeg is only experimental video support and requires extra license
compliance, see https://www.ffmpeg.org/legal.html
And OpenSSL should not be required, as we use mbedtls for SSL support
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC3LBQqbtP02fscGsEEavjN-v5aHPgfiks5twclIgaJpZM4T28Pm>
.
|
Yeah I noticed the LGPL on OpenAL Soft. I noticed the bindings themselves are wrapped in |
Still haven't managed to switch off EFX or get anything compiling against OpenAL. @rtissera Any pointers you can share? |
Posted too soon, I was generating the src into the wrong location. Here is the EFX hack, that I think could be put behind a compile time constant pretty easily... package openal;
import openal.AL;
abstract Effect(Int) {
public inline function toInt() : Int { return this; }
public static inline function ofInt( v : Int ) : Effect { return cast v; }
}
abstract Filter(Int) {
public inline function toInt() : Int { return this; }
public static inline function ofInt( v : Int ) : Filter { return cast v; }
}
abstract EffectSlot(Int) {
public inline function toInt() : Int { return this; }
public static inline function ofInt( v : Int ) : EffectSlot { return cast v; }
}
// ------------------------------------------------------------------------
// ALC_EXT_EFX
// ------------------------------------------------------------------------
//@:hlNative("openal","al_")
class EFX {
// Device attributes
public static inline var EFX_MAJOR_VERSION = 0x20001;
public static inline var EFX_MINOR_VERSION = 0x20002;
public static inline var MAX_AUXILIARY_SENDS = 0x20003;
// Listener properties.
public static inline var METERS_PER_UNIT = 0x20004;
// Source properties.
public static inline var DIRECT_FILTER = 0x20005;
public static inline var AUXILIARY_SEND_FILTER = 0x20006;
public static inline var AIR_ABSORPTION_FACTOR = 0x20007;
public static inline var ROOM_ROLLOFF_FACTOR = 0x20008;
public static inline var CONE_OUTER_GAINHF = 0x20009;
public static inline var DIRECT_FILTER_GAINHF_AUTO = 0x2000A;
public static inline var AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x2000B;
public static inline var AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x2000C;
// Effect properties.
// Reverb effect parameters
public static inline var REVERB_DENSITY = 0x0001;
public static inline var REVERB_DIFFUSION = 0x0002;
public static inline var REVERB_GAIN = 0x0003;
public static inline var REVERB_GAINHF = 0x0004;
public static inline var REVERB_DECAY_TIME = 0x0005;
public static inline var REVERB_DECAY_HFRATIO = 0x0006;
public static inline var REVERB_REFLECTIONS_GAIN = 0x0007;
public static inline var REVERB_REFLECTIONS_DELAY = 0x0008;
public static inline var REVERB_LATE_REVERB_GAIN = 0x0009;
public static inline var REVERB_LATE_REVERB_DELAY = 0x000A;
public static inline var REVERB_AIR_ABSORPTION_GAINHF = 0x000B;
public static inline var REVERB_ROOM_ROLLOFF_FACTOR = 0x000C;
public static inline var REVERB_DECAY_HFLIMIT = 0x000D;
// EAX Reverb effect parameters
public static inline var EAXREVERB_DENSITY = 0x0001;
public static inline var EAXREVERB_DIFFUSION = 0x0002;
public static inline var EAXREVERB_GAIN = 0x0003;
public static inline var EAXREVERB_GAINHF = 0x0004;
public static inline var EAXREVERB_GAINLF = 0x0005;
public static inline var EAXREVERB_DECAY_TIME = 0x0006;
public static inline var EAXREVERB_DECAY_HFRATIO = 0x0007;
public static inline var EAXREVERB_DECAY_LFRATIO = 0x0008;
public static inline var EAXREVERB_REFLECTIONS_GAIN = 0x0009;
public static inline var EAXREVERB_REFLECTIONS_DELAY = 0x000A;
public static inline var EAXREVERB_REFLECTIONS_PAN = 0x000B;
public static inline var EAXREVERB_LATE_REVERB_GAIN = 0x000C;
public static inline var EAXREVERB_LATE_REVERB_DELAY = 0x000D;
public static inline var EAXREVERB_LATE_REVERB_PAN = 0x000E;
public static inline var EAXREVERB_ECHO_TIME = 0x000F;
public static inline var EAXREVERB_ECHO_DEPTH = 0x0010;
public static inline var EAXREVERB_MODULATION_TIME = 0x0011;
public static inline var EAXREVERB_MODULATION_DEPTH = 0x0012;
public static inline var EAXREVERB_AIR_ABSORPTION_GAINHF = 0x0013;
public static inline var EAXREVERB_HFREFERENCE = 0x0014;
public static inline var EAXREVERB_LFREFERENCE = 0x0015;
public static inline var EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x0016;
public static inline var EAXREVERB_DECAY_HFLIMIT = 0x0017;
// Chorus effect parameters
public static inline var CHORUS_WAVEFORM = 0x0001;
public static inline var CHORUS_PHASE = 0x0002;
public static inline var CHORUS_RATE = 0x0003;
public static inline var CHORUS_DEPTH = 0x0004;
public static inline var CHORUS_FEEDBACK = 0x0005;
public static inline var CHORUS_DELAY = 0x0006;
// Distortion effect parameters
public static inline var DISTORTION_EDGE = 0x0001;
public static inline var DISTORTION_GAIN = 0x0002;
public static inline var DISTORTION_LOWPASS_CUTOFF = 0x0003;
public static inline var DISTORTION_EQCENTER = 0x0004;
public static inline var DISTORTION_EQBANDWIDTH = 0x0005;
// Echo effect parameters
public static inline var ECHO_DELAY = 0x0001;
public static inline var ECHO_LRDELAY = 0x0002;
public static inline var ECHO_DAMPING = 0x0003;
public static inline var ECHO_FEEDBACK = 0x0004;
public static inline var ECHO_SPREAD = 0x0005;
// Flanger effect parameters
public static inline var FLANGER_WAVEFORM = 0x0001;
public static inline var FLANGER_PHASE = 0x0002;
public static inline var FLANGER_RATE = 0x0003;
public static inline var FLANGER_DEPTH = 0x0004;
public static inline var FLANGER_FEEDBACK = 0x0005;
public static inline var FLANGER_DELAY = 0x0006;
// Frequency shifter effect parameters
public static inline var FREQUENCY_SHIFTER_FREQUENCY = 0x0001;
public static inline var FREQUENCY_SHIFTER_LEFT_DIRECTION = 0x0002;
public static inline var FREQUENCY_SHIFTER_RIGHT_DIRECTION = 0x0003;
// Vocal morpher effect parameters
public static inline var VOCAL_MORPHER_PHONEMEA = 0x0001;
public static inline var VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = 0x0002;
public static inline var VOCAL_MORPHER_PHONEMEB = 0x0003;
public static inline var VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = 0x0004;
public static inline var VOCAL_MORPHER_WAVEFORM = 0x0005;
public static inline var VOCAL_MORPHER_RATE = 0x0006;
// Pitchshifter effect parameters
public static inline var PITCH_SHIFTER_COARSE_TUNE = 0x0001;
public static inline var PITCH_SHIFTER_FINE_TUNE = 0x0002;
// Ringmodulator effect parameters
public static inline var RING_MODULATOR_FREQUENCY = 0x0001;
public static inline var RING_MODULATOR_HIGHPASS_CUTOFF = 0x0002;
public static inline var RING_MODULATOR_WAVEFORM = 0x0003;
// Autowah effect parameters
public static inline var AUTOWAH_ATTACK_TIME = 0x0001;
public static inline var AUTOWAH_RELEASE_TIME = 0x0002;
public static inline var AUTOWAH_RESONANCE = 0x0003;
public static inline var AUTOWAH_PEAK_GAIN = 0x0004;
// Compressor effect parameters
public static inline var COMPRESSOR_ONOFF = 0x0001;
// Equalizer effect parameters
public static inline var EQUALIZER_LOW_GAIN = 0x0001;
public static inline var EQUALIZER_LOW_CUTOFF = 0x0002;
public static inline var EQUALIZER_MID1_GAIN = 0x0003;
public static inline var EQUALIZER_MID1_CENTER = 0x0004;
public static inline var EQUALIZER_MID1_WIDTH = 0x0005;
public static inline var EQUALIZER_MID2_GAIN = 0x0006;
public static inline var EQUALIZER_MID2_CENTER = 0x0007;
public static inline var EQUALIZER_MID2_WIDTH = 0x0008;
public static inline var EQUALIZER_HIGH_GAIN = 0x0009;
public static inline var EQUALIZER_HIGH_CUTOFF = 0x000A;
// Effect type
public static inline var EFFECT_FIRST_PARAMETER = 0x0000;
public static inline var EFFECT_LAST_PARAMETER = 0x8000;
public static inline var EFFECT_TYPE = 0x8001;
// Effect types, used with the AL_EFFECT_TYPE property
public static inline var EFFECT_NULL = 0x0000;
public static inline var EFFECT_REVERB = 0x0001;
public static inline var EFFECT_CHORUS = 0x0002;
public static inline var EFFECT_DISTORTION = 0x0003;
public static inline var EFFECT_ECHO = 0x0004;
public static inline var EFFECT_FLANGER = 0x0005;
public static inline var EFFECT_FREQUENCY_SHIFTER = 0x0006;
public static inline var EFFECT_VOCAL_MORPHER = 0x0007;
public static inline var EFFECT_PITCH_SHIFTER = 0x0008;
public static inline var EFFECT_RING_MODULATOR = 0x0009;
public static inline var EFFECT_AUTOWAH = 0x000A;
public static inline var EFFECT_COMPRESSOR = 0x000B;
public static inline var EFFECT_EQUALIZER = 0x000C;
public static inline var EFFECT_EAXREVERB = 0x8000;
// Auxiliary Effect Slot properties.
public static inline var EFFECTSLOT_EFFECT = 0x0001;
public static inline var EFFECTSLOT_GAIN = 0x0002;
public static inline var EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x0003;
// NULL Auxiliary Slot ID to disable a source send.
public static inline var EFFECTSLOT_NULL = 0x0000;
// Filter properties.
// Lowpass filter parameters
public static inline var LOWPASS_GAIN = 0x0001;
public static inline var LOWPASS_GAINHF = 0x0002;
// Highpass filter parameters
public static inline var HIGHPASS_GAIN = 0x0001;
public static inline var HIGHPASS_GAINLF = 0x0002;
// Bandpass filter parameters
public static inline var BANDPASS_GAIN = 0x0001;
public static inline var BANDPASS_GAINLF = 0x0002;
public static inline var BANDPASS_GAINHF = 0x0003;
// Filter type
public static inline var FILTER_FIRST_PARAMETER = 0x0000;
public static inline var FILTER_LAST_PARAMETER = 0x8000;
public static inline var FILTER_TYPE = 0x8001;
// Filter types, used with the AL_FILTER_TYPE property
public static inline var FILTER_NULL = 0x0000;
public static inline var FILTER_LOWPASS = 0x0001;
public static inline var FILTER_HIGHPASS = 0x0002;
public static inline var FILTER_BANDPASS = 0x0003;
public static function genEffects (n : Int, effects : hl.Bytes) : Void { }
public static function deleteEffects (n : Int, effects : hl.Bytes) : Void { }
public static function isEffect (effect : Effect) : Bool { return false; }
public static function effecti (effect : Effect, param : Int, iValue : Int) : Void { }
public static function effectiv (effect : Effect, param : Int, piValues : hl.Bytes) : Void { }
public static function effectf (effect : Effect, param : Int, flValue : hl.F32) : Void { }
public static function effectfv (effect : Effect, param : Int, pflValues : hl.Bytes) : Void { }
public static function getEffecti (effect : Effect, param : Int) : Int { return 0; }
public static function getEffectiv (effect : Effect, param : Int, piValues : hl.Bytes) : Void { };
public static function getEffectf (effect : Effect, param : Int) : hl.F32 { return 0; }
public static function getEffectfv (effect : Effect, param : Int, pflValues : hl.Bytes) : Void { }
public static function genFilters (n : Int, filters : hl.Bytes) : Void { }
public static function deleteFilters (n : Int, filters : hl.Bytes) : Void { }
public static function isFilter (filter : Filter) : Bool { return false; }
public static function filteri (filter : Filter, param : Int, iValue : Int) : Void { }
public static function filteriv (filter : Filter, param : Int, piValues : hl.Bytes) : Void { }
public static function filterf (filter : Filter, param : Int, flValue : hl.F32) : Void { }
public static function filterfv (filter : Filter, param : Int, pflValues : hl.Bytes) : Void { }
public static function getFilteri (filter : Filter, param : Int) : Int { return 0; }
public static function getFilteriv (filter : Filter, param : Int, piValues : hl.Bytes) : Void { }
public static function getFilterf (filter : Filter, param : Int) : hl.F32 { return 0; }
public static function getFilterfv (filter : Filter, param : Int, pflValues : hl.Bytes) : Void { }
public static function genAuxiliaryEffectSlots (n : Int, effectslots : hl.Bytes) : Void { }
public static function deleteAuxiliaryEffectSlots (n : Int, effectslots : hl.Bytes) : Void { }
public static function isAuxiliaryEffectSlot (effectslot : EffectSlot) : Bool { return false; }
public static function auxiliaryEffectSloti (effectslot : EffectSlot, param : Int, iValue : Int) : Void { }
public static function auxiliaryEffectSlotiv (effectslot : EffectSlot, param : Int, piValues : hl.Bytes) : Void { }
public static function auxiliaryEffectSlotf (effectslot : EffectSlot, param : Int, flValue : hl.F32) : Void { }
public static function auxiliaryEffectSlotfv (effectslot : EffectSlot, param : Int, pflValues : hl.Bytes) : Void { }
public static function getAuxiliaryEffectSloti (effectslot : EffectSlot, param : Int) : Int { return 0; }
public static function getAuxiliaryEffectSlotiv (effectslot : EffectSlot, param : Int, piValues : hl.Bytes) : Void { }
public static function getAuxiliaryEffectSlotf (effectslot : EffectSlot, param : Int) : hl.F32 { return 0; }
public static function getAuxiliaryEffectSlotfv (effectslot : EffectSlot, param : Int, pflValues : hl.Bytes) : Void { }
} |
Had to add |
I have about 9k duplicate symbols all coming from heaps now. So, everything is compiling and almost linking. Things like... EDIT: Do not add anything other than the top level generated source from hl, i.e. |
@ncannasse Do you have a recommendation for a way to make EFX a configuration option, or long term would you prefer openal-soft compiled per platform as a dynamic library to stay in check with the lgpl? |
Hey thanks @thejustinwalsh ! Got heaps (hlc) to run on both mac and iOS thanks to your tips (well I have a nice spinning red rectangle, will test the samples later and I do expect some roadblock haha). Wasn't as hard as I expect, altho having some "official" XCode template would be super nice. Here's mine if anyone interested, https://github.com/starburst997/xcode-heaps Also some minor fixes in hashlink for ios: https://github.com/starburst997/hashlink/tree/ios-fixes Mind sharing yours? I'm curious |
@starburst997 Awesome! I am working on a template that i'm about ready to share. Still working out some kinks. I'll post a link here. I'm also working on a few PRs for mobile support for the main hashlink and heaps repos. |
Alright, got all samples running and working, the 3D ones, like "world" have a few visual glitches, I was pleasantly surprised that I had to do nothing for the assets to somehow end up in the app (really need to check how this black magic is performed). |
@starburst997 Here are the only modifications I had to make to get hashlink compiling on iOS Stubbing Here is a script that I am using on appcenter.ms to fully install and compile everything from scratch on a fresh environment. It's not the prettiest but it compiles, links, and runs, with minimal modification. In order to build, It required me syncing to very specific revisions of development repositories, so obviously as versions stabilize this will not be needed. I am planning on submitting my modifications as a PR when I get some time this weekend, however the hack needed to EFX.hx probably wont fly, so finding a solution that allows a developer to turn it off / on for specific platforms / targets would be ideal. I use the same script for boot-strapping my project where I have the dependencies installed already as well. Additionally, I added a As soon as a fix for OpenAL/EFX and OpenGL/GLES go in, I believe this issue should be marked as closed / archived. Additionally we should probably create a new issue for the OpenAL/EFX thing to reduce the noise. |
I'll try the |
I see that there's a fork from the guys at Playdigious here https://github.com/playdigious/hashlink |
@tanis2000 I think we have merged the most important things, I'm sure @rtissera can tell more about it. |
That’s good. I’ve been thinking about something like https://github.com/native-toolkit but for projects using HL. Maybe we can build repos for all of the libraries involved so that they can be easily compiled for the different platforms and included as static/dynamic libraries as needed. |
Following this topic silently, out of curiosity I tried to build libjpeg-turbo from source for iOS and iOS Simulator with bitcode enabled. Although I didn't tested the resulting binary in a project, I successfuly built (from mac) a universal binary (armv7, arm64, i386, x86_64). You can find the build script I setup and used (and the binary) there. Hopefully this binary will work for HEAPS/Xcode projects and solve the bitcode problem? |
Any movement on this? Looking at Heaps for an iOS project and unclear what state it's in. |
I have a game that is nearly complete, still working on trying to get the iOS build to work correctly so I can publish to App Store. |
@xenophilicibex Have you gotten iOS running properly then? If so, would love to see if you have code anywhere or have written a guide about how to do it! |
@kkukshtel I was able to get this project: https://github.com/starburst997/xcode-heaps up & running. But was not successful in getting my game running, I just get a black screen, though logging is working. I hope to get some time in the next few weeks to really dig in and figure out the iOS build so I can publish it. Edit: I think the only thing really holding Heaps back is the ease of publishing. I got stuck in May 2018, and gave up for the time being, hoping there would be a community solution by the time I came back. |
I could update that sample, I do have a running version of heaps on iOS but haven't updated that repo in a while, don't have much time this week but maybe I could get something this we |
Would definitely love to see an updated version! Understand if you don't
have time but there are a fair amount of people both on the forums/on the
discord asking for something.
…On Wed, Mar 27, 2019 at 12:44 PM Jean-Denis Boivin ***@***.***> wrote:
I could update that sample, I do have a running version of heaps on iOS
but haven't updated that repo in a while, don't have much time this week
but maybe I could get something this we
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHW5z2YrYciGCpIZGQ2ZSlq1MsMJeoyIks5va5_kgaJpZM4T28Pm>
.
|
Got my old sample project compiling once again with No other hacks needed this time though, and shimming the EFX calls in a simple c file is way easier than patching hashlink. Updated build script to match as well... The last piece of the puzzle is just the Xcode project itself. Working on stripping down my Xcode project and uploading a shell project, however I already spent must of my weekend free time simply updating my own project. |
New template project for iOS is up! @starburst997 Same issues as you when using Not sure when or how diligent I will be in updating the sample when version change happens, however any PR is welcome. Currently working with haxe |
This is excting, thanks for this! Any specific limitations besides h3d?
…On Thu, Apr 11, 2019 at 3:41 PM Justin Walsh ***@***.***> wrote:
New template project for iOS is up!
https://github.com/thejustinwalsh/heaps-ios
@starburst997 <https://github.com/starburst997> Same issues as you when
using h3d or more specifically the World sample. Looks like triangles are
choosing not to render, some kind of z-fighting / depth issue...
Not sure when or how diligent I will be in updating the sample when
version change happens, however any PR is welcome. Currently working with
haxe 4.0.0-rc.2+77068e1, hl 1.9.0, heaps 1.6.1, hxbit 1.4.1, format 3.4.2,
hlsdl 1.9.0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#144 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHW5z1GVs1K0WV61E36fX3tmRQXTKmOwks5vf4_WgaJpZM4T28Pm>
.
|
I'll have to update the readme now that you mention it...
|
So just tried the heaps samples on my iPhone in the web browser. Same visual artifacts are happening there as well with the skinning and world samples. That bug seems to be heaps related or specific to some apple OpenGL to metal translation? Regardless I will create a new issue in heaps specifically with screen captures. |
@thejustinwalsh check if it works better with HeapsIO/heaps#599 |
@ncannasse I have merged in the above PR (HeapsIO/heaps#599) and am not seeing any better results. Suggesting we move further discussion of particular issue to HeapsIO/heaps#602. |
I've finally managed to compile a heaps project using https://github.com/thejustinwalsh/heaps-ios as a base project.
These are the modifications I had to apply to fully make it work :
You will also need to update the App.xcodeproj DEVELOPMENT_TEAM and PRODUCT_BUNDLE_IDENTIFIER in the Signing & Capabilities target tab. You will also need to define sdl__Sdl__val in the GCC_PREPROCESSOR_DEFINITIONS because of this : https://github.com/HaxeFoundation/hashlink/pull/101/files#diff-2e6cb46956f711087d1dde23e196527fR24 |
|
I am working on building all third party dependencies for iOS, so might as well start this thread as I see one for android all ready open.
Working
libsdl2: Official Distro has an Xcode project, that will generate libSDL2.a
libpng: Built from source in project w/ preprocessor macros
pcre: Included source in project
libz: Included in iPhoneSDK as libz.tbd
libsqlite3: Included in iPhoneSDK as libdqlite3.tbd
libturbo-jpeg: https://libjpeg-turbo.org/Documentation/OfficialBinaries☹️
Installed dmg, then linked against the library that is installed in
/opt/libjpeg-turb/**
, the resulting dylib path is not relative to the application binary, so instead using this static version found here (https://github.com/hjeffrey/turbojpeg) BITCODE is not enabled though...Ogg: https://github.com/iosdevzone/IDZPrecompiledOgg
Vorbis: https://github.com/iosdevzone/IDZPrecompiledVorbis
Link to the included Frameworks in these repositories
OpenAL: Link against the OpenAL.framework in the iphone SDK.
Ensure you pass
-L hlopenal
when generating your c source with hlPatch EFX.hx to just provide empty stubs
TODO
libturbo-jpeg: Need to find build a fat-binary with BITCODE enabled.
mbedtls: ???
ffmpeg: https://github.com/kewlbear/FFmpeg-iOS-build-script
General Setup
Once this is all wrangled setting up a CocoaPod that resolves all dependencies for hashlink could be pretty slick. Thoughts?
The text was updated successfully, but these errors were encountered: