diff --git a/.gitignore b/.gitignore index fe1d19fe02ee1bc9d905c680e4e52d90c54512be..1a7f8e40c35fa6ae9ee9417bc0ad4be042e064dc 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,6 @@ sources/ .waiting.lock .cables/ .devices/ - +.DS_Store +Mac-build/EasyInstaller-installer/ +bin/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b58055ab029472af393bf909809652517ceda052..60e5c15041cc445144fc60c14f24452004ff032d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,7 +121,7 @@ build-macos: artifacts: name: "easy-installer-mac" paths: - - Mac-build/EasyInstaller.app + - Mac-build/EasyInstaller.dmg build-aur: image: $CONTAINER_IMAGE/aur:$CONTAINER_TAG @@ -165,7 +165,7 @@ publish-macos: - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts script: - - "rsync -avz Mac-build/EasyInstaller.app $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" + - "rsync -avz Mac-build/EasyInstaller.dmg $PUBLISH_USER@$PUBLISH_URL:$PUBLISH_DEST" - ssh $PUBLISH_USER@$PUBLISH_URL "mv $PUBLISH_DEST/* $RELEASE_DEST/" rules: - if: '$CI_COMMIT_TAG' diff --git a/Dockerfile b/Dockerfile index 4874c86b75b40412dc6c761244896329c51ee367..d6b726fa837234f869df1dffc7f154536e15c6ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ ENV SNAP="/snap/snapcraft/current" ENV SNAP_NAME="snapcraft" ENV SNAP_ARCH="amd64" -RUN apt-get install -y nsis rsync +RUN apt-get install -y nsis rsync hfsprogs hfsplus # install jvm COPY buildSrc/linux/jdk-11.0.2 /usr/lib/jdk/jdk-11.0.2 diff --git a/Mac-build/.DS_Store b/Mac-build/.DS_Store deleted file mode 100644 index 0f484756d5c2670a7487eced5a74585c42287ea9..0000000000000000000000000000000000000000 Binary files a/Mac-build/.DS_Store and /dev/null differ diff --git a/Mac-build/Info.plist b/Mac-build/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..a1c297e7e32f3473e1273bb4066fbf8737ef60d3 --- /dev/null +++ b/Mac-build/Info.plist @@ -0,0 +1,23 @@ + + + + + CFBundleGetInfoString + 0.15.2 + CFBundleShortVersionString + 0.15.2 + CFBundleExecutable + EasyInstaller + CFBundleIdentifier + ecorp.easy.installer/ecorp.easy.installer.EasyInstaller + CFBundleName + Easy Installer + CFBundleIconFile + easy-installer.png + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + + + diff --git a/Mac-build/README.txt b/Mac-build/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..8b02187699acbbacf63601fd598479f5c87b0081 --- /dev/null +++ b/Mac-build/README.txt @@ -0,0 +1,24 @@ +How to create an installer (.dmg) for MacOs for the Easy Installer + +1/ Build the easy installer application normally +2/ Goto this folder (Mac-build) +3/ run the ./mac_package.sh script. This create a folder `EasyInstaller-installer` containing the `EasyInstaller.app` (application) + +4/ sudo apt-get install hfsprogs +5/ dd if=/dev/zero of=/tmp/EasyInstaller.dmg bs=1M count=128 status=progress +6/ mkfs.hfsplus -v Install /tmp/EasyInstaller.dmg +7/ mkdir -pv /tmp/mnt-easyinstaller +8/ mount -o loop /tmp/my_application.dmg /tmp/mnt-easyinstaller +9/ cp -av EasyInstaller-installer/ /tmp/mnt-easyinstaller + +10/ umount /tmp/mnt-easyinstaller + + + + +7/ The installer is ready +8/ TODO : The Info.plist file should contains the version number + +How to install the EasyInstaller on MacOS +* see https://gitlab.e.foundation/e/devices/easy-installer/-/wikis/MacOS-install + diff --git a/Mac-build/easy-installer.png b/Mac-build/easy-installer.png new file mode 100644 index 0000000000000000000000000000000000000000..15698c66a57de0ef0c61a7bffc601e9afd8f4bd2 Binary files /dev/null and b/Mac-build/easy-installer.png differ diff --git a/Mac-build/mac_package.sh b/Mac-build/mac_package.sh index 116dfbbb3afc39d572eb106e95e74eb044e66de1..7ffe2ce645c4ff4602f6cd10f3a1148ec230fed6 100755 --- a/Mac-build/mac_package.sh +++ b/Mac-build/mac_package.sh @@ -1,15 +1,38 @@ -#!/bin/bash +#!/bin/bash -e APPNAME=EasyInstaller DIR="$APPNAME.app/Contents/MacOS" +DIR1="$APPNAME.app/Contents/Resources" if [ -a "$APPNAME.app" ]; then - echo "$PWD/$APPNAME.app already exists :(" - exit 1 + echo "$PWD/$APPNAME.app already exists delete it." + rm -rf "$APPNAME.app" fi mkdir -p "$DIR" +mkdir -p "$DIR1" cp EasyInstaller "$DIR/$APPNAME" chmod +x "$DIR/$APPNAME" cp -r ../build/image/easy-installer-mac/* "$DIR" +cp Info.plist "$DIR/.." +cp easy-installer.png "$DIR1" + +mkdir -p "$APPNAME-installer" +mv "$APPNAME.app" "$APPNAME-installer" + +_SIZE=$(du -s EasyInstaller-installer | cut -f 1) + +let SIZE=_SIZE/1000+1 +echo $SIZE + +dd if=/dev/zero of=/tmp/EasyInstaller.dmg bs=1M count=$SIZE status=progress +mkfs.hfsplus -v Install /tmp/EasyInstaller.dmg +mkdir -pv /tmp/mnt-easyinstaller +mount -o loop /tmp/EasyInstaller.dmg /tmp/mnt-easyinstaller +cp -av EasyInstaller-installer/* /tmp/mnt-easyinstaller +umount /tmp/mnt-easyinstaller + +rm -rf "$APPNAME.app" +rm -rf EasyInstaller-installer +mv /tmp/EasyInstaller.dmg .