For Tauri+Vue development, can I generate Windows exe on Ubuntu dev env? - exe

I'm playing Tauri+Vue development on an Ubuntu box. I clone a small project from https://github.com/DominusKelvin/nota-web, it built out 2 files as below,
* /home/abc/nota-web/src-tauri/target/release/bundle/deb/nota_0.1.0_amd64.deb
* /home/abc/nota-web/src-tauri/target/release/bundle/appimage/nota_0.1.0_amd64.AppImage
Actually I want a windows exe file, is it possible to build out an exe file here? or do I have to do the development on a Windows machine?
Thanks & Regards,
Martin.

To answer your question, it's not possible yet to cross-compile a Tauri application. (Example, building a Windows artifact from a Linux machine)
The best would be to use Github Actions to build it for you.
Tauri have a pre-built action, ready to use.
You can find some examples here;
https://github.com/cloudflare/workerskv.gui/blob/master/.github/workflows/release.yml#L59
https://github.com/Levminer/authme-lite/blob/dev/.github/workflows/release-artifacts.yml#L35

Related

How to use git to do version control when I edit my code in Windows but build and run my code in Linux (using pycharm)

I have a question that I edit my code using PyCharm in Windows platform, and build and run my code in Linux machine, I want to know what is the correct way to do version control using git? My current approach is
using git in Windows
build and run code in Linux
checkout different branches in Windows and upload code to Linux(and not upload binary files such as .o files and .so files)
I'm not quite comfortable with this approach so I want to know the better ways. Thank you!
and upload code to Linux
If your Linux machine is accessible through SSH (and has Git installed), a better option would be to git push your code to your Linux machine, using a:
bare repository
a post-receive hook to checkout/restore your code where you want on said Linux server.
You can see an example here.

How to develop Linux + Windows application with WSL2 and Visual Studio C++ 2019 using the same vcpkg dir?

recently I started to use WSL & vcpkg, but it has some problems when mixing windows + linux development.
It seems like that installing Linux packages or Windows packages with vcpkg, mutually damage the vcpkg configuration and then vcpkg roughly says: "the package you want to install doesn't exist". (I know for sure that it exist)
If it matters, the project is located in the windows "world" so the WSL directing to it with /mnt/c/Users//workspace/proj1
but it really doesn't matter.
Does Anyone already encountered this problem?
Am I doing something wrong?
Is there a better way to develop a cross-platform project?
Thanks
So I post it to help anyone who have doubts about it:
Don't mix WSL project with windows project because it will force you to work on the windows filesystem from WSL. (WSL can work on the windows filesystem with /mnt/)
anyway, It will both corrupt the vcpkg and the overall compile times will be horribly slow from linux filesystem (usually ext4) to the windows filesystem (NTFS).
this is my original post in the Github:
https://github.com/microsoft/vcpkg/issues/13948#issuecomment-706625438

How to make self-contained or java-bundled JavaFX application package for ARM

Where could I acquire a working copy of compiled JavaFX app bundled with JRE so I could execute this app on ARM linux?
or
How can I create my JavaFX app + JRE bundle that would work on ARM Linux
Best case scenario for me would be to be ableto create copy-paste enabled folder tree or single executable file..
I do understand that this question might be too vague, but I desperately need some help on this. I have spent more than 6 evenings + 2 nights searching how to get a compiled JavaFX application ( .jar file) to run on ARM linux on UDOO (RPi2-like) board.
I have been more of an .NET guy a long time, and now I had to make WPF-like rich UX app that would run on this specific hardware, and I chose JavaFX due to its likeliness to WPF. It does run fine on my desktop PCs but I absolutely can not get it to run on ARM linux.
I am trying to do this too. Did you get it working? My solution is to package the JAR using tools provided by IntelliJ or any other IDE, include the JRE in a folder within the app, then write a script that invokes the JAR from the included JRE like:
lib/jre/bin/java -jar runthis.jar
I also tried it for two days now but didn't get it to work.
I use maven in combination with the javafx-maven-plugin to build native installers of an application.
At first I got the error, that the javafx-ant.jar tools are missing:
[ERROR] Failed to execute goal build-jar(create-jfxjar) on project foo:
Execution create-jfxjar of goal build-jar failed: Plugin javafx-maven-plugin or
one of its dependencies could not be resolved: Could not find artifact
javafx-packager:javafx-packager:jar:1.8.0 at specified path
/opt/jdk1.8.0/jre/../lib/ant-javafx.jar
Then I found the ant-javafx.jar in a windows JDK but then another error was reported that linux is not supported with this one. Ok so I downloaded a linux JDK and used that ant-javafx.jar. Now it could build and create a *.deb file successfully!
However when I started the installer it failed with a message and when checking the log (/var/log/apt/term.log)
Log started: 2021-04-29 00:40:01
dpkg: Error creating archive
/home/pi/Foo/target/jfx/native/foo.deb (--unpack):
package architecture (amd64) does not match system (armhf)
Then I did research and found the following mailing list entry:
[...] the Java Packager isn’t shipped with any ARM builds that I’m aware of. Currently it is only for X86 Windows, Linux and Mac. [...]
This basically explains it: The packager doesn't work on ARM for now. Maybe we should write the guy to encurage him to add it...
=> So for now I work with the jar directly.

Nightly builds for Windows on Linux

Is there a system I could implement on Linux(Debian) to have nightly builds from a github repository targeted to windows(.exe files)?
I know programs like CCNET and TeamCity but they are for windows.
Currently we use Visual Studio 2013 to build our project(We also support Code""Blocks but dont recommend it).
This is how we do it:
Run Jenkins on Linux (Ubuntu)
Run build slaves on several WinXP systems to build the code, this can even be done on your own laptop for example. Of course you need to leave it on overnight.

TideSDK app on Mac

I developed an app via TideSDK on OSX. I have a .app and It is working on OSX. However, you know it cannot work on linux or windows. I want to run my app on linux or windows. How can I do that?
In short, you package for each platform. As you are aware mac apps do not run on Windows and it is the same with TideSDK since you are creating something native for each platform.
TideSDK must be installed on each platform to create an executable and bundle for it.
To generate an installer for each system, you need to run commands on each system (windows / linux 32bit / linux 64bit) using tidebuilder.py on the command line.
We will have more to speak about concerning packaging quite soon that will make the task of building and distributing your apps easier. Stay tuned for updates !!

Resources