macos-installer-builder icon indicating copy to clipboard operation
macos-installer-builder copied to clipboard

[Question] Does it support .app?

Open diuming opened this issue 4 years ago • 5 comments

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

diuming avatar Sep 20 '20 01:09 diuming

Hi Tuming,

Basically, this installation is doing copy the content you put in the <repo_home>/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?

KosalaHerath avatar Sep 21 '20 18:09 KosalaHerath

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

GaNacereddine avatar Feb 25 '21 13:02 GaNacereddine

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?

morty346 avatar Mar 19 '21 19:03 morty346

same problem? any solution?

mnuriyumusak avatar Feb 07 '22 10:02 mnuriyumusak

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.

csytsma avatar Mar 01 '22 19:03 csytsma

Since modification has been mentioned, closing the issue.

KosalaHerath avatar Mar 08 '23 01:03 KosalaHerath