diff --git a/.github/workflows/release-dmg.yml b/.github/workflows/release-dmg.yml index fe797137a..46ff97c1c 100644 --- a/.github/workflows/release-dmg.yml +++ b/.github/workflows/release-dmg.yml @@ -35,41 +35,32 @@ jobs: echo "prefix=/Applications/FreeFem++.app/Contents/ff-$VERSION" >> $GITHUB_OUTPUT echo "dmg_dir=FreeFEM-$VERSION-$ARCH" >> $GITHUB_OUTPUT + # - name: Test global script + # id: dmg + # run: | + # mkdir $HOME/tmp + # sudo ./bin/compile-version-MacOS develop $HOME/tmp generic-optim + # echo $DMG_NAME + # echo "file=$DMG_NAME" >>$GITHUB_OUTPUT + - name: Prepare run: | PREFIX=${{ steps.version.outputs.prefix }} + sudo mkdir -p "$PREFIX/gnu" sudo ./etc/actions/release/macos/copy_fortran.sh "$PREFIX" - name: Dependencies run: | PREFIX=${{ steps.version.outputs.prefix }} + sudo ./etc/actions/release/macos/compile_gsl.sh "$PREFIX" $CC $CXX sudo ./etc/actions/release/macos/compile_hdf5.sh "$PREFIX" $CC $CXX - # - name: Test global script - # id: dmg - # run: | - # mkdir $HOME/tmp - # sudo ./bin/compile-version-MacOS develop $HOME/tmp generic-optim - # echo $DMG_NAME - # echo "file=$DMG_NAME" >>$GITHUB_OUTPUT - - # - name: Create paths - # run: | - # PREFIX=${{ steps.version.outputs.prefix }} - - # sudo mkdir -p "$PREFIX" - - # - name: Fortran copy - # run: | - # PREFIX=${{ steps.version.outputs.prefix }} - - # sudo ./etc/actions/release/macos/copy_fortran.sh "$PREFIX" - - name: Configure run: | PREFIX=${{ steps.version.outputs.prefix }} + tar zxvf AutoGeneratedFile.tar.gz ./configure --enable-optim --enable-generic --enable-download --enable-m64 \ --prefix="$PREFIX" \ @@ -95,6 +86,7 @@ jobs: - name: Install run: | PREFIX=${{ steps.version.outputs.prefix }} + mkdir -p "$HOME/pkg/$PREFIX" rsync -a "$PREFIX/." "$HOME/pkg/$PREFIX/." sudo make install DESTDIR="$HOME/pkg" @@ -109,8 +101,9 @@ jobs: id: dmg run: | DMG_DIR=${{ steps.version.outputs.dmg_dir }} + VERSION=${{ steps.version.outputs.version }} - sudo ./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR" + sudo ./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR" "$VERSION" echo "file=$DMG_DIR.dmg" >>$GITHUB_OUTPUT diff --git a/etc/actions/release/macos/create_dmg.sh b/etc/actions/release/macos/create_dmg.sh index b913f810a..20fc394cf 100755 --- a/etc/actions/release/macos/create_dmg.sh +++ b/etc/actions/release/macos/create_dmg.sh @@ -5,9 +5,12 @@ set -x PACKAGE_DIR=$1 DMG_BASENAME=$2 +VERSION=$3 mkdir "$HOME/$DMG_BASENAME" mv "$PACKAGE_DIR/Applications/FreeFem++.app" "$HOME/$DMG_BASENAME" cp ./bin/script/Install-app.sh "$HOME/$DMG_BASENAME" +FFTESTDIR=$(find . -name Laplace.edp) +sed -e "s/@VV@/$VERSION/" -e "s%@APPFF@%$DMG_BASENAME%" -e s%@FFTEST@%$FFTESTDIR% <./bin/script/README.md.in >"$HOME/$DMG_BASENAME/README.md" hdiutil create -srcfolder "$HOME/$DMG_BASENAME" -fs HFS+ "$DMG_BASENAME.dmg" diff --git a/etc/actions/release/macos/fix_fortran.sh b/etc/actions/release/macos/fix_fortran.sh index 46c05ec84..d38c4e3b1 100755 --- a/etc/actions/release/macos/fix_fortran.sh +++ b/etc/actions/release/macos/fix_fortran.sh @@ -11,10 +11,4 @@ FORTRAN_FIX="$HOME/fortran-fix" mkdir "$FORTRAN_FIX" find "$PACKAGE_DIR/$PREFIX" -name '*.dylib' >"$FORTRAN_FIX/dylib-ff.txt" -# LIB_FORTRAN=$(grep gfortran $PREFIX/gnu/list-dylib-gfortran) -# LIB_QUADMATH=$(grep libquadmath $PREFIX/gnu/list-dylib-gfortran) -# LIB_FORTRAN_OLD_DIR=$(dirname "$LIB_FORTRAN") -# LIB_FORTRAN_DYLIB=$(basename "$LIB_FORTRAN") -# LIB_QUADMATH_DYLIB=$(basename "$LIB_QUADMATH") - ./bin/change-dylib-gfortran-2 "$PREFIX/gnu" $(cat "$FORTRAN_FIX/dylib-ff.txt")