Is it possible to build a React-Native app for Windows in Linux? - linux

Last Thursday I was asked to code fairly small app for an Android device and I went with React-Native. The app is now in the testing phase (it's really small) and I was asked again if we could also deploy the app on a Windows machine.
I code exclusively in Linux, but I also know about NW.js which does produce an output for both Linux, Mac and Windows regardless of the environment, so I said : "Sure! I'll see what I can do!"
But reading the react-native-windows' documentation, I'm not sure if that's possible. At least it is not clear to me.
So the question is not really "can it be done?" but rather "how can it be done?" I could request a Windows machine if I have to, but if I can avoid it I'd rather not go there because that would mean maintaining two computers where one'd be used only for that purpose, etc.
Edit : Basically, I am wondering if it is possible to generate an executable JAR archive of a React-Native project which then can be launched from any Java-supported desktop computer.

Related

How to configure Mabinogi to run in Lutris?

I'm attempting to play Mabinogi by Nexon on Linux Mint 20 (Ulyana) using Lutris. I've previously used Lutris to play Heroes of the Storm but otherwise don't have much experience with it (or with gaming on Linux, in general). There's no installer on the Lutris website for Mabinogi like there was for Heroes of the Storm, so I was on my own to try and figure everything out.
What I've tried
I started by downloading the Nexon Launcher Installer from their website. I configured Lutris to launch this executable using Wine within a simulated Windows environment. When it first launched I noticed several files were created ("drive_c", "Program Files", "Users", etc -- mimicking a Windows file system). The launcher installer ran without issue and I installed the launcher to "C:\Program Files (x86)\Nexon"
I then re-configured Lutris to try and launch the Nexon Launcher instead of the Nexon Launcher Installer. When I hit "Play" in Lutris, nothing happened. Running ps -ax | grep "Nexon" showed that it was theoretically running, but there was no window or visible UI even after several minutes of waiting. I checked the Lutris logs and noticed a message about a file missing (something like "10000.manifest.hash"). I Google'd this error and found plenty of people in Windows who had trouble running the Nexon Launcher with the same error, and the solution was to just install Mabinogi through Steam.
So next I downloaded the "Wine Steam" runner in Lutris and set this as the runner for Mabinogi, plugging in the app ID (212200). After Steam installed, launched, logged in, and downloaded Mabinogi I tried to launch the game. This time I saw a window pop up saying "Mabinogi is launching" and in the bottom-right the Nexon Game Security icon popped up, but then everything closed and the game never started.
Finally out of desperation I tried setting up a virtual computer using VirtualBox to play the game in its native Windows environment. I installed Windows 7 (the minimum required version according to the Nexon website). I downloaded Mabinogi through Steam on the virtual box. Upon trying to launch Mabinogi, I received the error error: "api-ms-win-crt-runtime-l1-1-0.dll is missing". I'm curious if this error is related to why I couldn't get Mabinogi working in Lutris.
Looking at a game that I had previously played in Lutris (Heroes of the Storm), I noticed a very similar DLL was listed in the "DLL overrides" section: "api-ms-win-crt-private-l1-1-0.dll". So I tried adding the runtime DLL to the overrides in Mabinogi with the same value ("n,b") - but this didn't work.
Looking at the Lutris logs when I try to launch Mabinogi through Wine Steam, there are several errors from \main\game-launch.js:109. I'm not sure if this JS script is part of Lutris of part of the Nexon Launcher, but it could provide some hints. Among the logs the following lines stand out as potentially meaningful:
...
ERROR: ld.so: object '/usr/$LIB/libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
...
fixme:d3d12_get_vk_physical_device: Could not find Vulkan physical device for DXGI adapter.
fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2560, may be inaccurate.
...
warn: OpenVR: Failed to locate module
...
What I don't know
I'm not familiar with using Wine and I've never written a Lutris installer. Up until now I've only ever run Linux binaries on Linux and Windows binaries on Windows. So there's a lot I don't understand, like: What's Vulkan? What's DXVK? How do "override DLLs" work? Do I need to provide alternative DLLs for anything I want to override? What does the value "n,b" mean in the DLL override?
I'm welcome to any help
After a lot of work and research, I've gotten as far as I can and figured out where the major road block lies. The simple answer is: You cannot run Mabinogi in Lutris
Mabinogi uses an anti-cheat system that runs in kernel mode (ring 0). Wine runs in user mode (ring 3) and therefore cannot run this anti-cheat program.
The only solution is to play Mabinogi within a virtual machine (e.g. VirtualBox), since VMs run on a hypervisor (which from my understanding is kind of like a "negative" ring number, but effectively ring 0)
If you want to try some other Nexon games, I got the Nexon Launcher working in Lutris / Wine fairly easily. The trick was to download the latest Nexon Launcher since the older one (linked on the Mabinogi website) isn't sending a valid request to download the manifest file so it gets a 403. The latest launcher can be downloaded here: https://games.nexon.net/nexonlauncher

Discover file references with wrong casing, because of case-sensitive file system

I am developing an application on .net core on my windows machine.
The app is running on a docker container with the microsoft/aspnetcore-build:2.0 image.
Everything seems fine on my computer, even when it is running in the docker container. The problem appears when it is deployed, where it is running on the same image, but on a linux instance.
for example a reference with wrong casing doesnt work.
reference: ´../Components/Car´;
actual filename: car
This will work on Windows, but not on linux.
This is because the linux file system is case-sensitive while the windows is not.
This happens for backend and frontend apps. Is there a way to circumvent this issue or find the issue earlier in the development cycle? Is there a frontend and/or backend developer tool for this stuff?

Creating a executable linux (e. g. LAMP) virtualization for windows?

We are developing a web application in TYPO3 Flow for one of our customers. Usally it should run on a web server over the internet, but there should also be an offline version for windows.
Our customer would sell this application with the two versions, on the web server it's combiled/crypted with Zend so his customer isn't able to change the code or anything like this.
Our idea for the offline windows application is, that we create an executable linux virtualisation with an installed apache and maybe with an pre-installed browser. So the user only starts the executable and the package will start with the browser pointing on the webapp.
Is there any solution, I think something like VMWare ThinApp (but I think this it's only for windows applications)?
Or you can build a bootable USB stick based on a linux distribution, with a custom version of some distribution like webconverger, but the user must reboot to use it.
Or you can customize a Virtual Box image, based on Turnkey Lamp Stack per exemple, but the user must have a copy of Virtual Box (that's free).
How do you wont to deal with data persistence ?

From PHP (LAMP) to Classic ASP, how to setup a dev environment

I'm jumping into updating a Classic ASP web app coming from a PHP background and am trying to get my bearings. I'm used to just installing something like MAMP, messing the httpd.conf a bit and getting on my way.
Ideally, I would like to be able to edit this app completely locally on my Macbook Pro running OS X Leopard so that I'm not messing with my client's server too much. Now, if I need to I'm willing to install Windows 7 via Boot Camp or running it as a virtual machine. Of course my preference is to stay completely in OS X, but I have my doubts about that possibility. So, how should I go about this?
One thing to note is that once I'm done updating this ASP web app I will have to make changes to a VB(.NET) application as well, so I'd like to have to change my virtual workspace as little as possible when that time comes around.
As you say, you will need to install Windows via Boot Camp or VM (your choice).
Once in Windows, you can install Visual Studio 2010 (Express free), where you can edit your ASP Classic files, and you will have it already installed when you need to do VB.net
Do not forget to install IIS when you install Windows (you will need it to run ASP Classic)

How a Windows Developer can most easily get his software to work well under Wine

Many of my users have been telling me that they'd like to run my software on their Linux machines under Wine.
But I'm a Windows Developer who has practically no experience with Linux.
Now I could spend a month or two installing Linux, learning Linux, installing Wine, learning Wine, and thoroughly ensure my application runs well under Wine. But I am still developing for Windows, so I don't want to take so much time away from development right now.
So what can I do without too much effort to get my program running as well as possible under Wine?
I did find this General help on running applications under Wine.
Download VMWare and an Ubuntu virtual machine (Ubuntu is a popular Linux distribution) from the VMWare site. This will provide you with a working Linux O/S inside your Windows environment without needing to install Linux manually.
You can then use the instructions here to install Wine, that Wiki page also provides you with some instructions on how to use it.
If you follow what Adam Rosenfield suggested and just try running your application in Wine unmodified, you will be able to determine quickly whether there are problems. My guess would be that there are some, otherwise your users would not have contacted you about it :)
There are many ways for getting help with debugging applications in Wine, consult the website for options and pick a few ways that suit you. As always, it's best not to rely on a single channel for communication.
Also, if you are more comfortable with developing in Windows, the approach of using a virtual machine will allow you to compile your code as usual in Windows and copy the binary into the virtual machine for testing (Ubuntu supports browsing/mounting Windows shares).
As long as you're not doing anything unusual such as playing around with hardware or poking around in undocumented API calls and data structures, you should be able to run your code under Wine with few or no modifications. Wine has a fairly complete implementation of the public Windows APIs, so if your program plays nice and doesn't mess around, it should just work.
Don't use too much of the windows API! Don't use anything new from Microsoft ;)
Avoid using WPF is the #1 suggestion.
But it really wouldn't kill you to test your app under Wine. It's not that hard to try; it certainly won't take months. For instance:
Use http://www.ubuntu.com/getubuntu/downloadmirrors#wubi to install
Ubuntu into a file on your Windows machine, then start ubuntu and install the latest Wine from
http://winehq.org/download/deb
Then try running your app's installer.
If it doesn't work, check the Wine FAQ, ask for help in one of the wine forums, and/or file bugs in wine's bug tracker.
Should take about three hours from a dead start to trying out your installer.
I was rather surprised when one of my Delphi5 applications just worked out of the zip.
The only real way this is going to work is to do it yourself, i.e. install vmware and a linux distro as Sean suggested. Linux isn't actually that hard, and we're all here to help.
Having done a quick test I can confirm that it largely works. There is an ACCVIO reading 0x34 during start up, the error dialog can be ignored and the application runs, I opened the Steve McCarthy GEDCOM.
Screenshot
This was using Wine 1.1.12 under MEPIS 7.9.94-rc1_32 under VMWare. Highly recommend to use VMWare for this sort of thing.
What language/platform do you develop with? Depending on which it is, it should be no trouble to get it running native. For example, if you use Java or Python, both operate very cleanly on Linux. Likewise, if you're a .NET developer, you should be able, with some pain, to get your app running in Mono.
Find Linux beta testers. It can reports a bug to WINE developers or find a bug in your application.
Wine is more sensitive to errors than Windows. For example, Wine will crash on NULL window handles, and fail to create windows if the class is invalid, whereas Windows is more robust and will just circumvent the error.
It's an opportunity to clean up your code.
I was amazed at how well Wine ran my app the first time I tried. However, I had to get rid of a third-party driver-based component.

Resources