Simplify package names

This commit is contained in:
Veronica Berglyd Olsen
2023-05-02 12:46:58 +02:00
parent d66953d3ac
commit 0ae42ef876
4 changed files with 23 additions and 40 deletions
+2 -9
View File
@@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: ["3.10"] python-version: ["3.11"]
linux-tag: ["manylinux_2_24_x86_64", "manylinux_2_28_x86_64"] linux-tag: ["manylinux_2_24_x86_64", "manylinux_2_28_x86_64"]
steps: steps:
- name: Python Setup - name: Python Setup
@@ -104,17 +104,10 @@ jobs:
- name: Build App Bundle - name: Build App Bundle
run: ./setup/macos/build.sh run: ./setup/macos/build.sh
- name: Upload App Zip
uses: actions/upload-artifact@v3
with:
name: novelWriter-${{ env.VERSION }}.app.zip
path: dist_macos/novelWriter-*.app.zip
retention-days: 1
- name: Upload DMG - name: Upload DMG
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: novelWriter-${{ env.VERSION }}.dmg name: novelWriter-${{ env.VERSION }}.dmg
path: dist_macos/novelWriter-*.dmg path: dist_macos/*.dmg
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1
+20 -21
View File
@@ -940,11 +940,10 @@ def makeForLaunchpad(doSign=False, isFirst=False, isSnapshot=False):
## ##
def makeAppImage(sysArgs): def makeAppImage(sysArgs):
"""Build an Appimage. """Build an AppImage.
""" """
import glob import glob
import argparse import argparse
import platform
try: try:
import python_appimage # noqa F401 import python_appimage # noqa F401
@@ -968,15 +967,15 @@ def makeAppImage(sysArgs):
parser.add_argument( parser.add_argument(
"--linux-tag", "--linux-tag",
nargs="?", nargs="?",
default=f"manylinux2010_{platform.machine()}", default="manylinux_2_28_x86_64",
help=( help=(
"linux compatibility tag (e.g. manylinux1_x86_64) \n" "linux compatibility tag (e.g. manylinux_2_28_x86_64) \n"
"see https://python-appimage.readthedocs.io/en/latest/#available-python-appimages \n" "see https://python-appimage.readthedocs.io/en/latest/#available-python-appimages \n"
"and https://github.com/pypa/manylinux for a list of valid tags" "and https://github.com/pypa/manylinux for a list of valid tags"
), ),
) )
parser.add_argument( parser.add_argument(
"--python-version", nargs="?", default="3.10", help="python version (e.g. 3.10)" "--python-version", nargs="?", default="3.11", help="python version (e.g. 3.11)"
) )
args, unparsedArgs = parser.parse_known_args(sysArgs) args, unparsedArgs = parser.parse_known_args(sysArgs)
@@ -1020,9 +1019,8 @@ def makeAppImage(sysArgs):
os.mkdir(imageDir) os.mkdir(imageDir)
# Remove old Appimages # Remove old AppImages
outFiles = glob.glob(f"{bldDir}/*.AppImage") outFiles = glob.glob(f"{bldDir}/*.AppImage")
if outFiles: if outFiles:
print("Removing old AppImages") print("Removing old AppImages")
print("") print("")
@@ -1112,17 +1110,17 @@ def makeAppImage(sysArgs):
print("Wrote: requirements.txt") print("Wrote: requirements.txt")
shutil.copyfile("setup/data/novelwriter.desktop", f"{imageDir}/novelwriter.desktop") shutil.copyfile("setup/data/novelwriter.desktop", f"{imageDir}/novelwriter.desktop")
print("Copied: setup/data/novelwriter.desktop") print("Copied: novelwriter.desktop")
shutil.copyfile("setup/icons/novelwriter.svg", f"{imageDir}/novelwriter.svg") shutil.copyfile("setup/icons/novelwriter.svg", f"{imageDir}/novelwriter.svg")
print("Copied: setup/icons/novelwriter.svg") print("Copied: novelwriter.svg")
shutil.copyfile( shutil.copyfile(
"setup/data/hicolor/256x256/apps/novelwriter.png", f"{imageDir}/novelwriter.png" "setup/data/hicolor/256x256/apps/novelwriter.png", f"{imageDir}/novelwriter.png"
) )
print("Copied: setup/data/hicolor/256x256/apps/novelwriter.png") print("Copied: novelwriter.png")
# Build Appimage # Build AppImage
# ============== # ==============
try: try:
@@ -1135,13 +1133,17 @@ def makeAppImage(sysArgs):
print("") print("")
print(str(exc)) print(str(exc))
print("") print("")
print("Dependencies:")
print(" * pip install python-appimage")
print("")
sys.exit(1) sys.exit(1)
linuxLabel = ""
if not linuxTag.startswith("manylinux_2_28"):
linuxLabel = "-oldlinux"
if not linuxTag.endswith("x86_64"):
# manylinux_2_28 only comes in 64 bit, so this one only applies to older images
linuxLabel += "-32bit"
bldFile = glob.glob(f"{bldDir}/*.AppImage")[0] bldFile = glob.glob(f"{bldDir}/*.AppImage")[0]
outFile = f"{bldDir}/novelWriter-{pkgVers}-py{pythonVer}-{linuxTag}.AppImage" outFile = f"{bldDir}/novelWriter-{pkgVers}{linuxLabel}.AppImage"
os.rename(bldFile, outFile) os.rename(bldFile, outFile)
shaFile = makeCheckSum(os.path.basename(outFile), cwd=bldDir) shaFile = makeCheckSum(os.path.basename(outFile), cwd=bldDir)
@@ -1372,11 +1374,8 @@ def makeWindowsEmbedded(sysArgs):
print(str(exc)) print(str(exc))
sys.exit(1) sys.exit(1)
issName = os.path.join("dist", f"novelwriter-{packVersion}-win10-amd64-setup.exe") print("")
newName = os.path.join("dist", f"novelwriter-{packVersion}-py{pyVers}-win10-amd64-setup.exe") print("Done")
os.replace(issName, newName)
print(f"Installer: {newName}")
print("") print("")
return return
@@ -1908,7 +1907,7 @@ if __name__ == "__main__":
" build-win-exe Build a setup.exe file with Python embedded for Windows.", " build-win-exe Build a setup.exe file with Python embedded for Windows.",
" The package must be built from a minimal windows zip file.", " The package must be built from a minimal windows zip file.",
" build-appimage Build an AppImage. Argument --linux-tag defaults to", " build-appimage Build an AppImage. Argument --linux-tag defaults to",
" manylinux1_x86_64 / i386, and --python-version to 3.10.", " manylinux_2_28_x86_64 / i386, and --python-version to 3.11.",
"", "",
"System Install:", "System Install:",
"", "",
-9
View File
@@ -154,17 +154,8 @@ rm lib/python3.*/site-packages/PyQt5/Qt/lib/libQt5WebEngine* || true
popd || exit 1 popd || exit 1
popd || exit 1 popd || exit 1
# --- Create App Bundle-------------------------------------------------------------------------- #
echo "Packageing App ..."
mkdir -p $RLS_DIR mkdir -p $RLS_DIR
pushd $BUILD_DIR || exit 1
zip -qr novelWriter.app.zip novelWriter.app
popd || exit 1
mv -v $BUILD_DIR/novelWriter.app.zip $RLS_DIR/novelWriter-"${VERSION}".app.zip
# --- Create DMG -------------------------------------------------------------------------------- # # --- Create DMG -------------------------------------------------------------------------------- #
# Generate .dmg # Generate .dmg
+1 -1
View File
@@ -24,7 +24,7 @@ DisableProgramGroupPage=yes
UsedUserAreasWarning=no UsedUserAreasWarning=no
PrivilegesRequiredOverridesAllowed=dialog PrivilegesRequiredOverridesAllowed=dialog
OutputDir={#nwAppDir} OutputDir={#nwAppDir}
OutputBaseFilename=novelwriter-{#nwAppVersion}-win10-amd64-setup OutputBaseFilename=novelwriter-{#nwAppVersion}-amd64-setup
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes
WizardStyle=modern WizardStyle=modern