Skip to content

Commit

Permalink
update install/packaging scripts to generate windows installer
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagohersan committed Feb 29, 2024
1 parent 2800740 commit 57f5343
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 13 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/release-gh-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,26 @@ jobs:
- name: Checkout
uses: actions/checkout@master

- name: Wine
run: |
sudo apt install wine64
sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install wine32
- name: Install
run: npm install

- name: Build
- name: Build OSX
run: npm run pack-osx

- name: Build win
run: npm run exe

- name: Pack
run: |
mv release/the-happy-app-darwin-x64 ./the-happy-app-mac
tar -czf the-happy-app-mac.tar.gz the-happy-app-mac
mv release/the-happy-app-windows-installer/The\ Happy\ App.exe .
- name: Setup Git
id: setup
run: |
Expand All @@ -29,13 +43,10 @@ jobs:
git tag $TAG_NAME
git push origin $TAG_NAME
- name: Pack
run: |
mv release/the-happy-app-darwin-x64 ./the-happy-app-mac
tar -czf the-happy-app-mac.tar.gz the-happy-app-mac
- name: Release
uses: softprops/action-gh-release@v1
with:
files: the-happy-app-mac.tar.gz
files: |
the-happy-app-mac.tar.gz
The\ Happy\ App.exe
tag_name: ${{ steps.setup.outputs.TAG_NAME }}
Binary file added docs/Instructions_MAC.pdf
Binary file not shown.
Binary file added docs/Instructions_WIN.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion installers/createMacInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ ! -d release/the-happy-app-darwin-x64/The\ Happy\ App.app ]; then
release/the-happy-app-darwin-x64/The\ Happy\ App.app
fi

cp -f ../docs/Instructions_MAC.pdf \
cp -f ./docs/Instructions_MAC.pdf \
release/the-happy-app-darwin-x64/INSTALL\ INSTRUCTIONS.pdf

./node_modules/.bin/electron-installer-dmg release/the-happy-app-darwin-x64/The\ Happy\ App.app the-happy-app --overwrite --icon=icons/Happy.icns --out=release/the-happy-app-mac-installer
2 changes: 1 addition & 1 deletion installers/createWindowsInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getInstallerConfig () {
const outPath = path.join(rootPath, 'release')

return Promise.resolve({
appDirectory: path.join(outPath, 'the-happy-app-win32-ia32/'),
appDirectory: path.join(outPath, 'the-happy-app-win32-x64/'),
authors: 'The Happy Team',
noMsi: true,
outputDirectory: path.join(outPath, 'the-happy-app-windows-installer'),
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"main": "main.js",
"scripts": {
"start": "DEBUG=true node_modules/.bin/electron .",
"pack-osx": "electron-packager . the-happy-app --overwrite --platform=darwin --arch=x64 --icon=icons/Happy.icns --prune=true --ignore=\"release|feelings|icons|.gitignore|.travis.yml\" --out=release",
"pack-win": "electron-packager . the-happy-app --overwrite --platform=win32 --arch=ia32 --icon=icons/Happy.ico --prune=true --ignore=\"release|feelings|icons|.gitignore|.travis.yml\" --out=release --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"The Happy App\"",
"pack-osx": "electron-packager . the-happy-app --overwrite --platform=darwin --arch=x64 --icon=icons/Happy.icns --prune=true --ignore=\"release|feelings|icons|.gitignore|.github\" --out=release",
"pack-win": "electron-packager . the-happy-app --overwrite --asar --platform=win32 --arch=x64 --icon=icons/Happy.ico --prune=true --ignore=\"release|feelings|icons|.gitignore|.github\" --out=release --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"The Happy App\"",
"installer-osx": "bash installers/createMacInstaller.sh ",
"installer-win": "node installers/createWindowsInstaller.js",
"dmg": "npm run pack-osx; npm run installer-osx",
Expand Down

0 comments on commit 57f5343

Please sign in to comment.