By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Allendale Dec 6th

LaserWeb4 [for Mac] ... Advice please

Old Dog needs to learn New Trick ...

All Topics | Latest Posts

Search for:  in Thread Title in  
Michael Gilligan10/11/2019 13:48:38
avatar
14244 forum posts
627 photos

I have been trying LaserWeb4 [v4.0.996-130], and I'm impressed

**LINK**

https://github.com/LaserWeb/LaserWeb4-Binaries/releases

This was installed from a DMG

.

I am now intending to update it to v4.0.996-134 ... but that only has the Source Code available, and I'm out of my depth blush

The download includes this [presumably helpful] text file:

build.jpg

... Could some kind soul please walk me through this ^^^

... Presumably it is a script for me to enter in Terminal

Thanks in advance

MichaelG.

clivel10/11/2019 15:23:44
287 forum posts
12 photos

What you have there is a "shell" script which is run from the command line in a terminal window. The "shell" is a program that processes the commands, two of the more popular shells are bash and zsh. It looks as if this particular script is used to build the application so unless you intend rebuilding it, is probably not really useful to you.

If you were a DOS user you may remember BAT files which ran a series of commands at the command line, a shell script is similar but vastly more powerful.

Comments in a shell script start with # so all text in your script that follows a # is ignored by the shell it is only there for the user's edification, all that is except for the first line:
#!/bin/sh which by convention indicate which application is used to execute the script, in this case /bin/sh (which is probably a link to the actual program),

The first thing your script does is set a few environment variables:
export SOMETHING=SOMETHING_ELSE

The content of an environment variable is retrieved by means of the $ symbol. So: for example using the "echo" command that displays text in the terminal e.g:

export XYZ=Hello
echo "The XYZ variable contains $XYZ"
would display
The XYZ variable contains Hello

That only just really touched the surface, if you are interested in learning more about shell scripts Google turned up some promising links when I searched for: introduction to shell script programming

Clive

clivel10/11/2019 15:45:37
287 forum posts
12 photos

Oh, I should have read your posting more closely, you do want to build LaserWeb4 from the source.

To do so, you will first need to install some development tools, I am not too familiar with Mac programming but you will probably need to install the Mac XCode development tools. Your script also makes use of git, yarn and npm. If any of these are not part of the Xcode development suite they will need to be installed separately.

Once you have the tools installed, open up a terminal, change to the directory containing the build.osx.sh file, make sure that the file has execute permission, and then execute it by typing:
./build.osx.sh

That should download the latest source code and build it.
Clive

Edited By clivel on 10/11/2019 15:46:12

Michael Gilligan10/11/2019 16:16:26
avatar
14244 forum posts
627 photos

Many thanks, Clive yes

I will give it a try tonight or tomorrow

MichaelG.

SillyOldDuffer10/11/2019 16:21:27
4843 forum posts
1018 photos

Looks like the maintainer isn't available, there's been no response to any queries since 19th September's:

Where is the .dmg (for OSX)

I find the website isn't up-to-date and the only binary install currently available for the new version is for Windows. Both Linux and Mac require some source code hoop jumping. I'd be inclined to leave it for a few weeks to see if the maintainer provides a dmg. Could be that's what he's busy doing.

However, if you want to install from source you have the necessary bash script. It appears to download and install Javascript modules, which are also scripts and almost certainly safe, to be run in a Browser.

bash scripts are executed from the command line. Proceed to Mac's top-right corner & select the magnifying glass. Type terminal and a text window should open with a % or $ prompt.

If you know the directory the script is stored in, it can be executed by typing:

bash /path/to/build.sh

where /path/to is the full directory name of the build script's directory. You should be able to find the full directory name by asking the magnifying glass to find 'build.sh', but there may be a few. Be sure you execute the right one.

No guarantees - I'm not a Mac expert - but let me know what the script outputs if the advice fails. If necessary I'll steal daughters mac and install LaserWeb myself to see if it can be made to work.

