Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RDM Infrastructure
irods-clients
Commits
a2c5b92f
Commit
a2c5b92f
authored
Nov 10, 2021
by
Daalen, Tim van
Browse files
making rules and icons findable in executable
parent
72a85f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
gui/irodsDataCompression.py
View file @
a2c5b92f
...
...
@@ -3,6 +3,7 @@ from PyQt5.QtCore import QObject, QThread, pyqtSlot, pyqtSignal
from
PyQt5
import
QtGui
,
QtCore
from
os
import
path
,
getcwd
import
json
import
sys
from
gui.irodsTreeView
import
IrodsModel
from
gui.popupWidgets
import
irodsIndexPopup
...
...
@@ -21,9 +22,14 @@ class irodsDataCompression(QWidget, Ui_tabDataCompression):
+
'
\n
DataCompression view not setup.'
)
return
ruleFiles
=
[
path
.
join
(
getcwd
(),
'rules/tarCollection.r'
),
path
.
join
(
getcwd
(),
'rules/tarReadIndex.r'
),
path
.
join
(
getcwd
(),
'rules/tarExtract.r'
)]
if
getattr
(
sys
,
'frozen'
,
False
):
self
.
basefolder
=
path
.
join
(
path
.
dirname
(
path
.
realpath
(
sys
.
argv
[
0
])),
path
.
pardir
)
else
:
self
.
basefolder
=
path
.
dirname
(
path
.
realpath
(
sys
.
argv
[
0
]))
ruleFiles
=
[
path
.
join
(
self
.
basefolder
,
'rules/tarCollection.r'
),
path
.
join
(
self
.
basefolder
,
'rules/tarReadIndex.r'
),
path
.
join
(
self
.
basefolder
,
'rules/tarExtract.r'
)]
for
rule
in
ruleFiles
:
if
not
path
.
isfile
(
rule
):
self
.
infoPopup
(
'ERROR rules not configured:
\n
'
+
rule
\
...
...
@@ -100,7 +106,7 @@ class irodsDataCompression(QWidget, Ui_tabDataCompression):
self
.
enableButtons
(
False
)
self
.
createStatusLabel
.
clear
()
ruleFile
=
path
.
join
(
getcwd
()
,
'rules/tarCollection.r'
)
ruleFile
=
path
.
join
(
self
.
basefolder
,
'rules/tarCollection.r'
)
idx
,
source
=
self
.
collectionTreeModel
.
get_checked
()
if
not
self
.
ic
.
session
.
collections
.
exists
(
source
):
...
...
@@ -179,7 +185,7 @@ class irodsDataCompression(QWidget, Ui_tabDataCompression):
self
.
enableButtons
(
False
)
self
.
unpackStatusLabel
.
clear
()
ruleFile
=
path
.
join
(
getcwd
()
,
'rules/tarExtract.r'
)
ruleFile
=
path
.
join
(
self
.
basefolder
,
'rules/tarExtract.r'
)
migrateResc
=
self
.
decompressRescButton
.
currentText
()
params
=
{
...
...
@@ -201,7 +207,7 @@ class irodsDataCompression(QWidget, Ui_tabDataCompression):
def
getIndex
(
self
):
self
.
unpackStatusLabel
.
clear
()
ruleFile
=
path
.
join
(
getcwd
()
,
'rules/tarReadIndex.r'
)
ruleFile
=
path
.
join
(
self
.
basefolder
,
'rules/tarReadIndex.r'
)
idx
,
source
=
self
.
compressionTreeModel
.
get_checked
()
if
source
==
None
:
...
...
pyinstaller_script.py
View file @
a2c5b92f
...
...
@@ -54,7 +54,7 @@ def ui_to_py(ui_folder, python):
lines
[(
linenum
+
lineofset
)]
=
spacing
+
text
[
0
]
lines
.
insert
(
linenum
+
lineofset
,
f
"
{
spacing
}
else:
\n
"
)
lines
.
insert
(
linenum
+
lineofset
,
spacing
+
text
[
1
])
lines
.
insert
(
linenum
+
lineofset
,
f
"
{
spacing
}
if getattr(sys, 'frozen',
Tru
e):
\n
"
)
lines
.
insert
(
linenum
+
lineofset
,
f
"
{
spacing
}
if getattr(sys, 'frozen',
Fals
e):
\n
"
)
lineofset
=
lineofset
+
3
lines
.
insert
(
10
,
"import sys
\n
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment