Changes associated with version 0.71:

[1] Added support to build compressed DMG files.
This commit is contained in:
Norberto Lopez
2024-12-18 18:30:36 -05:00
parent 48e4ea799b
commit 1dc7490047
5 changed files with 32 additions and 5 deletions

View File

@@ -61,6 +61,11 @@ The following sofware are dependencies for compiling DistMaker:
Note, you will have to edit the script, ./tools/buildRelease, so that the variables antPath and jdkPath are relative to your system.
In addition, if DistMaker is to build compressed DMG files you will need to get a copy of the libdmg-hfsplus software. That software is located at:
    https://github.com/fanquake/libdmg-hfsplus
You would then need to update the file ./script/appleUtils.py, and change the compressCmd to reflect the location to the actual dmg executable. This executable does the actual compression.
## Legal Notice
DistMaker utilizes a number of copyrighted products.

View File

@@ -1,5 +1,5 @@
Product: DistMaker
Version: 0.70
Version: 0.71

View File

@@ -29,6 +29,13 @@ import miscUtils
import deployJreDist
# Define the command used to compress the DMG file. Leave this variable set to
# None, if you do not have an installed copy of the libdmg-hfsplus 'dmg'
# command. Otherwise specify the path to the command here:
# compressCmd = '/spare/libdmg-hfsplus/build/dmg/dmg'
compressCmd = None
def buildRelease(aArgs, aBuildPath, aJreNodeL):
# We mutate args - thus make a custom copy
args = copy.copy(aArgs)
@@ -98,7 +105,22 @@ def buildRelease(aArgs, aBuildPath, aJreNodeL):
if proc.returncode != 0:
print('\tError: Failed to form DMG image. Return code: ' + str(proc.returncode) + '\n')
else:
print('\tFinished building release: ' + os.path.basename(dmgFile) + '\n')
if compressCmd != None:
print('\tCompressing DMG image: ' + os.path.basename(dmgFile))
isoFile = dmgFile + '.iso'
os.rename(dmgFile, isoFile)
cmd2 = [compressCmd, isoFile, dmgFile]
proc = miscUtils.executeAndLog(cmd2, indentStr)
if proc.returncode != 0:
print('\tError: Failed to compress DMG image. Return code: ' + str(proc.returncode) + '\n')
else:
print('\tFinished building release: ' + os.path.basename(dmgFile) + '\n')
os.remove(isoFile)
else:
print('\tNote the dmg file is not compressed... Consider defining the compressCmd to enable compression.')
print('\tFinished building release: ' + os.path.basename(dmgFile) + '\n')
# Perform cleanup
shutil.rmtree(tmpPath)
@@ -297,7 +319,7 @@ def buildDistTree(aBuildPath, aRootPath, aArgs, aJreNode):
# Update the .DS_Store file to reflect the new volume name
srcPath = os.path.join(aRootPath, '.DS_Store')
classPath = appInstallRoot + '/lib/glum-2.0.0.jar:' + appInstallRoot + '/lib/distMaker-0.70.jar:' + appInstallRoot + '/lib/guava-18.0.jar'
classPath = appInstallRoot + '/lib/glum-2.0.0.jar:' + appInstallRoot + '/lib/distMaker-0.71.jar:' + appInstallRoot + '/lib/guava-18.0.jar'
cmd = ['java', '-cp', classPath, 'dsstore.MainApp', srcPath, appName]
proc = miscUtils.executeAndLog(cmd, "\t\tdsstore.MainApp: ")
if proc.returncode != 0:

View File

@@ -28,7 +28,7 @@ import glum.version.Version;
public class DistApp
{
/** The DistMaker version is defined here. */
public static final Version version = new PlainVersion(0, 70, 0);
public static final Version version = new PlainVersion(0, 71, 0);
/**
* Main entry point that will print out the version of DistMaker to stdout.

View File

@@ -11,7 +11,7 @@ import traceback
# Define the (baseline) version
baseVersion = "0.70"
baseVersion = "0.71"
# Define relevant base names
appBaseName = 'DistMaker'