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

Implement building app distributables using pear build #98

Open
wants to merge 70 commits into
base: main
Choose a base branch
from

Conversation

jkcdarunday
Copy link
Contributor

@jkcdarunday jkcdarunday commented Mar 22, 2024

Introduction

Running pear build <key> <build directory> will:

  1. Dump the app to the build directory
  2. Generate a CMakeLists.txt from package.json if not included in the app code
  3. Run bare-dev configure on the build directory
  4. Run bare-dev build on the build directory

Testing

  • Test on Linux
    • Requires assets/linux/icon.png to exist in the app
  • Test on Windows
    • Requires assets/win32/icon.png to exist in the app
    • Requires assets/splash.png to exist in the app
    • Requires Visual Studio 17 2022 to be installed
    • Requires to be run using x64 Native Tools Command Prompt for VS 2022
    • Requires signing key to be generated and set in package.json
  • Test on Mac OS
    • Requires assets/darwin/icon.png to exist in the app
    • Requires assets/splash.png to exist in the app
    • Requires XCode utilities to be installed
    • Requires cmake to be installed (used brew)
    • Requires signing key to be generated, trusted, and set in package.json

Other Notes

  • (RESOLVED) Workarounds were needed to be able to run bare-dev and its which dependency:
    • Added aliases for fs and path in the dependencies
    • Set global.process to require('bare-process')
    • Set the getuid and getgid functions to return a hardcoded id in global.process as they are not currently implemented
  • pear build <channel> is not yet supported as I couldn't find a way to resolve channel to key within the cli
  • pear dump <key> seems to print file changes regardless of outputter

Dependencies

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@davidmarkclements davidmarkclements left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just throw (then catch and print an error in cmd) if the dir isn't supplied - see how it's done in dump

cmd/build.js Outdated Show resolved Hide resolved
@jkcdarunday
Copy link
Contributor Author

Rebased to the latest main branch

@davidmarkclements davidmarkclements force-pushed the next branch 4 times, most recently from 782f52b to c00b6f9 Compare April 25, 2024 10:45
@davidmarkclements davidmarkclements force-pushed the next branch 2 times, most recently from d61bf92 to f2cd5b0 Compare May 1, 2024 16:12
@davidmarkclements davidmarkclements force-pushed the next branch 3 times, most recently from 5e1f13d to cfadb2c Compare May 13, 2024 14:33
@davidmarkclements davidmarkclements force-pushed the next branch 2 times, most recently from 966e208 to f019283 Compare May 22, 2024 09:56
@davidmarkclements davidmarkclements force-pushed the next branch 6 times, most recently from 31522c6 to d04ef7f Compare May 31, 2024 16:08
Base automatically changed from next to main June 4, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants