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

Confised over Medium Blog #17

Closed
toomanylogins opened this issue May 19, 2021 · 8 comments
Closed

Confised over Medium Blog #17

toomanylogins opened this issue May 19, 2021 · 8 comments
Labels
question Further information is requested

Comments

@toomanylogins
Copy link

Would be grateful if someone could explain this line of the medium blog.

bash <PRODUCT_HOME>/macOS-x64/build-macos-x64.sh [APPLICATION_NAME] [APPLICATION_VERSION]

Whats <PRODUCT_HOME> ? I guess its a path but to where same as ?

Thanks

@KosalaHerath
Copy link
Owner

It is the path to the repository home.

@KosalaHerath KosalaHerath added the question Further information is requested label May 26, 2021
@toomanylogins
Copy link
Author

Thanks for reply but I must be misunderstandind something.

  1. I have downloaded zip and copied to Users\Paul\Documents\macos-installer-builder-master\macOS-x64\
  2. Copied my application files to Users\Paul\Documents\macos-installer-builder-master\macOS-x64\application
  3. Run bash Users\Paul\Documents\macos-installer-builder-master\macOS-x64\build-macos-x64.sh YouDoCMS 1.0.0

I get error re apache maven missing, Ballerina missing and various target\darwin\scripts etc no such file or directory.

Would appreciate any advice.
Thanks
Paul

@KosalaHerath
Copy link
Owner

Hi Paul,

The warnings you got from Maven and Ballerina are pre-requisites that are specialized only for my example application. These requirements are not probably needed for your application and you can just comment the following code block.

#Pre-requisites
command -v mvn -v &gt;/dev/null 2&gt;&amp;1 || {    
log_warn "Apache Maven was not found. Please install Maven first."    
# exit 1
}
command -v ballerina &gt;/dev/null 2&gt;&amp;1 || {    
log_warn "Ballerina was not found. Please install ballerina first."    
# exit 1
}

This can be found in the following line.
https://github.com/KosalaHerath/macos-installer-builder/blob/master/macOS-x64/build-macos-x64.sh#L182

However, these warnings will not affect your application and since these are just reminders (which can be ignored in your case), the installer should be generated without any other errors as follows.

Screen Shot 2021-06-01 at 12 33 43 am

Next, I have no idea about your "target\darwin\scripts etc no such file or director" error and if you can provide the log of errors as above you got, I will be able to provide more help on this case.

In addition, to clarify the process, just download and unzip the repository, and then without adding any application files just try to run the 'build-macos-x64.sh' script and check the installer generation works without any errors.

Cheers!

@toomanylogins
Copy link
Author

Thank you for taking time to reply, I downloaded the zip again. Here is output after unzip to my documents folder on Mac 10.15.

bash /Users/paul/Documents/macos-installer-builder-master/macOS-x64/build-macos-x64.sh YouDoCMS 1.0.0
cat: ./utils/ascii_art.txt: No such file or directory

Application Name : YouDoCMS
Application Version : 1.0.0
[2021-06-01 11:26:52][WARN] Apache Maven was not found. Please install Maven first.
[2021-06-01 11:26:52][WARN] Ballerina was not found. Please install ballerina first.
[2021-06-01 11:26:52][INFO] Installer generating process started.
[2021-06-01 11:26:52][INFO] Cleaning target directory.
cp: darwin: No such file or directory
chmod: target/darwin/scripts: No such file or directory
chmod: target/darwin/Resources: No such file or directory
chmod: target/darwin/Distribution: No such file or directory
sed: target/darwin/scripts/postinstall: No such file or directory
sed: target/darwin/scripts/postinstall: No such file or directory
chmod: target/darwin/scripts/postinstall: No such file or directory
sed: target/darwin/Distribution: No such file or directory
sed: target/darwin/Distribution: No such file or directory
chmod: target/darwin/Distribution: No such file or directory
sed: target/darwin/Resources/.html: No such file or directory
sed: target/darwin/Resources/
.html: No such file or directory
chmod: target/darwin/Resources/: No such file or directory
cp: ./application/.: No such file or directory
cp: darwin/Resources/uninstall.sh: No such file or directory
sed: target/darwinpkg/Library/YouDoCMS/1.0.0/uninstall.sh: No such file or directory
sed: target/darwinpkg/Library/YouDoCMS/1.0.0/uninstall.sh: No such file or directory
[2021-06-01 11:26:52][INFO] Application installer generation process started.(3 Steps)
[2021-06-01 11:26:52][INFO] Apllication installer package building started.(1/3)
[2021-06-01 11:26:52][INFO] Application installer product building started.(2/3)
Do you wish to sign the installer (You should have Apple Developer Certificate) [y/N]?

1 similar comment
@toomanylogins
Copy link
Author

Thank you for taking time to reply, I downloaded the zip again. Here is output after unzip to my documents folder on Mac 10.15.

bash /Users/paul/Documents/macos-installer-builder-master/macOS-x64/build-macos-x64.sh YouDoCMS 1.0.0
cat: ./utils/ascii_art.txt: No such file or directory

Application Name : YouDoCMS
Application Version : 1.0.0
[2021-06-01 11:26:52][WARN] Apache Maven was not found. Please install Maven first.
[2021-06-01 11:26:52][WARN] Ballerina was not found. Please install ballerina first.
[2021-06-01 11:26:52][INFO] Installer generating process started.
[2021-06-01 11:26:52][INFO] Cleaning target directory.
cp: darwin: No such file or directory
chmod: target/darwin/scripts: No such file or directory
chmod: target/darwin/Resources: No such file or directory
chmod: target/darwin/Distribution: No such file or directory
sed: target/darwin/scripts/postinstall: No such file or directory
sed: target/darwin/scripts/postinstall: No such file or directory
chmod: target/darwin/scripts/postinstall: No such file or directory
sed: target/darwin/Distribution: No such file or directory
sed: target/darwin/Distribution: No such file or directory
chmod: target/darwin/Distribution: No such file or directory
sed: target/darwin/Resources/.html: No such file or directory
sed: target/darwin/Resources/
.html: No such file or directory
chmod: target/darwin/Resources/: No such file or directory
cp: ./application/.: No such file or directory
cp: darwin/Resources/uninstall.sh: No such file or directory
sed: target/darwinpkg/Library/YouDoCMS/1.0.0/uninstall.sh: No such file or directory
sed: target/darwinpkg/Library/YouDoCMS/1.0.0/uninstall.sh: No such file or directory
[2021-06-01 11:26:52][INFO] Application installer generation process started.(3 Steps)
[2021-06-01 11:26:52][INFO] Apllication installer package building started.(1/3)
[2021-06-01 11:26:52][INFO] Application installer product building started.(2/3)
Do you wish to sign the installer (You should have Apple Developer Certificate) [y/N]?

@toomanylogins
Copy link
Author

Fixed. You have to cd to the folder containing the .sh script before running bash build-macos-x64.sh

@KosalaHerath
Copy link
Owner

Hi Paul,

Thank you for mentioning the issue. The issue with the absolute path is fixed with this commit now. Thus now you can run it from anywhere using the absolute path.

Cheers!

@toomanylogins
Copy link
Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants