B4J Tutorial B4LinuxInstall script to use B4X tools in linux

This is a Bash shell script that allows installing B4J and B4A in linux systems, along with their required dependencies. It is very functional. But for now only Ubuntu is fully supported.

The project has a repository in github. The only file you need is b4linuxinstall.sh. You can install it by opening a terminal and entering these commands:

B4X:
wget github.com/joseluis/B4LinuxInstall/raw/master/b4linuxinstall.sh
bash ./b4linuxinstall.sh
To install B4i and B4A you must download the installers and put them in the same directory before executing the script.
---

This is a work in progress. More linux distributions will also be supported eventually. There is a poll in this thread to know which are the most used in the community in order to prioritize them.

I must thank Zolive33 for his previous(1) work(2) from which B4LinuxInstall is built upon and tries to improve on the mission of bringing the software we love to our Linux computers.

UPDATE 2016: Since I'm no longer a user of B4X I'll probably wont be updating this tool anymore. Also it seems that since B4A version 5 there are some compatibility issues that difficults running it in linux.
 
Last edited:

Charles

Member
Licensed User
Longtime User
I have Ubuntu 14.04 on both. I even went so far as to manually install wine and playonlinux so I could get the same distributions on both machines. The only difference was the motherboard/cpu combos. The one that ran fine was Intel and not was AMD.
 

Charles

Member
Licensed User
Longtime User
I have Ubuntu 14.04 on both. The only difference is one is a core2 duo cpu and the other is an AMD FX6350.
 

chasinreno

New Member
Licensed User
Longtime User
I have Ubuntu 14.04 LTS on my Dell Vostro and B4A ran nicely on it. Since my last post I've upgraded my motherboard to an ASUS B85-M with an Intel i5-4690, 8G ram, 1T HD, all in a mid size ATX box. I dual boot to Ubuntu 14.04 or Windows 7 Pro. I went through all the steps as above and am asked for the license file but after that I get a small black rectangle and it freezes up. I've looked at the log and it seems that there are a couple unsupported functions that are causing the problems.

I had the original Dell motherboard in the Vostro so I replaced it with the MCI 760G motherboard (AMD FX6350) and Ubuntu 14.04 actually started up (different motherboard and all). B4A5 also started up and ran nicely. After some Ubuntu updates installed though, it finally crapped out too.

I don't know what I'm going to do. Microsoft has pulled it's last stunt in my case. Their blatant invasion of my privacy was the last straw. BUT, the programs that I rely on the most all run in Windows. :( I'm fed up with Microsoft but where else can I work with B4A?
 

LWGShane

Well-Known Member
Licensed User
Longtime User
Their blatant invasion of my privacy was the last straw
Why do people always think that Microsoft doesn't spy on Windows 8 and 7 users? They're in bed with PRISM. PRISM is the NSA's spying program.
 

barko

Member
Licensed User
Longtime User
Microsoft has pulled it's last stunt in my case. Their blatant invasion of my privacy was the last straw. BUT, the programs that I rely on the most all run in Windows. :( I'm fed up with Microsoft but where else can I work with B4A?

You can still use linux and in the virtualbox install winxp, you will be ok with that. Use B4A BRIDGE on your android device for testings of your creations and that's it.
 

Fusseldieb

Active Member
Licensed User
Longtime User
Hi @joseluis ,
I've noticed that B4A Version 5.02 does not work on Linux anymore...
It requires .Net Framework 4.0, which seems bugged on Wine at the moment... (The install of the Framework will fail. On both 32 and 64bit architectures)
I'm using Ubuntu Studio 15.04
Below is a screenshot from the error:
Error4.png

I don't know if there's a workaround...

