-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Potential Windows/Linux builds #2
Comments
Ignore me I see it in the future plans |
I'll reopen this issue, I'm happy to track and discuss the Windows/Linux versions here. Can you test on Linux? I actually would expect it to just work on Linux. I can put up a build if you can test it... or you can build it yourself: Install yarn, then:
|
Yes, I can test it on both Linux (Ubuntu and Fedora) and Windows 10/7. I'll give it a shot building - might be at the weekend though. |
Made a quick stab (I'm running Ubuntu 18.04). I get the following error, I'll do some investigating why I get it but recording it here:
|
Hmm - that looks like it's trying to build the dmg for mac.
|
Thanks! Ah yes, remove the I'll push a fix with that shortly. |
Progress, but still fails:
The only concrete error I see is this:
|
Oh this looks like it might be more of the issue:
|
Can you try replacing to the following?
|
I'm giving that a try now - it failed with the basic array of fileAssociations, but I guessed the same as you've just put there with the array of objects from the errors you get. That works! |
This is what I have in the "build": {
"appId": "com.panwriter.app",
"fileAssociations": [
{ "ext": "md" },
{ "ext": "markdown" },
{ "ext": "txt" },
{ "ext": "html" },
{ "ext": "docx" },
{ "ext": "odt" },
{ "ext": "tex" }
],
"mac": {
"fileAssociations": [
{
"ext": [
"md",
"markdown",
"txt",
"html",
"docx",
"odt",
"tex"
]
}
]
}
}, |
Generaes a runnable AppImage for me:
|
Haha awesome! Looks like we don't need the And you can drag and drop txt and html files on the app icon as well? |
Okay, so since the dragging on the application window works, the Also, there should be an app icon. I don't quite get the documentation, maybe add to
Edit: ah, or maybe we need to add |
Tried various options, it seems like you do need the
I've tried adding a few extra options, in theory it's the Desktop config that needs setting, but none of them have changed the Application icon that I get. This is my current "build": {
"appId": "com.panwriter.app",
"icon": "build/icon.png",
"files": ["./build/icon.png"],
"fileAssociations": [
{ "ext": "md" },
{ "ext": "markdown" },
{ "ext": "txt" },
{ "ext": "html" },
{ "ext": "docx" },
{ "ext": "odt" },
{ "ext": "tex" }
],
"linux": {
"icon": "build/icon.png",
"desktop": {
"Name": "PanWriter",
"Icon": "build/icon.png",
"Comment": "Markdown editor with pandoc integration and paginated preview",
"Categories": "Utilities"
},
"category": "Utilities"
}
}, I've looked at the Linux Icons config and that suggests that the builder should just pick up the This was the most promising solution thing that I saw, which does also suggest the But there's quite a few open issues for getting Linux icons to work: https://github.com/electron-userland/electron-builder/issues?utf8=%E2%9C%93&q=is%3Aissue+icon |
Stole the desktop icon config from here: electron-userland/electron-builder#3404 |
You're saying you got the icon to work? Meanwhile, I pushed some changes... |
No, just fumbling around :) Still trying to figure it out. |
I figured out what was knackering the icon - it was because I set I've managed to produce a "linux": {
"desktop": {
"Name": "PanWriter",
"Icon": "build/icon.png",
"Comment": "Markdown editor with pandoc integration and paginated preview"
},
"category": "Utility"
} This creates
|
That's progress! Yeah, the btw. so what is it building? |
It's building an Unfortunately
I'm pretty sure that none of these app icons are cached in some way - which it could be (and would knacker all my attempts). But it doesn't seem like it. |
I found a helpful Arch Linux wiki on the Desktop entries, which has
The
So I took a guess and created But I don't know how you then get that into the build process. |
Hm... information online is really sparse and contradictory... I can think of trying a few things:
|
From this comment on electron-builder/#748:
I hunted around in the For some reason it creates a 0x0 icon instead of an e.g. 256x256 icon. |
Get errors when running
|
So this problem appears to be that Windows can't find the
|
I made a stab at just overriding the binaries that chocolatey uses with downloaded ones from the psc-package releases page. Rather wonderfully the fixes they've done for v5.0.0 fix the problem and it now builds:
|
Doing some searching for
So possibly it's because |
I made another guess and added a "build": {
"appId": "com.panwriter.app",
"fileAssociations": [
{
"ext": "md"
},
{
"ext": "markdown"
},
{
"ext": "txt"
},
{
"ext": "html"
},
{
"ext": "docx"
},
{
"ext": "odt"
},
{
"ext": "tex"
}
],
"mac": {
"icon": "build/icons/icon.png"
},
"win": {
"icon": "build/icons/icon.png"
},
"linux": {
"desktop": {
"Name": "PanWriter",
"Comment": "Markdown editor with pandoc integration and paginated preview"
},
"category": "Utility"
}
}, Given that icon should be an optional config I'm a bit surprised. Anyway:
This builds the following files: It adds Panwriter to the application menu when you search for it, with the relevant icons too (you can see the application menu icon and also the taskbar icon): The downer is that the icon in the application itself is bizarrely cut off: |
I'm guessing you'll want the contents of the |
Wow, that's quite an odyssey! About the icon: can you try adding:
to build.win? |
Ok, I'll give it a try tonight. Also I'm uploaded the Linux builds to dropbox to: https://www.dropbox.com/sh/gaw96oik4ah6po8/AACD0tZP1_BfD2yqp_xs-_vxa?dl=0 |
With your changes to the package.json, I made a new release with Linux and Windows versions. Let me know if anything is broken in those... |
I just re-cloned your repo to a new directory and built from there. All went well For anyone building on Windows, they need to install the following chocolatey packages:
Obviously you can install via other methods but chocolatey makes it much easier on Windows. Currently the psc-package version (0.4.2) in chocolatey will be wrong and I'm not sure when the package gets updated. So they will have to download v5.1.0 from https://github.com/purescript/psc-package/releases/ until the chocolatey package is updated. What didn't work though was the icon fix. It's now worse because both the icon on the taskbar and the application icon are cut off. However there could be some problems around uninstall/re-install. I uninstalled Panwriter through the Windows uninstall menu. This appeared to work correctly - the icon was deleted from the start menu. However when I now try and re-run the new Actually, no. Now I see the difference, the |
Ah, so what's better for most Windows users? The installer or the exe? |
For Windows it's better to have the installer, that has the same effect as the linux AppImage file - it adds the program to the Start Menu so that you can just search for the name from there an run the program. I'll have a look around for the windows icon, but it's not so bad - the icon looks great everywhere except the small icon in the top-left corner. But it is annoying. |
I see, then I'll make the next release with the installer... we're getting there! :-) |
I've tried some experiments using a |
I tried running |
It seems the max .ico size it 256x256 in Windows... can you try this? Just created with macOS Preview... |
So another odyssey... it appears something to do with the transparency was causing problems. The short version is that using https://icofx.ro/ allowed me to create decent looking icons, here's a zip file of the ico file (https://www.dropbox.com/s/1kupo8nlrl5y415/icofx.zip?dl=0) that works. Plus I've put up the dist directory of the built Windows installer: https://www.dropbox.com/s/sw3duyqvfbvvvq2/dist-windows.zip?dl=0 I'll post the long version a bit later, not for any particular reason but just in case someone ever comes across this thread |
The long version is:
Issues of image quality from ImageMagick / macOS / AveIconifier. As well as the cut off icon issue there were major issues of quality for the different icon sizes for the 32x32 and 16x16, these two show the various options I tried.
In the following images, you can see that that Given that without the transparency I can get decent quality icons from ImageMagick and through icofx I can get equal quality icons but with transparency, there's possibly some setting that I'm missing in ImageMagick that will handle the icon conversion better, but after two days of trying I've given up. |
As a final attempt at being able to use free software, I gave paint.net + a plugin a try (paint.net used to be open source but they stopped a while ago). On my second attempt at this I got a transparent https://www.dropbox.com/s/qa9ti3x89xdixmv/paintnet_256x256_v2.ico?dl=0 You can compare |
Thanks! I've just added the fx icon to the repo... |
Finally got around to making a new release. This time with all the adjustments to the Linux and Windows files. Let me know if there are still problems, but closing this for now. Thanks again! |
@Venryx you're saying you still have issues with the icon on windows with the newest release and managed to fix it with a different icon.ico file? if so, feel free to make a pull request or upload the fixed file here... |
Oh sorry, no; my issue was the icon for my own program. I posted the solution above on this thread, because it's the one that was linked to from the generic problem thread for Electron. (will post future information on that thread instead) |
Haha, sometimes endless hours wasted with odysseys with icon file creation can be useful after all 😄 |
Hi there, this looks a great project. Seeing as it's electron based, is there a chance you'll release Linux and Windows builds?
The text was updated successfully, but these errors were encountered: