lloeki / matterfront

Mattermost frontend app for OS X, Windows and Linux
MIT License
152 stars 27 forks source link

Builds use the Mattermost icon. #22

Closed teetrinkers closed 8 years ago

teetrinkers commented 8 years ago

In #19, @H3Chief wrote that using --icon causes a build failure for the darwin platform. Is this still the case? I'm on OS X and `npm run build' runs fine for me.

LongLiveCHIEF commented 8 years ago

@teetrinkers what OSx version are you on? I just switched to 10.11, and with all the problems I've had with it, I wouldn't be surprised if it works fine on <10.11.

Either way, I have a better build system in development as we speak, but we just wanted a good place to start. The new system's PR should be in place by Thursday or Friday.

When complete, it should match up with the 1.1 release of Matterfront and I'll publish it to [npmjs.org/packages/matterfront]()

lloeki commented 8 years ago

@H3Chief works for me on 10.11 (and no issues so far overall). I was suspecting something may be busted on your system (like forgetting to run xcode-select --install and all those little annoying details).

LongLiveCHIEF commented 8 years ago

Probably. In the meantime, given the circumstances, I'm :+1: in favor of merging this one until I get the CLI and heirarchical config system in place.

LongLiveCHIEF commented 8 years ago

@teetrinkers @lloeki can both of you let me know what versions of node and npm you are on?

lloeki commented 8 years ago
> node --version
v5.0.0
> npm --version
3.3.9

Using homebrew, so I'm generally on latest stable.

LongLiveCHIEF commented 8 years ago

yeah, you're actually ahead of me. If @teetrinkers is as well, then I'll update to latest and see if that fixes my problem. I was more concerned that you guys were behind me and that this problem only existed on latest versions.

teetrinkers commented 8 years ago

I'm on OS X 10.11, node 4.1.1, npm 3.3.6.

teetrinkers commented 8 years ago

@H3Chief Have you had a chance to look into this yet?

LongLiveCHIEF commented 8 years ago

@teetrinkers are you on signed up on the Mattermost core team channel? https://pre-release.mattermost.com/signup_user_complete/?id=rcgiyftm7jyrxnma1osd8zswby

Once you join, find the Matterfront channel and join it.

LongLiveCHIEF commented 8 years ago

I made sure I upgraded to npm 3.4.0, and also running node 4.1.2, but I am still getting a build error:

Packaging app for platform linux ia32 using electron v0.34.3
Packaging app for platform win32 ia32 using electron v0.34.3
spawn wine ENOENT

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/Cellar/node/4.1.2/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v4.1.2
npm ERR! npm  v3.4.0
npm ERR! code ELIFECYCLE
npm ERR! matterfront@1.0.2 build: `electron-packager ./src matterfront --out=dist --ignore='^/dist$' --prune --asar --platform=all --arch=all --version=$npm_package_electronVersion --app-bundle-id='org.matterfront.app' --app-version=$npm_package_version --helper-bundle-id='org.matterfront.app.helper' --overwrite --icon resources/mattermost`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the matterfront@1.0.2 build script 'electron-packager ./src matterfront --out=dist --ignore='^/dist$' --prune --asar --platform=all --arch=all --version=$npm_package_electronVersion --app-bundle

The spawn wine ENOENT part makes me wonder if there's a system dep you guys have that I don't. compholio/wine is something I know I used on Ubuntu to run windows apps, and I'm going to try to install that via brew.

LongLiveCHIEF commented 8 years ago

Looks like this is a wine dependency problem. Mentioned here: https://github.com/maxogden/electron-packager/issues/64

LongLiveCHIEF commented 8 years ago

https://github.com/maxogden/electron-packager/#building-windows-apps-from-non-windows-platforms

Building an Electron app for the Windows platform with a custom icon requires editing the Electron.exe file. Currently, electron-packager uses node-rcedit to accomplish this. A Windows executable is bundled in that node package and needs to be run in order for this functionality to work, so on non-Windows platforms, Wine needs to be installed. On OS X, it is installable via Homebrew.

LongLiveCHIEF commented 8 years ago

We need to add some info in the README regarding the wine dependency on *nix operating systems before we can pull this one, and by then, I'll be done with the 1.1 solution. Wine will still be needed, for these OS's, and I'll have to add some information into the new /docs folder about that.

I'll also have to make sure to put a check for this in the programmatic tool, so builds warn if you try to build for Windows with this icon, and don't have wine installed.

lloeki commented 8 years ago

Ah, too bad I didn't get your problem: I thought it had to do with the OS X build, not the Windows build on OS X! Long term, your approach of having multiple build commands might turn out to be useful both for specifying different flags per OS, but also to allow people to build just for one platform.

teetrinkers commented 8 years ago

I just want to point out that I did add the info about Wine to the README, though maybe it should be more prominent.

LongLiveCHIEF commented 8 years ago

@teetrinkers just because I didn't accept this pull request, doesn't mean I didn't still merge it! Stay tuned to the addCLI branch, your work on this will be in there.

your approach of having multiple build commands might turn out to be useful both for specifying different flags per OS, but also to allow people to build just for one platform.

Yep, but instead of using electron commands and npm run... everywhere inside our scripts, I'm just going to expose a matterfront build cli that co-operates with the enhanced config capabilities we want

LongLiveCHIEF commented 8 years ago

ok, after about an entire hour of installs and makes (brew did all the work), I can confirm the build runs successfully. In order to install wine, I had to also install Xquartz. No big deal, and wine made it pretty evident this was needed anyways.

However, I am going to modify the vagrant box to include the new open-source MS stack (or possibly just apt-get install wine), and allow it to run the builds.