KosalaHerath / macos-installer-builder

Generate macOS installers for your applications and products from one command
Apache License 2.0
323 stars 94 forks source link

[Question] Does it support .app? #7

Closed diuming closed 1 year ago

diuming commented 4 years ago

I put MyApplication.app in application folder and modify postinstall.sh

#Custermize this for your application
APPLICATION_FILE_PATH=MyApplication.app

#Parameters
PRODUCT_HOME=/opt/__PRODUCT__/__VERSION__

than run build-macos-x64.sh MyApplication 1.0.0

But, I can't find MyApplication.app in /opt folder

KosalaHerath commented 4 years ago

Hi Tuming,

Basically, this installation is doing copy the content you put in the /application directory to the /opt/PRODUCT/VERSION directory in your system. Therefore your .app file should also be copied to that folder if there were no other errors. Did you try with only the .app file in the application directory or only the .app file has not copied when the other files have copied?

GaNacereddine commented 3 years ago

@KosalaHerath other files are copied but not the .app one

morty346 commented 3 years ago

I have this problem as well... Looks like people have had this issue for years if you check the comment section on the original blog.

Why can a .app not be copied into the applications folder?

mnuriyumusak commented 2 years ago

same problem? any solution?

csytsma commented 2 years ago

I was able to modify it to work with my .app.

You'll need to update the build-macos-x64.sh script, basically replace the folder location of Library with Applications. Starting at about line 119 or so, remove or comment out the Copy Celery commands: #Copy cellery product to /Library/Cellery #mkdir -p "${TARGET_DIRECTORY}"/darwinpkg/Library/${PRODUCT}/${VERSION} #cp -a "$SCRIPTPATH"/application/.."${TARGET_DIRECTORY}"/darwinpkg/Library/${PRODUCT}/${VERSION} #chmod -R 755 "${TARGET_DIRECTORY}"/darwinpkg/Library/${PRODUCT}/${VERSION}

and add the following lines:

mkdir -p "${TARGET_DIRECTORY}"/darwinpkg/Applications cp -a "$SCRIPTPATH"/application/. "${TARGET_DIRECTORY}"/darwinpkg/Applications

You'll probably get some other associated errors about not being able to find the Library folders, but they can generally be ignored, or easily edited.

KosalaHerath commented 1 year ago

Since modification has been mentioned, closing the issue.