Browse Source

Redo building/packaging commands to replace electron-builder.

Also make them more sensible and user-friendly overall, relatively.
Update README with the commands and better instructions.

Important: This ensures that the commands issued by build are
cross-platform in nature instead of hoping. rimraf, cpy, etc.
pull/3202/head
TheGoddessInari 7 years ago
parent
commit
37dd7a400e
  1. 18
      README.md
  2. 4
      appveyor.yml
  3. 2635
      package-lock.json
  4. 57
      package.json

18
README.md

@ -32,7 +32,7 @@
<a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox_0.5.18_amd64.deb?job=Image%3A%20Ubuntu&branch=master" target="_blank">DEB64</a> / <a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox_0.5.18_amd64.deb?job=Image%3A%20Ubuntu&branch=master" target="_blank">DEB64</a> /
<a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox_0.5.18_i386.deb?job=Image%3A%20Ubuntu&branch=master" target="_blank">DEB32</a> / <a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox_0.5.18_i386.deb?job=Image%3A%20Ubuntu&branch=master" target="_blank">DEB32</a> /
<a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox-0.5.18.tar.gz?job=Image%3A%20Ubuntu&branch=master" target="_blank">Tarball64</a> / <a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox-0.5.18.tar.gz?job=Image%3A%20Ubuntu&branch=master" target="_blank">Tarball64</a> /
<a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox-0.5.18-ia32.tar.gz?job=Image%3A%20Ubuntu&branch=master" target="_blank">Tarball32</a> ) packaging flavors.</h5> <a href="https://ci.appveyor.com/api/projects/TheGoddessInari/rambox/artifacts/dist/Rambox-0.5.18-ia32.tar.gz?job=Image%3A%20Ubuntu&branch=master" target="_blank">Tarball32</a> ) packaging flavors.</h5>
<h6 align="center">Logo designed by <a href="http://andyur.com/" target="_blank">Andriy Yurchenko</a></h6> <h6 align="center">Logo designed by <a href="http://andyur.com/" target="_blank">Andriy Yurchenko</a></h6>
<h6 align="center">Original rambox by <a href="https://github.com/saenzramiro" target="_blank">Ramiro Saenz</a></h6> <h6 align="center">Original rambox by <a href="https://github.com/saenzramiro" target="_blank">Ramiro Saenz</a></h6>
@ -205,7 +205,7 @@ I'll think about it later.
## Compiling ## Compiling
To build your own copy, you need: To build your own copy, you need:
- A recent version of the [Java SE Development Kit](http://www.oracle.com/technetwork/java/javase/downloads/index.html). 8.0 may be needed on some platform configurations. - An 8.0 version of the [Java SE Development Kit](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
- A recent version of [Ruby](https://www.ruby-lang.org/en/downloads/). - A recent version of [Ruby](https://www.ruby-lang.org/en/downloads/).
- A recent version of [Sencha CMD](https://www.sencha.com/products/extjs/cmd-download/), and to install it with the Compass extension. - A recent version of [Sencha CMD](https://www.sencha.com/products/extjs/cmd-download/), and to install it with the Compass extension.
- A recent version of [NodeJS](https://nodejs.org/en/download/) with npm. - A recent version of [NodeJS](https://nodejs.org/en/download/) with npm.
@ -217,10 +217,18 @@ cd rambox
cp env-sample.js env.js cp env-sample.js env.js
# update env.js with your auth0 details. # update env.js with your auth0 details.
npm install npm install
npm run setup:win64 npm run repack:win64
``` ```
You can substitute win64 for linux32, linux64, win32, or osx as desired. This will create installers appropriate to your platform in dist. You can substitute win64 for linux32, linux64, win32, or osx as desired. This will create an unpacked directory in '**dist**' for testing.
Win32 builds are **deprecated** by electron-builder and is likely to be removed at some point in the future.
```shell
npm run setup
```
This step instead of **repack** will create an installer appropriate to your platform in '**dist**'.
You can place unpacked files over where the installers normally place their files for development/testing purposes.
**NOTE:** Win32 builds are **deprecated** by electron-builder and are likely to be removed at some point in the future.
## [Contributing](./CONTRIBUTING.md) ## [Contributing](./CONTRIBUTING.md)

4
appveyor.yml

@ -51,8 +51,6 @@ install:
npm install npm install
npm prune
- sh: >- - sh: >-
sudo apt-get update -qq; sudo apt-get update -qq;
@ -90,10 +88,10 @@ test: off
artifacts: artifacts:
- path: dist\squirrel-windows\*.exe - path: dist\squirrel-windows\*.exe
- path: dist\squirrel-windows-ia32\*.exe - path: dist\squirrel-windows-ia32\*.exe
- path: dist/*.AppImage
- path: dist/*.rpm - path: dist/*.rpm
- path: dist/*.deb - path: dist/*.deb
- path: dist/*.tar.gz - path: dist/*.tar.gz
- path: dist/*.AppImage
# after_build: # after_build:
# - ps: >- # - ps: >-

2635
package-lock.json generated

File diff suppressed because it is too large Load Diff

57
package.json

@ -4,28 +4,32 @@
"start": "electron electron/main.js", "start": "electron electron/main.js",
"start:debug": "electron electron/main.js --enable-logging", "start:debug": "electron electron/main.js --enable-logging",
"test": "./node_modules/.bin/mocha test/tests/**/*.spec.js", "test": "./node_modules/.bin/mocha test/tests/**/*.spec.js",
"sencha:clean": "rm -rf ./build/production", "sencha:clean": "rimraf ./build/production",
"sencha:compile": "sencha app build && cp app/package.json build/production/Rambox/ && npm --prefix ./build/production/Rambox/ install ./build/production/Rambox/", "sencha:compile": "sencha app build && cpy app/package.json build/production/Rambox/ && npm --prefix ./build/production/Rambox/ install ./build/production/Rambox/",
"sencha:compile:build": "sencha app build && cp app/package.json build/production/Rambox/ && cp -R build/production/Rambox/* ../rambox-build", "sencha:recompile": "npm run sencha:clean && npm run sencha:compile",
"clean": "rm -rf ./dist", "clean": "rimraf ./dist",
"clean:osx": "rm -rf ./dist/Rambox-darwin-*", "clean:win": "rimraf ./dist/win-{ia32-,}unpacked",
"clean:win": "rm -rf ./dist/Rambox-win32-*", "clean:linux": "rimraf ./dist/linux-{ia32-,}unpacked",
"pack": "npm run pack:osx && npm run pack:win && npm run pack:linux", "clean:osx": "rimraf ./dist/macos-unpacked",
"pack:osx": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=darwin --arch=x64 --electron-version=2.0.5 --icon=resources/installer/Icon.icns --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack": "electron-builder --dir",
"pack:win": "npm run pack:win32 && npm run pack:win64", "pack:osx": "electron-builder --macos --dir",
"pack:win32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=ia32 --electron-version=2.0.5 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=32-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:win": "electron-builder --win --ia32 --x64 --dir",
"pack:win64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=win32 --arch=x64 --electron-version=2.0.5 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:win32": "electron-builder --win --ia32 --dir",
"pack:linux": "npm run pack:linux32 && npm run pack:linux64", "pack:win64": "electron-builder --win --x64 --dir",
"pack:linux32": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=ia32 --electron-version=2.0.5 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:linux": "electron-builder --linux --ia32 --x64 --dir",
"pack:linux64": "electron-packager \"./build/production/Rambox/\" \"Rambox\" --out=dist --platform=linux --arch=x64 --electron-version=2.0.5 --icon=resources/installer/Icon.ico --app-version=0.2.0 --build-version=64-bit --version-string.CompanyName=\"Rambox\" --version-string.ProductName=\"Rambox\" --asar --prune --overwrite", "pack:linux32": "electron-builder --linux --ia32 --dir",
"build": "npm run build:linux && npm run build:osx && npm run build:win", "pack:linux64": "electron-builder --linux --x64 --dir",
"pack:all": "electron-builder -mwl --ia32 --x64 --dir",
"build": "electron-builder",
"build:osx": "electron-builder --macos", "build:osx": "electron-builder --macos",
"build:linux": "npm run build:linux32 && npm run build:linux64", "build:linux": "electron-builder --linux --ia32 --x64",
"build:linux32": "electron-builder --linux --ia32", "build:linux32": "electron-builder --linux --ia32",
"build:linux64": "electron-builder --linux --x64", "build:linux64": "electron-builder --linux --x64",
"build:win": "electron-builder --win --ia32 --x64", "build:win": "electron-builder --win --ia32 --x64",
"build:win32": "electron-builder --win --ia32", "build:win32": "electron-builder --win --ia32",
"build:win64": "electron-builder --win --x64", "build:win64": "electron-builder --win --x64",
"build:all": "electron-builder -mwl --ia32 --x64",
"setup": "npm run sencha:clean && npm run sencha:compile && npm run build",
"setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run build:osx", "setup:osx": "npm run sencha:clean && npm run sencha:compile && npm run build:osx",
"setup:win": "npm run sencha:clean && npm run sencha:compile && npm run build:win", "setup:win": "npm run sencha:clean && npm run sencha:compile && npm run build:win",
"setup:win32": "npm run sencha:clean && npm run sencha:compile && npm run build:win32", "setup:win32": "npm run sencha:clean && npm run sencha:compile && npm run build:win32",
@ -33,8 +37,15 @@
"setup:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux", "setup:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux",
"setup:linux32": "npm run sencha:clean && npm run sencha:compile && npm run build:linux32", "setup:linux32": "npm run sencha:clean && npm run sencha:compile && npm run build:linux32",
"setup:linux64": "npm run sencha:clean && npm run sencha:compile && npm run build:linux64", "setup:linux64": "npm run sencha:clean && npm run sencha:compile && npm run build:linux64",
"all:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win && npm run zip:win32 && npm run zip:win64 && npm run build:win", "repack": "npm run sencha:clean && npm run sencha:compile && npm run clean && npm run pack",
"all:linux": "npm run sencha:clean && npm run sencha:compile && npm run build:linux" "repack:osx": "npm run sencha:clean && npm run sencha:compile && npm run clean:osx && npm run pack:macos",
"repack:win": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win",
"repack:win32": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win32",
"repack:win64": "npm run sencha:clean && npm run sencha:compile && npm run clean:win && npm run pack:win64",
"repack:linux": "npm run sencha:clean && npm run sencha:compile && npm run clean:linux && npm run pack:linux",
"repack:linux32": "npm run sencha:clean && npm run sencha:compile && npm run clean:linux && npm run pack:linux32",
"repack:linux64": "npm run sencha:clean && npm run sencha:compile && npm run clean:linux && npm run pack:linux64",
"dist": "npm run repack"
}, },
"build": { "build": {
"productName": "Rambox", "productName": "Rambox",
@ -80,10 +91,10 @@
"Categories": "GTK;GNOME;Utility;Office;Email;Chat;InstantMessaging;" "Categories": "GTK;GNOME;Utility;Office;Email;Chat;InstantMessaging;"
}, },
"target": [ "target": [
"AppImage", "tar.gz",
"deb", "deb",
"rpm", "rpm",
"tar.gz" "AppImage"
] ]
}, },
"directories": { "directories": {
@ -95,10 +106,11 @@
"devDependencies": { "devDependencies": {
"asar": "^0.12.4", "asar": "^0.12.4",
"chai": "3.5.0", "chai": "3.5.0",
"cpy-cli": "2.0.0",
"crowdin": "1.0.0", "crowdin": "1.0.0",
"csvjson": "4.3.3", "csvjson": "4.3.3",
"electron-builder": "^20.22.0", "electron-builder": "^20.24.4",
"electron-builder-squirrel-windows": "^20.22.0", "electron-builder-squirrel-windows": "^20.24.2",
"electron-squirrel-startup": "^1.0.0", "electron-squirrel-startup": "^1.0.0",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"spectron": "^3.8.0" "spectron": "^3.8.0"
@ -112,7 +124,6 @@
"electron-store": "2.0.0", "electron-store": "2.0.0",
"electron-context-menu": "0.9.1", "electron-context-menu": "0.9.1",
"electron-is-dev": "^0.3.0", "electron-is-dev": "^0.3.0",
"electron-packager": "^12.1.0",
"mime": "^1.6.0", "mime": "^1.6.0",
"rimraf": "2.6.1", "rimraf": "2.6.1",
"tmp": "0.0.28" "tmp": "0.0.28"

Loading…
Cancel
Save