-
Notifications
You must be signed in to change notification settings - Fork 32
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
PhantomJS Linux binary missing #58
Comments
I put the PhantomJS binary in and modified the code but when I import a story, it is not converted to a script but no errors are generated. I'll try to upload my branch to show what I've tried. |
@daterre I was unable to push a new branch but basically I added a Linux option to .src/Cradle.Editor/Editor/Utils/PhantomJS.cs and added the phantomjs binary to ThirdParty/PhantomJS/bin/linux/ |
Hi @michaelbianchini, sorry it took me so long to answer! Yes, totally doable. I don't really have the environment to test it at the moment thought - do you have your fork somewhere I can look at? Maybe it's a simple fix. |
Thanks @daterre ! No problem, I am just grateful you will help. I just pushed my changes to the fork I created with my username, can you see them? One is the PhantomJS.cs code, a one line change to find the linux binary, and the other is the linux binary itself. |
Hi @michaelbianchini, looking at the code section containing your fix: // Get the location of the phantom exe
string phantomExecutable =
Application.platform == RuntimePlatform.OSXEditor ? "phantomjs" :
Application.platform == RuntimePlatform.WindowsEditor ? "phantomjs.exe" :
Application.platform == RuntimePlatform.LinuxEditor ? "phantomjs" :
null;
if (phantomExecutable == null)
throw new NotSupportedException("Editor platform not supported."); The exception you are getting can only happen if Application.platform is not one of the above. Could it be that Unity is reporting some other value there? |
Thanks @daterre ! I just looked into it and it is still an issue, but it turns out I was not testing the changes until now. I forgot to actually compile the changes (Monodevelop Buld All) and copy the dll to my Unity project. However, to get them to compile, I had to change the csproj file for MonoDevelop and another file or two ; I had to make changes similar to this commit: After making all the changes, I am still having the same issue (drag html file into Story field, nothing happens) I pushed all the changes to my fork, check them out and let me know what you think. |
thanks @michaelbianchini, I'll try to get a Linux environment up and running to start testing this stuff! |
Is this going to land in an official release? I just hit the same place and noticed this thread while looking to see if anyone else has tackled this. |
I don't know if this is related. But I get the same type of error on Linux when trying to add the current Cradle to my empty Unity 2019.3.14 project. (I ignored installing from the unity store because comments say v 2.0.1 is broken.
|
Not sure if this counts as a valid issue since it's sort of a feature request. I have Unity on Linux and when I drag a Twine HTML file into the Project, I get the following error:
NotSupportedException: Editor platform not supported.
Cradle.Editor.Utils.PhantomJS.Run[HarloweStoryData] (System.String url, System.String bridgeScriptFileName, Boolean throwExOnError) (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/Utils/PhantomJS.cs:23)
Cradle.Editor.StoryFormats.Harlowe.HarloweTranscoder.Init () (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/StoryFormats/Harlowe/HarloweTranscoder.cs:114)
Cradle.Editor.StoryImporter.Transcode () (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/StoryImporter.cs:44)
Cradle.Editor.CradleAssetProcessor.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at C:/Projects/(external)/Cradle/unity/Cradle/Assets/Cradle/.src/Cradle.Editor/Editor/CradleAssetProcessor.cs:83)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at /home/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:27)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEditor.DockArea:OnGUI()
I downloaded the PhantomJS Linux 64 bit binary and I am going to try editing the code to add a case for it.
The text was updated successfully, but these errors were encountered: