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
Improve deployment and fix AppImage #671
Conversation
This implementation removes a dependency on a third-party library. It ensures that the child process properly detaches. In comparison to the previous implementation, this new setup is compatible with AppImages. (Before, the AppImage runtime process exited prematurely.)
@@ -71,14 +69,16 @@ def get_single_instance_port(): | |||
sys.stderr.write("Warning: Cannot determine session ID. please report this.\n") | |||
return port | |||
|
|||
# if Visicut or Inkscape cannot be found, change these lines here to VISICUTDIR="C:/Programs/Visicut" or wherever you installed it. | |||
# if Visicut or Inkscape cannot be found in PATH, change these lines here to VISICUTDIR="C:/Programs/Visicut" or wherever you installed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501: line too long (139 > 79 characters)
❗❗ 5 similar findings have been found in this PR
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
tools/inkscape_extension/visicut_export.py | 80 |
tools/inkscape_extension/visicut_export.py | 349 |
tools/inkscape_extension/visicut_export.py | 355 |
tools/inkscape_extension/visicut_export.py | 356 |
tools/inkscape_extension/visicut_export.py | 368 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
VISICUTBIN = which("VisiCut.exe", [VISICUTDIR]) | ||
else: | ||
VISICUTBIN = which("VisiCut.Linux", [VISICUTDIR, "/usr/share/visicut"]) | ||
if not VISICUTBIN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E305: expected 2 blank lines after class or function definition, found 1
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
This automatic "review" is mostly nonsense. I just moved code around. I do not intend to fix less-than-optimal code from before in this PR. This can be done in future PRs. |
Looks good to me at first glance. You forgot to chmod +x the distribute-docker.sh, but that's a minor. |
Pretty much my thoughts as well. I'll drop them in a commit. We can rebase before merging. I'm not sure how popular the |
Also your version detection won't work because it's not in the project directory. We should sourround it with pushd/popd |
Not sure. I don't think we are popular enough that any debian/ubuntu distro will include visicut, so people will need packages. I am not sure how good app-images feel to fresh-installed ubuntu users. My goal was to make visicut downloadable and runnable for the average user of any popular OS in the most standard way. I did not yet try to download and run the appimage on a fresh ubuntu VM, but if that feels smooth enough, we could drop it. |
Ok. Now I have to look at my automated build server. I guess there are some things to fix with the new distribute script, but today is too late/early. Thanks for your contribution. |
Well, that was unexpected.
Just need to ask, I guess. If the packaging process was be smoother, I think they wouldn't mind. Debian for instance has got some experience with shipping Java-based packages. Anyway, I'm certainly biased, being a maintainer of the AppImage project and author of many tools around it. We should discuss those things in an issue. Feel free to ping me if you need input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this was already merged I still have some suggestions and comments. Glad to see that things are going forward!
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# note: don't build with OpenJDK > 16, as this is the runtime we ship |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our DEB package indicates that it is also compatible with Java 11:
--requires 'bash,openjdk-11-jre\|openjdk-17-jre,potrace' \
Java supports backwards-compatible compilation, depending on some setting in the maven file. https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please feel free to change this. I don't see a reason not to use OpenJDK 11 at this point, as it is still a supported release as far as I can see.
@@ -71,14 +69,16 @@ def get_single_instance_port(): | |||
sys.stderr.write("Warning: Cannot determine session ID. please report this.\n") | |||
return port | |||
|
|||
# if Visicut or Inkscape cannot be found, change these lines here to VISICUTDIR="C:/Programs/Visicut" or wherever you installed it. | |||
# if Visicut or Inkscape cannot be found in PATH, change these lines here to VISICUTDIR="C:/Programs/Visicut" or wherever you installed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intended meaning was: "If the extension tells you that it can not find VisiCut or Inkscape, change these lines to where your VisiCut or Inkscape is." The target audience does not necessarily know what "PATH" is.
Regarding the need for a DEB package: As far as I know, it is the cleanest and best integrated installation method we can offer on Debian/Ubuntu. No need to bundle the JRE, which depends on processor architecture, Inkscape still has a whole bunch of issues with AppImage, so I expect that we will also have some issues and need the DEB package as a reliable fallback option. |
This may have been merged prematurely.
None of which affect third party tools packaged as AppImages themselves. As said, the Inkscape extension is working just fine with the AppImage now.
All the experience I have collected since I joined AppImage in 2017 (and having been a full-time open-source developer for years now, too), I can tell you that this is neither clean nor that bundling a JRE is a problem. I'd rather build different kinds of AppImages (which is really easy, too, the JRE bundles provide AArch64, too). Not every institution who want to use VisiCut on Linux use Debian or derivatives. For instance, two labs I know prefer openSUSE resp. Fedora. But let's discuss the AppImage vs. native packaging question in a new issue. I'm sure that, if you try an AppImage built by the new set of scripts, you'll like what you see. I'll send a follow-up pull request. I might make |
Contributes to #565, #670.
This pull request rewrites
distribute.sh
to make it easier to use, introduce building in temporary directory (to isolate build processes from one another), allows users to choose which distribution formats to build for using CLI parameters, and a lot more improvements. It also adds AppImage as an output format by integrating the previous appimagecraft setup). The AppImage also now contains a fullvisicut
directory like the other setups, which means the extensions can be installed.Along with the new/updated script, a Docker build script is shipped that allows for building all of the target distribution formats on any platform. The image uses Debian as a base, which ships all the necessary tools (NSIS,
makepkg
,checkinstall
etc.).The Arch Linux stuff doesn't seem to build in the new Dockerized setup, but it's up to someone else to test and fix that.
In my opinion, this project should focus on portable formats like AppImage and drop support for hacks like
checkinstall
or distribution-specific formats. Third parties can maintain distribution-specific formats, either upstream or as part of user repositories (AUR, Launchpad, ...). Let's rather make the AppImage a flawless user experience, so issues like #621 won't ever have to be worked on. The less complexity, the better.The Inkscape plugin probably needs quite a bit more love (there's lots of old Python 2 style code, and overall it seems a bit messy), but it works now when installed from an AppImage, which is a great improvement.