EDIT:
I've managed installing .Net 4.0. The 'secret' is that you must copy mscoree.dll from you real windows system into the system32 folder of the current wine environment. When the install window opens, do not continue. Open the wine folder for B4, open system32 and then copy your mscoree.dll into this folder and after that, continue the install of the Framework. It will succeed. After that, this error above is gone, but instead of that, nothing happens. If I run in the console, it shows following error:
B4X:
err:module:import_dll Loading library mscoree.dll (which is needed by L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorsvw.exe") failed (error c000007b).
err:module:LdrInitializeThunk Main exe initialization for L"C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\mscorsvw.exe" failed, status c0000135
err:service:service_send_start_message service L"clr_optimization_v4.0.30319_32" failed to start
fixme:service:scmdatabase_autostart_services Auto-start service L"clr_optimization_v4.0.30319_32" failed to start: 1053
fixme:exec:SHELL_execute flags ignored: 0x00000100
fixme:exec:SHELL_execute flags ignored: 0x00004100
err:module:import_dll Loading library mscoree.dll (which is needed by L"C:\\Program Files\\Anywhere Software\\Basic4android\\B4A.exe") failed (error c000007b).
err:module:LdrInitializeThunk Main exe initialization for L"C:\\Program Files\\Anywhere Software\\Basic4android\\B4A.exe" failed, status c0000135
valentino@HP-Pavilion-15-Notebook:~$

EDIT2:
It is an 32bit wineprefix and I took an 64bit dll, there's why it not worked. I now took an 32bit and I managed B4A to start up (with an error, but it opened)
Captura_de_tela_2015_11_29_15_17_13.png


Error in console:
B4X:
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:process:SetProcessDEPPolicy (1): stub
fixme:heap:HeapSetInformation (nil) 1 (nil) 0
fixme:process:SetProcessShutdownParameters (00000380, 00000000): partial stub.
fixme:exec:SHELL_execute flags ignored: 0x00000100
fixme:exec:SHELL_execute flags ignored: 0x00004100
valentino@HP-Pavilion-15-Notebook:~$ fixme:thread:SetThreadStackGuarantee (0x33fbf4): stub
err:ole:CoGetContextToken apartment not initialised
fixme:shell:URL_ParseUrl failed to parse L"PresentationFramework"
fixme:shell:URL_ParseUrl failed to parse L"WindowsBase"
fixme:shell:URL_ParseUrl failed to parse L"System.Xaml"
fixme:shell:URL_ParseUrl failed to parse L"PresentationCore"
fixme:shell:URL_ParseUrl failed to parse L"System"
fixme:advapi:RegisterTraceGuidsW (0x9e047a, (nil), {8e9f5090-2d75-4d03-8a81-e5afbf85daf1}, 1, 0x33e520, (null), (null), 0xd16a30,): stub
fixme:shell:URL_ParseUrl failed to parse L"B4A.resources"
fixme:shell:URL_ParseUrl failed to parse L"B4A.resources"
fixme:shell:URL_ParseUrl failed to parse L"WindowsBase.resources"
fixme:shell:URL_ParseUrl failed to parse L"WindowsBase.resources"
fixme:advapi:RegisterTraceGuidsW (0x9e07ca, (nil), {e13b77a8-14b6-11de-8069-001b212b5009}, 1, 0x33e564, (null), (null), 0x33e56c,): stub
fixme:advapi:RegisterTraceGuidsW (0x550b9c5c, 0x5516e048, {e13b77a8-14b6-11de-8069-001b212b5009}, 1, 0x33b93c, (null), (null), 0x5516e048,): stub
fixme:shell:URL_ParseUrl failed to parse L"System.Xml"
fixme:shell:URL_ParseUrl failed to parse L"B4A.resources"
fixme:shell:URL_ParseUrl failed to parse L"B4A.resources"
fixme:shell:URL_ParseUrl failed to parse L"Logic"
fixme:shell:URL_ParseUrl failed to parse L"B4X.Text"
fixme:shell:URL_ParseUrl failed to parse L"System.Windows.Forms"
fixme:shell:URL_ParseUrl failed to parse L"UIShared"
fixme:shell:URL_ParseUrl failed to parse L"UIAutomationTypes"
fixme:shell:URL_ParseUrl failed to parse L"PresentationCore.resources"
fixme:shell:URL_ParseUrl failed to parse L"PresentationCore.resources"
fixme:shell:URL_ParseUrl failed to parse L"ActiproSoftware.SyntaxEditor.Wpf"
fixme:msg:ChangeWindowMessageFilter c04b 00000001
fixme:advapi:RegisterTraceGuidsW (0x56216bfc, 0x56263028, {0635afbf-f587-4fe5-a020-edca759acbd9}, 1, 0x33d438, (null), (null), 0x56263028,): stub
err:secur32:SECUR32_initSchannelSP TLS library not found, SSL connections will fail
err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
fixme:rpc:RpcBindingSetAuthInfoExW unsupported AuthnSvc 10
fixme:wer:WerRegisterMemoryBlock (0x56263970 352) stub
fixme:wer:WerRegisterMemoryBlock (0x5626345c 4) stub
fixme:wer:WerRegisterMemoryBlock (0x551759b0 6144) stub
fixme:wer:WerRegisterMemoryBlock (0x551759ac 4) stub
fixme:shell:URL_ParseUrl failed to parse L"mscorlib.resources"
fixme:shell:URL_ParseUrl failed to parse L"mscorlib.resources"
fixme:shell:URL_ParseUrl failed to parse L"System.Xaml.resources"
fixme:shell:URL_ParseUrl failed to parse L"System.Xaml.resources"
System.Windows.Markup.XamlParseException: Set property 'System.Windows.Media.TextOptions.TextRenderingMode' threw an exception. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800706D3
   at System.Windows.Media.MediaSystem.ConnectTransport()
   at System.Windows.Media.MediaSystem.Startup(MediaContext mc)
   at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
   at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
   at System.Windows.Media.Visual.VerifyAPIReadWrite()
   at System.Windows.Media.Visual.set_VisualTextRenderingMode(TextRenderingMode value)
   at System.Windows.FrameworkElement.pushTextRenderingMode()
   at System.Windows.FrameworkElement.TextRenderingMode_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
   at System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
   at System.Windows.Application.DoStartup()
   at System.Windows.Application.<.ctor>b__1(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
fixme:shell:URL_ParseUrl failed to parse L"Mantin.Controls.Wpf.Notification"
fixme:shell:URL_ParseUrl failed to parse L"System.Drawing"
fixme:shell:URL_ParseUrl failed to parse L"System.Core"
fixme:shell:URL_ParseUrl failed to parse L"Mantin.Controls.Wpf.Notification.resources"
fixme:shell:URL_ParseUrl failed to parse L"Mantin.Controls.Wpf.Notification.resources"
fixme:msg:ChangeWindowMessageFilter c04b 00000001
fixme:rpc:RpcBindingSetAuthInfoExW unsupported AuthnSvc 10
System.Windows.Markup.XamlParseException: 'Set property 'System.Windows.Media.TextOptions.TextRenderingMode' threw an exception.' Line number '10' and line position '10'. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800706D3
   at System.Windows.Media.MediaSystem.ConnectTransport()
   at System.Windows.Media.MediaSystem.Startup(MediaContext mc)
   at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
   at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
   at System.Windows.Media.Visual.VerifyAPIReadWrite()
   at System.Windows.Media.Visual.set_VisualTextRenderingMode(TextRenderingMode value)
   at System.Windows.FrameworkElement.pushTextRenderingMode()
   at System.Windows.FrameworkElement.TextRenderingMode_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Mantin.Controls.Wpf.Notification.ToastPopUp.InitializeComponent()
   at Mantin.Controls.Wpf.Notification.ToastPopUp..ctor(String title)
   at Mantin.Controls.Wpf.Notification.ToastPopUp..ctor(String title, NotificationType notificationType)
   at az.d(String A_0, MessageBoxButton A_1, MessageBoxImage A_2, Window A_3, MessageBoxResult A_4)
   at az.e(String A_0, MessageBoxButton A_1, MessageBoxImage A_2, Window A_3, MessageBoxResult A_4)
   at az.s(String A_0, Exception A_1, Window A_2)
   at az.d(Object A_0, DispatcherUnhandledExceptionEventArgs A_1)
   at System.Windows.Threading.Dispatcher.CatchException(Exception e)
   at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
   at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
fixme:msg:ChangeWindowMessageFilter c04b 00000001
fixme:rpc:RpcBindingSetAuthInfoExW unsupported AuthnSvc 10
System.Windows.Markup.XamlParseException: 'Set property 'System.Windows.Media.TextOptions.TextRenderingMode' threw an exception.' Line number '10' and line position '10'. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800706D3
   at System.Windows.Media.MediaSystem.ConnectTransport()
   at System.Windows.Media.MediaSystem.Startup(MediaContext mc)
   at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
   at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
   at System.Windows.Media.Visual.VerifyAPIReadWrite()
   at System.Windows.Media.Visual.set_VisualTextRenderingMode(TextRenderingMode value)
   at System.Windows.FrameworkElement.pushTextRenderingMode()
   at System.Windows.FrameworkElement.TextRenderingMode_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Mantin.Controls.Wpf.Notification.ToastPopUp.InitializeComponent()
   at Mantin.Controls.Wpf.Notification.ToastPopUp..ctor(String title)
   at Mantin.Controls.Wpf.Notification.ToastPopUp..ctor(String title, NotificationType notificationType)
   at az.d(String A_0, MessageBoxButton A_1, MessageBoxImage A_2, Window A_3, MessageBoxResult A_4)
   at az.e(String A_0, MessageBoxButton A_1, MessageBoxImage A_2, Window A_3, MessageBoxResult A_4)
   at az.s(String A_0, Exception A_1, Window A_2)
   at az.d(Object A_0, DispatcherUnhandledExceptionEventArgs A_1)
   at System.Windows.Threading.Dispatcher.CatchException(Exception e)
   at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
   at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at er.a()
fixme:msg:ChangeWindowMessageFilter c04b 00000001
fixme:rpc:RpcBindingSetAuthInfoExW unsupported AuthnSvc 10

Unhandled Exception: System.Windows.Markup.XamlParseException: 'Set property 'System.Windows.Media.TextOptions.TextRenderingMode' threw an exception.' Line number '10' and line position '10'. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800706D3
   at System.Windows.Media.MediaSystem.ConnectTransport()
   at System.Windows.Media.MediaSystem.Startup(MediaContext mc)
   at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
   at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
   at System.Windows.Media.Visual.VerifyAPIReadWrite()
   at System.Windows.Media.Visual.set_VisualTextRenderingMode(TextRenderingMode value)
   at System.Windows.FrameworkElement.pushTextRenderingMode()
   at System.Windows.FrameworkElement.TextRenderingMode_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Baml2006.WpfMemberInvoker.SetValue(Object instance, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
   at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
   --- End of inner exception stack trace ---
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
   at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
   at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
   at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at Mantin.Controls.Wpf.Notification.ToastPopUp.InitializeComponent()
   at Mantin.Controls.Wpf.Notification.ToastPopUp..ctor(String title)
   at Mantin.Controls.Wpf.Notification.ToastPopUp..ctor(String title, NotificationType notificationType)
   at az.d(String A_0, MessageBoxButton A_1, MessageBoxImage A_2, Window A_3, MessageBoxResult A_4)
   at az.e(String A_0, MessageBoxButton A_1, MessageBoxImage A_2, Window A_3, MessageBoxResult A_4)
   at az.s(String A_0, Exception A_1, Window A_2)
   at az.d(Object A_0, DispatcherUnhandledExceptionEventArgs A_1)
   at System.Windows.Threading.Dispatcher.CatchException(Exception e)
   at System.Windows.Threading.Dispatcher.CatchExceptionStatic(Object source, Exception e)
   at System.Windows.Threading.ExceptionWrapper.CatchException(Object source, Exception e, Delegate catchHandler)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at er.a()
 
Last edited:

LWGShane

Well-Known Member
Licensed User
Longtime User
I really wish B4X went cross platform via being written in B4J. That's really the only thing holding back professionals from using it.
 

Roycefer

Well-Known Member
Licensed User
Longtime User
I don't think it's the ONLY thing holding back pros from using it, but it would certainly be a big step towards that goal.
 

LWGShane

Well-Known Member
Licensed User
Longtime User
I don't think it's the ONLY thing holding back pros from using it, but it would certainly be a big step towards that goal.

True. @Erel - One of the minor things I believe is the Visual Designer. Even though at its core it's amazing, it lacks what other designers have:
  • Visual representation of controls and their editable properties. (Adding cells a table via the designer and having the cells display IN the designer. A button displaying the Text property and any changes you make to its text. Controls should have their platform's "skin" and not look like plain blocks.)
  • Ability to double click a control to automatically add it's "Action" event. (Like Visual Studio/Netbeans.)
  • A minor, minor nitpick, but having the designer appear in the same window as the IDE itself, as a tab. (Like Xcode.)

I still believe open sourcing would be the way to go too. Look at LiveCode: They have a free open source "community" edition, and a paid "indie" edition. I'm just trying to show that It's not impossible to be open source and paid at the same time ;)
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Yes, there are some interesting open source business models out there. I'm not sure how successful they are as compared to conventional closed-source business models for equivalent products but they are interesting nonetheless. Some offer the software and source code for free and customers pay for support. Others pay for access to the forums. I think the B4X forums are a pretty big asset to the B4X user. I'm not sure if such a model would work for B4X, though.

I think one of the bigger obstacles to widespread adoption is the incomplete OOP implementation. B4X would be really great if it had encapsulation, polymorphism and inheritance (along with some kind of abstract class).

I think this is getting off-topic for this thread, though.
 

Fusseldieb

Active Member
Licensed User
Longtime User
If Erel could stick with .Net Framework 2 - 3.5, Wine would work with it... I really want to leave windows....
@Erel , what's holding you "down" to version 4? Could you not downgrade to 3.5?
 
Last edited:

LWGShane

Well-Known Member
Licensed User
Longtime User
If Erel could stick with .Net Framework 2 - 3.5, Wine would work with it... I really want to leave windows....
@Erel , what's holding you "down" to version 4? Could you not downgrade to 3.5?

My guess is that the WPF controls (The Docking panels, code editor, etc) that Erel uses require version 4.
 

jazzzzzzz

Active Member
Licensed User
Longtime User
so what is the suggested way to install b4a (above version 5) in ubuntu 14.04? use virtualbox? Any one tried?
 

Charles

Member
Licensed User
Longtime User
I have gotten VMWare to run on Ubuntu 14.04 and I think I like it better than virtualbox. Virtualbox is more suited to desktop virtual machine while vmware is more enterprise level according to the reviews I've read. Not that I'm an enterprise guy but since it works and is supposed to be more stable under heavy traffic it might be a better choice for running B4A. Vmware is not on canonical but it can be installed manually with persistence and patience.
I haven't done a lot of testing but I think it will actually use windows drivers. As of today I have my Asus B85M motherboard cpu drivers installed and have not run into any issues. I'm thinking I might try installing the video drivers and see if I can get hardware acceleration working.

Windows 7 on Asus B85M mobo with 8g ram and i5 4690 cpu.

BTW Barko, are you worried about using WinXP? Since it's no longer supported it may be a security risk. I use GWX console to root out the spyware on windows 7.
 

barko

Member
Licensed User
Longtime User
BTW Barko, are you worried about using WinXP? Since it's no longer supported it may be a security risk. I use GWX console to root out the spyware on windows 7.

It's OK. For me at least. I'm use WinXP under virtualbox for many years. No problem at all. Virtualbox + WinXP = very fast loadings, that is all what I need.
 

Charles

Member
Licensed User
Longtime User
Barko:
You may want to look at untangle or sophos home UTM. It's a unified threat management appliance that will filter your internet before it gets to WinXP. I have it running in virtualbox client on Ubuntu 14.04 host. The hardest part is getting the network cards isolated but it gives me an extra layer of security. I use untangle and it runs nicely on an old dell core2 duo 2.8ghz. I started out with a cheap intel single core and worst case was 70% cpu load. Now with the core2 duo I rarely get over 20%. I have 4 users on my home network and have never bottle necked. Oh, ya, they're both free for home use. Either one will require an extra network port.
 

Dragon68

Member
Licensed User
Longtime User
I really wish B4X went cross platform via being written in B4J. That's really the only thing holding back professionals from using it.
I partly agree with this, a cross platform tool that can't be used cross-platform is bad, so I hope Ariel can port B4A to Linux using B4J as the bootstrap and leave .Net behind. I assume he uses .Net for the B4A IDE, the rest can be ported easily. Given the B4A IDE is not that flash I would guess he can port it to Java quite easily.

But whatever market share B4A has now, I don't think it will get bigger by supporting Linux developers, rather by supporting Windows developers to move to Linux (which I'm guessing many want to do, but are limited by tools).

I gave up Windows 2 years ago and migrated everything to Linux and open source. The only issue I have now is the stability of B4Av5, which has been tremendously difficult to get working on Linux Ubuntu, whereas previous versions were quite simple. I'm going to put instructions and a checklist on this post to help anyone who wants to migrate to Linux, but it's not stable and getting trickier as Arial has used .NET 4 features that don't play well with Wine and require at least Windows 7, it get complicated.

The irony is that while B4A targets Android, which is a Linux based system, it has no support for Linux itself. And the JavaSDK used by B4A is quite old and unsupported by Oracle, no further developments either. If you're on Linux you can use Android Studio with OpenJDK and never have to touch Oracle JDK or Microsoft .Net. Porting B4A to linux would be a major change in direction for Arial, but I think it needs to be done eventually to make B4A stand out from the crowd.
 

Dragon68

Member
Licensed User
Longtime User
As someone mentioned previously on this forum, there are a few things Arial could initially do to support B4Av5 on Linux that would make our lives easier. They are

(a) Support the use of Linux Android SDK from within B4A

(b) Support the use of Linux Open JDK from within B4A. As I assume the calls to these modules are command line calls and not Windows COM interfaces, it would be trivial to make the same calls in Linux via bash scripts. Getting the results back would be another issue.

(c) Getting B4A to interface with the Android emulator on Linux, same way that Android Studio does, but even better, to interface to a USB connected Android device on Linux, which it can't do at the moment. I use the B4A Bridge over Wifi to debug.

The alternative to the above is to just redevelop B4A from scratch in Java/B4J and run native on Linux.
 

Dragon68

Member
Licensed User
Longtime User
And before people give up trying to install B4Av5 on Linux, which I hope they don't, because it's so much fun using B4A on a real operating system, here is a checklist of files that you need to copy from Windows or install in POL to get B4A working in Linux.

-Wine must be set to Windows 7

-In PlayOnLinux install gdiplus, msxml6, FontSmoothRGB, msvc100

-In PlayOnLinux install built-in Wine package for 'dotnet45' (this will install all earlier dotnets .net2.0 all the way up to .net4.5, make some tea!)

-In Wine, set the following libraries
* fusion (built-in)
* gdiplus (native)
* mscoree (native)
* msvcr100 (native,built-in)
* msxml3 (native)

If B4A crashes or won't start, check the POL debug information, it's all in there!

-Optional (Missing Library Error): reinstall POL component MSVC100 after 'dotnet45'
-Optional: MSCOREE.DLL, copy file from windows installation
-Optional: UXTheme.dll, copy file from windows installation (as POL may only contain a stub of this file).

In PlayOnLinux, install JavaSDK 7.79 (non-listed program), choose "Dev Tools" (not JRE/Source)
file is named "jdk-7u79-windows-i586.exe"

Possible JDK Errors:

"Error occurred during initialization of VM Unable to load ZIP library: C:\Program Files\Java\jre7\bin\zip.dll"
Copy files [zip.dll] (from JDK install CAB file) to location 'C:\Program Files\Java\jre7\bin\xxx'

"Exception in thread "main" java.lang.UnsatisfiedLinkError: no awt in java.library.path"
Copy files [awt.dll] (from JDK install CAB file) to location 'C:\Program Files\Java\jre7\bin\xxx'

PlayOnLinux: install AndroidSDK v24.3.4 (non-listed program) using "Install" button
file name: "ADK-installer_r24.3.4-windows.exe", install for everyone to "c:\android-sdk\"
(a) Create shortcut to ADKManager.exe, SDKManager.exe
(b) Run SDKManager and download API kits

Final Step
Overwrite "drive_c/android-sdk/tools/android.bat" with my custom "Android.bat"

The final step is getting Android SDK working properly, as the Android.BAT is designed for Windows DOS commands, we need to modify it to run on Wine (which has limited support for DOS commands) and change paths to Android SDK. I will post this file later, here are the main parts.

set java_exe=C:\Program Files\Java\jdk1.7.0_79\bin\java.exe

rem HARDCODED CALL
call "C:\Program Files\Java\jdk1.7.0_79\bin\java.exe " "-Dcom.android.sdkmanager.toolsdir=C:\android-sdk\tools" "-Dcom.android.sdkmanager.workdir=C:\android-sdk\tools" -classpath "lib\sdkmanager.jar;lib\swtmenubar.jar;lib\x86\swt.jar" com.android.sdkmanager.Main

Good luck.
 
Last edited:
Top