From a12e4124f3cbf48255fa10aa5bbabbbbeff4e785 Mon Sep 17 00:00:00 2001 From: Frank PREEL Date: Fri, 26 Aug 2022 17:23:18 +0200 Subject: [PATCH 1/5] MacOS Installer procedure --- .gitignore | 2 +- Mac-build/.DS_Store | Bin 6148 -> 0 bytes Mac-build/Info.plist | 27 +++++++++++++++++++++++++++ Mac-build/README.txt | 14 ++++++++++++++ Mac-build/easy-installer.png | Bin 0 -> 4301 bytes Mac-build/mac_package.sh | 7 +++++++ 6 files changed, 49 insertions(+), 1 deletion(-) delete mode 100644 Mac-build/.DS_Store create mode 100644 Mac-build/Info.plist create mode 100644 Mac-build/README.txt create mode 100644 Mac-build/easy-installer.png diff --git a/.gitignore b/.gitignore index fe1d19fe..7c079f29 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,4 @@ sources/ .waiting.lock .cables/ .devices/ - +.DS_Store diff --git a/Mac-build/.DS_Store b/Mac-build/.DS_Store deleted file mode 100644 index 0f484756d5c2670a7487eced5a74585c42287ea9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c!5S)b+kq{^)rN1B&e_*1dNX-WT2?!)E1Q96cuH$p~M3{Ymaye)zU{~55 zKX&Z9DZDlSnLJ;e03!fHx*}dR^iAj0d$t!NiehWbagPn2aEYdu{r!M)4>2QSgBNV` z8(iaY-mI64X1!pRe&Q*8{BFh;aD)|^OPu4u@Q(3@yfIh1-Qm9NaBYDMsX!`_3Zw$5 zz`s*~HCt_X;FvKLNCi@XF9q~`D0Iad*gD$L!JyZ7ogXNwv2AY&Vu^kYY#lj66Q>fL zD)Gb+r*phSUJYy=oer^`xlZgX@j?;Xo#VyQA=NQsDv%0v71;OgNbCQM{=@sfOUhm< zkP7@M1!OQin@;#kQCoXIr?s}wFX*4fTuW!@Tmsn9QhdCXSG3K%8rV7-o#RF)=0!kt KNlOKOLxB(GA}go> diff --git a/Mac-build/Info.plist b/Mac-build/Info.plist new file mode 100644 index 00000000..9d43131e --- /dev/null +++ b/Mac-build/Info.plist @@ -0,0 +1,27 @@ + + + + + CFBundleGetInfoString + Easy Installer + CFBundleExecutable + EasyInstaller + CFBundleIdentifier + ecorp.easy.installer/ecorp.easy.installer.EasyInstaller + CFBundleName + Easy Installer + CFBundleIconFile + easy-installer.png + CFBundleShortVersionString + 0.01 + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + IFMajorVersion + 0 + IFMinorVersion + 1 + + + diff --git a/Mac-build/README.txt b/Mac-build/README.txt new file mode 100644 index 00000000..f10740d5 --- /dev/null +++ b/Mac-build/README.txt @@ -0,0 +1,14 @@ +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/ Launch (on a Mac computer, this can't be done on the server side I guess) the `Disk Utility` Application +5/ Select `File / New Image / Image from Folder` +6/ Select `EasyInstaller-installer` and validate (no Encryption & compressed) +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 GIT binary patch literal 4301 zcmcIo_ct6`wAO1dLv#isMj2(Ij20#8h!QOXQKK`6QKE!sQ4`S_?dk@>=q02mqeTf~ zMo&bEnrOL<^4#|~y!XSm_d4HMYwvZwz0W#l?L=cET?RTXIua5R20et9>5Xr@K`#x} zjm<4P@wjoceh4cR2?;y!Kah?n!?g#}sjj3u5&g-T_7-<&3P$F&=|LGZX3O>S@xjOdB{{@Wk18@DqYJ8$e5b z@n0700Ez*fmj7$?C#zWy^`5BCdY|fDZbERZ=if3(iAj(7pPkJ-BjLA{xpaSmJN@0F zPXeHNsc?y?ufAS%evFr|fr+%yx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/mac_package.sh @@ -2,6 +2,7 @@ APPNAME=EasyInstaller DIR="$APPNAME.app/Contents/MacOS" +DIR1="$APPNAME.app/Contents/Resources" if [ -a "$APPNAME.app" ]; then echo "$PWD/$APPNAME.app already exists :(" @@ -9,7 +10,13 @@ if [ -a "$APPNAME.app" ]; then 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" \ No newline at end of file -- GitLab From 30b364ae549e88968d6d633f526775e89c0917a5 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 3 Oct 2022 16:18:14 +0200 Subject: [PATCH 2/5] Do exclude some binaries --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7c079f29..1a7f8e40 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ sources/ .cables/ .devices/ .DS_Store +Mac-build/EasyInstaller-installer/ +bin/ -- GitLab From 371fa2439bc8be97d4e9ae20e5104e58d3b88653 Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Wed, 26 Oct 2022 10:08:06 +0200 Subject: [PATCH 3/5] Mac publish --- Mac-build/README.txt | 16 +++++++++++++--- Mac-build/mac_package.sh | 21 ++++++++++++++++++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Mac-build/README.txt b/Mac-build/README.txt index f10740d5..8b021876 100644 --- a/Mac-build/README.txt +++ b/Mac-build/README.txt @@ -3,9 +3,19 @@ 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/ Launch (on a Mac computer, this can't be done on the server side I guess) the `Disk Utility` Application -5/ Select `File / New Image / Image from Folder` -6/ Select `EasyInstaller-installer` and validate (no Encryption & compressed) + +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 diff --git a/Mac-build/mac_package.sh b/Mac-build/mac_package.sh index 45890d8e..ad7a8bdb 100755 --- a/Mac-build/mac_package.sh +++ b/Mac-build/mac_package.sh @@ -5,8 +5,8 @@ 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" @@ -19,4 +19,19 @@ cp Info.plist "$DIR/.." cp easy-installer.png "$DIR1" mkdir -p "$APPNAME-installer" -mv "$APPNAME.app" "$APPNAME-installer" \ No newline at end of file +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 +sudo mkdir -pv /tmp/mnt-easyinstaller +sudo mount -o loop /tmp/EasyInstaller.dmg /tmp/mnt-easyinstaller +sudo cp -av EasyInstaller-installer/* /tmp/mnt-easyinstaller +sudo umount /tmp/mnt-easyinstaller + +rm -rf "$APPNAME.app" +rm -rf EasyInstaller-installer -- GitLab From a5cbc7c01fe33f9b223831d96307ccf802f437c9 Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Fri, 28 Oct 2022 16:58:56 +0200 Subject: [PATCH 4/5] Fix mac OS build on gitlab --- .gitlab-ci.yml | 4 ++-- Dockerfile | 2 +- Mac-build/mac_package.sh | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b58055ab..60e5c150 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 4874c86b..d6b726fa 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/mac_package.sh b/Mac-build/mac_package.sh index ad7a8bdb..7ffe2ce6 100755 --- a/Mac-build/mac_package.sh +++ b/Mac-build/mac_package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -e APPNAME=EasyInstaller DIR="$APPNAME.app/Contents/MacOS" @@ -28,10 +28,11 @@ echo $SIZE dd if=/dev/zero of=/tmp/EasyInstaller.dmg bs=1M count=$SIZE status=progress mkfs.hfsplus -v Install /tmp/EasyInstaller.dmg -sudo mkdir -pv /tmp/mnt-easyinstaller -sudo mount -o loop /tmp/EasyInstaller.dmg /tmp/mnt-easyinstaller -sudo cp -av EasyInstaller-installer/* /tmp/mnt-easyinstaller -sudo umount /tmp/mnt-easyinstaller +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 . -- GitLab From 59d55e8745d77430d57f8e92aa0fba49166b26be Mon Sep 17 00:00:00 2001 From: Frank Preel Date: Mon, 7 Nov 2022 21:40:54 +0100 Subject: [PATCH 5/5] Bump macos version 0.15.2 --- Mac-build/Info.plist | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Mac-build/Info.plist b/Mac-build/Info.plist index 9d43131e..a1c297e7 100644 --- a/Mac-build/Info.plist +++ b/Mac-build/Info.plist @@ -3,7 +3,9 @@ CFBundleGetInfoString - Easy Installer + 0.15.2 + CFBundleShortVersionString + 0.15.2 CFBundleExecutable EasyInstaller CFBundleIdentifier @@ -12,16 +14,10 @@ Easy Installer CFBundleIconFile easy-installer.png - CFBundleShortVersionString - 0.01 CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType APPL - IFMajorVersion - 0 - IFMinorVersion - 1 -- GitLab