Dave

Michael Gilligan10/11/2019 16:29:18
avatar
14244 forum posts
627 photos

Many thanks to you also, Dave yes

You have both, I think, assured me that I should be able to just call that script, rather than copying it line-by-line

... which is much simpler than I feared.

MichaelG.

Michael Gilligan10/11/2019 18:52:04
avatar
14244 forum posts
627 photos

Currently downloading Xcode ... now that I have located the appropriate version: **LINK**

https://discussions.apple.com/thread/8648195

... this may take a while

MichaelG.

.

Edit: the download was 4.53GB ... and it's now expanding it surprise

Edited By Michael Gilligan on 10/11/2019 19:18:30

Michael Gilligan10/11/2019 19:41:30
avatar
14244 forum posts
627 photos

Then ... I had to download the 'Command Line Developer Tools'

And finally ... It failed crying 2

fail.jpg

Looks like I will be sticking with -130 until the author provides a dmg

... But at least I have learned something; so thanks again

MichaelG.

.

Edit: I've just found this ... 

https://forum.makerforums.info/t/hi-all-its-time-to-take-a-nap/9090

... so it looks like -130 until I find something better.

Edited By Michael Gilligan on 10/11/2019 19:55:27

Keith Petley11/11/2019 10:43:39
6 forum posts

Hi Michael,

I took a quick look at the errors above and if you still want to have a go at building this then try the following:

1 - I think you are launching the script from the wrong place. The script expects to be run from the directory where it is located.

cd Downloads/LaserWeb4-Binaries-4.0.996-134

./build.osx.sh

2 - The script can't find the yarn command - you probably need to download it from somewhere

3 - The same with npm.

Keith

Michael Gilligan11/11/2019 12:07:08
avatar
14244 forum posts
627 photos

Thanks for that, Keith

... I will have another try this evening.

[no idea what the yarn command is, or npm ... or where to find them]

MichaelG.

SillyOldDuffer11/11/2019 12:47:38
4843 forum posts
1018 photos

yarn and npm are both package managers - used to download, install, and remove software.

yarn is available from here. But try typing 'brew install yarn' at the command line. (brew is another package manager)

npm is the Javascript package manager, and comes with node: Try typing 'brew install node'

If they install, re-run build.sh Good spot from Keith about it expecting to run in the directory in which it's located.

For background:

  • DMG is the Mac Package Manager. If set up correctly by the software maintainer, it should download and install (or remove) all the software needed to make something work on an Apple computer. In this case it's not available in full form hence Michael has to install some foundation software manually. Welcome to the cruel world of software engineering. It's Dependency Hell!
  • LaserWeb4 is a Javascript application, and any Javascript dependencies are managed by npm, 'Node Package Manager'.
  • yarn is also a package manager, not sure what is does here, I think it's managing the Javascript components as a development package, ie a programmer tool supporting several people working at the same time on a project.
  • git is a source code repository and version control package, also normally a programmer tool supporting team work. It may be necessary to install it as well.
  • xcode is Mac's software development toolset, which is 'do everything' huge. May not need it, there's a smaller package called 'homebrew'.

Have sympathy for package management writers. On a large MS-Windows project of my acquaintance the stress was such that they had to be rotated off the job after about 6 months!

Dave

.

Michael Gilligan12/11/2019 21:09:44
avatar
14244 forum posts
627 photos

Many thanks for the help, Clive, Keith & Dave

I started along the brew / yarn / nam trail ... but chickened-out when I got this far:

chicken.jpg

It's finally time to accept that we are obsolete sad

MichaelG.

Edited By Michael Gilligan on 12/11/2019 21:10:27

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
Ausee.com.au
Eccentric Engineering
Warco
emcomachinetools
Eccentric July 5 2018
Tee London LMES 6th Dec
ChesterUK
Allendale Electronics
cowells
Subscription Offer

Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest