Skip to content

Commit 5d32b23

Browse files
committed
extend verifications
1 parent 8af0bb4 commit 5d32b23

3 files changed

Lines changed: 64 additions & 1 deletion

File tree

release/macos/build_package_macos.sh

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,41 @@ rm "$TEMP_ZIP2"
9797

9898
# Verify the downloads and extraction
9999
echo "Verifying extracted resources..."
100-
if [ ! -d "${CONTENTS_FOLDER}/MacOS/_internal/alphaquant/resources/" ]; then
100+
RESOURCES_DIR="${CONTENTS_FOLDER}/MacOS/_internal/alphaquant/resources"
101+
if [ ! -d "$RESOURCES_DIR" ]; then
101102
echo "Error: Resources directory not found after extraction"
102103
exit 1
103104
fi
105+
106+
# Verify that specific database subdirectories exist
107+
REFERENCE_DB_DIR="$RESOURCES_DIR/reference_databases"
108+
PHOSPHOPRED_DB_DIR="$RESOURCES_DIR/phosphopred_databases"
109+
110+
echo "Checking for reference_databases directory..."
111+
if [ ! -d "$REFERENCE_DB_DIR" ]; then
112+
echo "Error: reference_databases directory not found at $REFERENCE_DB_DIR"
113+
exit 1
114+
fi
115+
116+
echo "Checking for phosphopred_databases directory..."
117+
if [ ! -d "$PHOSPHOPRED_DB_DIR" ]; then
118+
echo "Error: phosphopred_databases directory not found at $PHOSPHOPRED_DB_DIR"
119+
exit 1
120+
fi
121+
122+
# Verify that the phosphopred database contains the expected file
123+
HUMAN_PHOSPHO_FILE="$PHOSPHOPRED_DB_DIR/human_uniprot_reviewed_phos_prob.tsv"
124+
if [ ! -f "$HUMAN_PHOSPHO_FILE" ]; then
125+
echo "Error: Expected phosphopred database file not found at $HUMAN_PHOSPHO_FILE"
126+
echo "Contents of phosphopred_databases directory:"
127+
ls -la "$PHOSPHOPRED_DB_DIR"
128+
exit 1
129+
fi
130+
104131
echo "Resources successfully downloaded and extracted"
132+
echo " - reference_databases: OK"
133+
echo " - phosphopred_databases: OK"
134+
echo " - human_uniprot_reviewed_phos_prob.tsv: OK"
105135

106136
###Download section complete
107137

release/windows/alphaquant_innoinstaller.iss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{
4545
[Dirs]
4646
; Create the alphamap (no typo!) data directory and ensure users can modify it. This is where AlphaMap (which is imported by AlphaQuant) stores downloaded data, such as fasta files.
4747
Name: "{app}\_internal\alphamap\data"; Permissions: users-modify
48+
; Ensure alphaquant resources directories exist and are readable
49+
Name: "{app}\_internal\alphaquant\resources"; Permissions: users-read
50+
Name: "{app}\_internal\alphaquant\resources\reference_databases"; Permissions: users-read
51+
Name: "{app}\_internal\alphaquant\resources\phosphopred_databases"; Permissions: users-read
4852

4953
[Files]
5054
Source: "..\..\dist_pyinstaller\alphaquant_gui\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion

release/windows/build_package_windows.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,36 @@ if (-not (Test-Path -Path $resourcesDir)) {
8181
Write-Host "Error: Resources directory not found after extraction"
8282
exit 1
8383
}
84+
85+
# Verify that specific database subdirectories exist
86+
$referenceDbDir = Join-Path $resourcesDir "reference_databases"
87+
$phosphopredDbDir = Join-Path $resourcesDir "phosphopred_databases"
88+
89+
Write-Host "Checking for reference_databases directory..."
90+
if (-not (Test-Path -Path $referenceDbDir)) {
91+
Write-Host "Error: reference_databases directory not found at $referenceDbDir"
92+
exit 1
93+
}
94+
95+
Write-Host "Checking for phosphopred_databases directory..."
96+
if (-not (Test-Path -Path $phosphopredDbDir)) {
97+
Write-Host "Error: phosphopred_databases directory not found at $phosphopredDbDir"
98+
exit 1
99+
}
100+
101+
# Verify that the phosphopred database contains the expected file
102+
$humanPhosphoFile = Join-Path $phosphopredDbDir "human_uniprot_reviewed_phos_prob.tsv"
103+
if (-not (Test-Path -Path $humanPhosphoFile)) {
104+
Write-Host "Error: Expected phosphopred database file not found at $humanPhosphoFile"
105+
Write-Host "Contents of phosphopred_databases directory:"
106+
Get-ChildItem -Path $phosphopredDbDir -Recurse | Format-Table Name, FullName
107+
exit 1
108+
}
109+
84110
Write-Host "Resources successfully downloaded and extracted"
111+
Write-Host " - reference_databases: OK"
112+
Write-Host " - phosphopred_databases: OK"
113+
Write-Host " - human_uniprot_reviewed_phos_prob.tsv: OK"
85114

86115
# Wrapping the pyinstaller folder in a .exe package
87116
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" .\release\windows\alphaquant_innoinstaller.iss

0 commit comments

Comments
 (0)