Skip to content
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

Other platforms #40

Closed
174n opened this issue Apr 4, 2018 · 25 comments
Closed

Other platforms #40

174n opened this issue Apr 4, 2018 · 25 comments
Labels
help wanted Extra attention is needed

Comments

@174n
Copy link

174n commented Apr 4, 2018

Why isn't this app available for other platforms (linux/windows)? It was made using electron, so it can be cross platform

@stefansl
Copy link
Owner

stefansl commented Apr 4, 2018

I know, but I don't want to install wine or a virtual box on my mac. A pull request would be nice :)

@stefansl stefansl added the help wanted Extra attention is needed label Apr 4, 2018
@jancborchardt
Copy link
Collaborator

@stefansl I’m using Ubuntu 17.10 and am happy to help building this app as it’s suuuper useful for me. :) (Thanks for supporting png and also svg!)

The npm run pack-linux runs and the app works nicely. How can I contribute the build – do I submit a zip of what’s in the folder Image Shrinker-linux-x64 somewhere?

@stefansl
Copy link
Owner

stefansl commented Apr 6, 2018

@jancborchardt nice! i never expected, that it will run without additional coding. i could add you as contributer, if u want. then you could add the file here:
https://github.com/stefansl/image-shrinker/releases

@jancborchardt
Copy link
Collaborator

@stefansl hehe, at least it does seem to work from initial testing. :) And sure, am happy to be added & to add the Linux releases.

@174n
Copy link
Author

174n commented Apr 6, 2018

@jancborchardt oh, I didn't know it's so easy to compile, didn't read the readme xD

@jancborchardt
Copy link
Collaborator

@stefansl sorry for the delay! :) I’m looking into it again, but I discovered an issue while using it regarding the loss-amount of the compression: #42

@jancborchardt
Copy link
Collaborator

@stefansl built with latest master and uploaded the zipped build in the release, also adjusted the release title and content accordingly. :) https://github.com/stefansl/image-shrinker/releases/tag/v1.3.6

This is what’s generated, and showing that it’s working:
screenshot from 2018-05-31 04-00-59

The terminal just shows that of course when you move the main executable it will not work. Is there a way we can achieve a packaged file? Will look into if it’s possible to build a .deb file somehow.

@jancborchardt
Copy link
Collaborator

jancborchardt commented May 31, 2018

There seems to be https://github.com/unindented/electron-installer-debian for just that, and a guide at https://www.christianengvall.se/electron-packager-tutorial/ – will try that out the coming days.

@stefansl
Copy link
Owner

@jancborchardt Thank you very much! Nice work! I guess we just have to adjust the package.json in the section "build" and we need some new top-level-sections, eg. "deb", "rpm", "appImage"
We can use electron-builder, then. See the doku here: https://www.electron.build/configuration/linux

checkout https://www.electron.build/cli as well. or try electron-builder --help

you can see, how I'm building it in the package.json here:

"dist": "electron-builder --publish always"

maybe I've to adjust it to build-mac: "electron-builder --publish always --mac"

@JadedBlueEyes
Copy link
Contributor

i'd rather like it for windows, so i'm gonna build it for myself. do you want a copy to put in releases? 😉

@JadedBlueEyes
Copy link
Contributor

JadedBlueEyes commented Jul 17, 2018

my build has been successful using npm install&&electron-packager . Image-Shrinker --asar=true --platform=win32 --arch=ia32 --ignore=/^release/i --overwrite! 🎉

image

image

unfortunately using electron-packager . 'Image Shrinker' means that the created executable is called 'image, strangely.

also, setting the icon with --icon=assets/icons/png/512x512.png or --icon=assets/icons/png/512x512 means it fails with the error

rcedit.exe failed with exit code 1. Cannot open icon file 'a'
Fatal error: Unable to set icon

@JadedBlueEyes
Copy link
Contributor

JadedBlueEyes commented Jul 18, 2018

with some changes, I've managed to fix the icon issue and remove the (ugly) top menu.

new build line is npm install&&electron-packager . Image-Shrinker --asar=true --platform=win32 --arch=ia32 --ignore=/^release/i --overwrite --icon=assets\icons\ico\[email protected].

the mac menu should stay, not sure about Linux. that can be changed with line 23 of mainmenu.js

image

should i launch a PR with my changes?

@JadedBlueEyes
Copy link
Contributor

i'm also wondering about using electron-installer-windows to create a installer?

@stefansl
Copy link
Owner

@derpmarine168 yes, please! another good option is to use electron-builder https://www.electron.build/

@JadedBlueEyes
Copy link
Contributor

working on it.

@JadedBlueEyes
Copy link
Contributor

JadedBlueEyes commented Jul 18, 2018

if my internet goes above 20KiB/s. 😉

@JadedBlueEyes
Copy link
Contributor

JadedBlueEyes commented Jul 19, 2018

sorry it's been taking so long. I've had to leave to do some other stuff, and now i'm done my git's died.

>git clone https://github.com/stefansl/image-shrinker.git
Cloning into 'image-shrinker'...
fatal: unable to access 'https://github.com/stefansl/image-shrinker.git/': error setting certificate verify 
locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

even using http:// is no different.

@jancborchardt
Copy link
Collaborator

@JadedBlueEyes
Copy link
Contributor

JadedBlueEyes commented Jul 21, 2018

i have got the pull request: #44

also, @jancborchardt that article didn't work. none of those files even exist on my pc!

i'd rather not add the installer directly to the git repo, but i can upload it to releases if you add me as a Collaborator.

@despecial
Copy link

@JoelEllis did you release the window version anywhere? Thanks for the effort!

@JadedBlueEyes
Copy link
Contributor

@despecial I did release a build on my fork, but it is now 52 commits behind, however I think you can build it yourself from master now.

@despecial
Copy link

@JoelEllis thanks, I dont have a windows machine - not sure if I can build it on a mac?!
It's for my friends, they use MS.

@stefansl
Copy link
Owner

stefansl commented Oct 7, 2019

@despecial I think you have to use a virtual
Machine with Windows installed. That’s why I don’t build the Win version

@stefansl
Copy link
Owner

With electron-builder it's possible to create versions for all platforms easily. I have to test this and I'm planing to remove electron-packer, because it's deprecated.

@stefansl
Copy link
Owner

see #56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants