Skip to content

Commit 3ab8ba0

Browse files
Merge aafeecd
2 parents 61e8b63 + aafeecd commit 3ab8ba0

File tree

6 files changed

+222
-188
lines changed

6 files changed

+222
-188
lines changed

.github/scripts/build-linux.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,28 @@ cat << EOF > $package_dir/$PROJECT_NAME
2121
\`dirname "\$0"\`/pharo/bin/pharo \`dirname "\$0"\`/image/$PROJECT_NAME.image
2222
EOF
2323

24-
chmod a+rx $package_dir/$PROJECT_NAME
24+
cat << EOF > $package_dir/$PROJECT_NAME-pharo-ui
25+
#!/bin/bash
26+
pharo-ui \`dirname "\$0"\`/image/$PROJECT_NAME.image
27+
EOF
28+
29+
cat << EOF > $package_dir/README.txt
30+
To run OpenPonk on Debian-based and Ubuntu-based Linux distros, simply use $PROJECT_NAME executable.
31+
32+
-- ArchLinux, Fedora and OpenSUSE installation --
33+
ArchLinux, Fedora and OpenSUSE require installation of Pharo programming language (sudo privileges needed).
34+
35+
1. Open Pharo builds website: https://software.opensuse.org/download.html?project=devel:languages:pharo:latest&package=pharo9-ui
36+
2. Select your Linux distribution.
37+
3. Select "Add repository and install manually".
38+
4. Follow shown instruction if any and execute shown bash code in terminal - one line at a time.
39+
You might need to prepend "sudo" before each line.
40+
If your distro version number does not match given options, try manually changing the version number in shown code.
41+
42+
After Pharo is installed, you may run OpenPonk using $PROJECT_NAME-pharo-ui executable.
43+
EOF
44+
45+
chmod a+rx $package_dir/$PROJECT_NAME $package_dir/$PROJECT_NAME-pharo-ui
2546

2647
"$vm_dir/bin/pharo" --headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'"
2748

.github/scripts/build-win.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ cp $vm_dir/*.dll $package_dir/Pharo
2222
cp $vm_dir/Pharo.exe $package_dir/Pharo
2323
cp $vm_dir/PharoConsole.exe $package_dir/Pharo
2424

25-
"start %~dp0Pharo\Pharo.exe %~dp0image\$PROJECT_NAME.image" | set-content "$package_dir/$PROJECT_NAME.bat"
25+
"`$openponk_path=`"`$PSScriptRoot\`" -replace '\\\\','\' -replace '\\+.*\.cvut\.cz\\[^\\]*\\[^\\]*','X:'
26+
echo `"Opening OpenPonk on path: `${openponk_path}`"
27+
Start-Process -FilePath `${openponk_path}Pharo\Pharo.exe `${openponk_path}image\$PROJECT_NAME.image" | set-content "$package_dir/$PROJECT_NAME.ps1"
28+
29+
"powershell -executionpolicy remotesigned -File %~dp0$PROJECT_NAME.ps1" | set-content "$package_dir/$PROJECT_NAME.bat"
30+
31+
"Open using $PROJECT_NAME.bat or $PROJECT_NAME.ps1 (bat just executes the ps1 in powershell).
32+
33+
OpenPonk does not work when executed from network drives (like \\example.com\home\Downloads), unless accessed via mapped letter drive (like X:\). There is a hardcoded fix only for cvut.cz student home directories." | set-content "$package_dir/README.txt"
2634

2735
& $vm_dir/PharoConsole.exe -headless $package_dir/image/$PROJECT_NAME.image eval --save "OPVersion currentWithRunId: $RUN_ID projectName: '$REPOSITORY_NAME'"
2836

repository/OpenPonk-ClassEditor/OPUMLExtensionEnd.extension.st

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -12,103 +12,103 @@ OPUMLExtensionEnd >> notationMultiplicityRange [
1212

1313
{ #category : #'*OpenPonk-ClassEditor' }
1414
OPUMLExtensionEnd >> notationString [
15-
^ String
16-
streamContents: [ :stream |
17-
(OPUMLVisibilityKind notationFor: self visibility)
18-
ifNotEmpty: [ :v |
19-
stream
20-
nextPutAll: v;
21-
nextPutAll: ' ' ].
22-
self isDerived
23-
ifTrue: [ stream << '/' ].
24-
self name ifNotNil: [ stream << self name ].
25-
self type
26-
ifNotNil: [ stream
27-
<< ' : ';
28-
<< self type name ].
29-
self notationMultiplicityRange
30-
ifNotEmpty: [ :range | stream nextPutAll: '[' , range , ']' ].
31-
(self defaultValue isKindOf: OPUMLOpaqueExpression)
32-
ifTrue: [ stream
33-
<< ' = ';
34-
<< self defaultValue bodies first ].
35-
true
36-
ifTrue: [ | props |
37-
props := OrderedCollection new.
38-
self isReadOnly
39-
ifTrue: [ props add: #readOnly ].
40-
self isOrdered
41-
ifTrue: [ props add: #ordered ].
42-
self isMultivalued & self isUnique not
43-
ifTrue: [ props add: #nonunique ].
44-
props
45-
ifNotEmpty: [ stream << ' {'.
46-
props do: [ :each | stream << each ] separatedBy: [ stream << ', ' ].
47-
stream << '}' ] ] ]
15+
16+
^ String streamContents: [ :stream |
17+
(OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
18+
:v |
19+
stream
20+
nextPutAll: v;
21+
nextPutAll: ' ' ].
22+
self isDerived ifTrue: [ stream << '/' ].
23+
self name ifNotNil: [ stream << self name ].
24+
self type ifNotNil: [
25+
stream
26+
<< ' : ';
27+
<< self type name ].
28+
self notationMultiplicityRange ifNotEmpty: [ :range |
29+
stream nextPutAll: '[' , range , ']' ].
30+
((self defaultValue isKindOf: OPUMLOpaqueExpression) and: [
31+
self defaultValue bodies isNotEmpty ]) ifTrue: [
32+
stream
33+
<< ' = ';
34+
<< self defaultValue bodies first ].
35+
true ifTrue: [
36+
| props |
37+
props := OrderedCollection new.
38+
self isReadOnly ifTrue: [ props add: #readOnly ].
39+
self isOrdered ifTrue: [ props add: #ordered ].
40+
self isMultivalued & self isUnique not ifTrue: [
41+
props add: #nonunique ].
42+
props ifNotEmpty: [
43+
stream << ' {'.
44+
props
45+
do: [ :each | stream << each ]
46+
separatedBy: [ stream << ', ' ].
47+
stream << '}' ] ] ]
4848
]
4949

5050
{ #category : #'*OpenPonk-ClassEditor' }
5151
OPUMLExtensionEnd >> notationStringAsRoleName [
52-
^ String
53-
streamContents: [ :stream |
54-
(OPUMLVisibilityKind notationFor: self visibility)
55-
ifNotEmpty: [ :v |
56-
stream
57-
nextPutAll: v;
58-
nextPutAll: ' ' ].
59-
self isDerived
60-
ifTrue: [ stream << '/' ].
61-
self name ifNotNil: [ stream << self name ].
62-
self notationMultiplicityRange
63-
ifNotEmpty: [ :range | stream nextPutAll: '[' , range , ']' ].
64-
(self defaultValue isKindOf: OPUMLOpaqueExpression)
65-
ifTrue: [ stream
66-
<< ' = ';
67-
<< self defaultValue bodies first ].
68-
true
69-
ifTrue: [ | props |
70-
props := OrderedCollection new.
71-
self isReadOnly
72-
ifTrue: [ props add: #readOnly ].
73-
self isOrdered
74-
ifTrue: [ props add: #ordered ].
75-
self isMultivalued & self isUnique not
76-
ifTrue: [ props add: #nonunique ].
77-
props
78-
ifNotEmpty: [ stream << ' {'.
79-
props do: [ :each | stream << each ] separatedBy: [ stream << ', ' ].
80-
stream << '}' ] ] ]
52+
53+
^ String streamContents: [ :stream |
54+
(OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
55+
:v |
56+
stream
57+
nextPutAll: v;
58+
nextPutAll: ' ' ].
59+
self isDerived ifTrue: [ stream << '/' ].
60+
self name ifNotNil: [ stream << self name ].
61+
self notationMultiplicityRange ifNotEmpty: [ :range |
62+
stream nextPutAll: '[' , range , ']' ].
63+
((self defaultValue isKindOf: OPUMLOpaqueExpression) and: [
64+
self defaultValue bodies isNotEmpty ]) ifTrue: [
65+
stream
66+
<< ' = ';
67+
<< self defaultValue bodies first ].
68+
true ifTrue: [
69+
| props |
70+
props := OrderedCollection new.
71+
self isReadOnly ifTrue: [ props add: #readOnly ].
72+
self isOrdered ifTrue: [ props add: #ordered ].
73+
self isMultivalued & self isUnique not ifTrue: [
74+
props add: #nonunique ].
75+
props ifNotEmpty: [
76+
stream << ' {'.
77+
props
78+
do: [ :each | stream << each ]
79+
separatedBy: [ stream << ', ' ].
80+
stream << '}' ] ] ]
8181
]
8282

8383
{ #category : #'*OpenPonk-ClassEditor' }
8484
OPUMLExtensionEnd >> notationStringWithoutType [
85-
^ String
86-
streamContents: [ :stream |
87-
(OPUMLVisibilityKind notationFor: self visibility)
88-
ifNotEmpty: [ :v |
89-
stream
90-
nextPutAll: v;
91-
nextPutAll: ' ' ].
92-
self isDerived
93-
ifTrue: [ stream << '/' ].
94-
self name ifNotNil: [ stream << self name ].
95-
self notationMultiplicityRange
96-
ifNotEmpty: [ :range | stream nextPutAll: '[' , range , ']' ].
97-
(self defaultValue isKindOf: OPUMLOpaqueExpression)
98-
ifTrue: [ stream
99-
<< ' = ';
100-
<< self defaultValue bodies first ].
101-
true
102-
ifTrue: [ | props |
103-
props := OrderedCollection new.
104-
self isReadOnly
105-
ifTrue: [ props add: #readOnly ].
106-
self isOrdered
107-
ifTrue: [ props add: #ordered ].
108-
self isMultivalued & self isUnique not
109-
ifTrue: [ props add: #nonunique ].
110-
props
111-
ifNotEmpty: [ stream << ' {'.
112-
props do: [ :each | stream << each ] separatedBy: [ stream << ', ' ].
113-
stream << '}' ] ] ]
85+
86+
^ String streamContents: [ :stream |
87+
(OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
88+
:v |
89+
stream
90+
nextPutAll: v;
91+
nextPutAll: ' ' ].
92+
self isDerived ifTrue: [ stream << '/' ].
93+
self name ifNotNil: [ stream << self name ].
94+
self notationMultiplicityRange ifNotEmpty: [ :range |
95+
stream nextPutAll: '[' , range , ']' ].
96+
((self defaultValue isKindOf: OPUMLOpaqueExpression) and: [
97+
self defaultValue bodies isNotEmpty ]) ifTrue: [
98+
stream
99+
<< ' = ';
100+
<< self defaultValue bodies first ].
101+
true ifTrue: [
102+
| props |
103+
props := OrderedCollection new.
104+
self isReadOnly ifTrue: [ props add: #readOnly ].
105+
self isOrdered ifTrue: [ props add: #ordered ].
106+
self isMultivalued & self isUnique not ifTrue: [
107+
props add: #nonunique ].
108+
props ifNotEmpty: [
109+
stream << ' {'.
110+
props
111+
do: [ :each | stream << each ]
112+
separatedBy: [ stream << ', ' ].
113+
stream << '}' ] ] ]
114114
]

repository/OpenPonk-ClassEditor/OPUMLProperty.extension.st

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,68 +12,69 @@ OPUMLProperty >> notationMultiplicityRange [
1212

1313
{ #category : #'*OpenPonk-ClassEditor' }
1414
OPUMLProperty >> notationString [
15-
^ String
16-
streamContents: [ :stream |
17-
(OPUMLVisibilityKind notationFor: self visibility)
18-
ifNotEmpty: [ :v |
19-
stream
20-
nextPutAll: v;
21-
nextPutAll: ' ' ].
22-
self isDerived
23-
ifTrue: [ stream << '/' ].
24-
self name ifNotNil: [ stream << self name ].
25-
self type
26-
ifNotNil: [ stream
27-
<< ' : ';
28-
<< self type name ].
29-
self notationMultiplicityRange
30-
ifNotEmpty: [ :range | stream nextPutAll: '[' , range , ']' ].
31-
(self defaultValue isKindOf: OPUMLOpaqueExpression)
32-
ifTrue: [ stream
33-
<< ' = ';
34-
<< self defaultValue bodies first ].
35-
true
36-
ifTrue: [ | props |
37-
props := OrderedCollection new.
38-
self isReadOnly
39-
ifTrue: [ props add: #readOnly ].
40-
self isOrdered
41-
ifTrue: [ props add: #ordered ].
42-
self isMultivalued & self isUnique not
43-
ifTrue: [ props add: #nonunique ].
44-
props
45-
ifNotEmpty: [ stream << ' {'.
46-
props do: [ :each | stream << each ] separatedBy: [ stream << ', ' ].
47-
stream << '}' ] ] ]
15+
16+
^ String streamContents: [ :stream |
17+
(OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
18+
:v |
19+
stream
20+
nextPutAll: v;
21+
nextPutAll: ' ' ].
22+
self isDerived ifTrue: [ stream << '/' ].
23+
self name ifNotNil: [ stream << self name ].
24+
self type ifNotNil: [
25+
stream
26+
<< ' : ';
27+
<< self type name ].
28+
self notationMultiplicityRange ifNotEmpty: [ :range |
29+
stream nextPutAll: '[' , range , ']' ].
30+
((self defaultValue isKindOf: OPUMLOpaqueExpression) and: [
31+
self defaultValue bodies isNotEmpty ]) ifTrue: [
32+
stream
33+
<< ' = ';
34+
<< self defaultValue bodies first ].
35+
true ifTrue: [
36+
| props |
37+
props := OrderedCollection new.
38+
self isReadOnly ifTrue: [ props add: #readOnly ].
39+
self isOrdered ifTrue: [ props add: #ordered ].
40+
self isMultivalued & self isUnique not ifTrue: [
41+
props add: #nonunique ].
42+
props ifNotEmpty: [
43+
stream << ' {'.
44+
props
45+
do: [ :each | stream << each ]
46+
separatedBy: [ stream << ', ' ].
47+
stream << '}' ] ] ]
4848
]
4949

5050
{ #category : #'*OpenPonk-ClassEditor' }
5151
OPUMLProperty >> notationStringAsRoleName [
52-
^ String
53-
streamContents: [ :stream |
54-
(OPUMLVisibilityKind notationFor: self visibility)
55-
ifNotEmpty: [ :v |
56-
stream
57-
nextPutAll: v;
58-
nextPutAll: ' ' ].
59-
self isDerived
60-
ifTrue: [ stream << '/' ].
61-
self name ifNotNil: [ stream << self name ].
62-
(self defaultValue isKindOf: OPUMLOpaqueExpression)
63-
ifTrue: [ stream
64-
<< ' = ';
65-
<< self defaultValue bodies first ].
66-
true
67-
ifTrue: [ | props |
68-
props := OrderedCollection new.
69-
self isReadOnly
70-
ifTrue: [ props add: #readOnly ].
71-
self isOrdered
72-
ifTrue: [ props add: #ordered ].
73-
self isMultivalued & self isUnique not
74-
ifTrue: [ props add: #nonunique ].
75-
props
76-
ifNotEmpty: [ stream << ' {'.
77-
props do: [ :each | stream << each ] separatedBy: [ stream << ', ' ].
78-
stream << '}' ] ] ]
52+
53+
^ String streamContents: [ :stream |
54+
(OPUMLVisibilityKind notationFor: self visibility) ifNotEmpty: [
55+
:v |
56+
stream
57+
nextPutAll: v;
58+
nextPutAll: ' ' ].
59+
self isDerived ifTrue: [ stream << '/' ].
60+
self name ifNotNil: [ stream << self name ].
61+
62+
((self defaultValue isKindOf: OPUMLOpaqueExpression) and: [
63+
self defaultValue bodies isNotEmpty ]) ifTrue: [
64+
stream
65+
<< ' = ';
66+
<< self defaultValue bodies first ].
67+
true ifTrue: [
68+
| props |
69+
props := OrderedCollection new.
70+
self isReadOnly ifTrue: [ props add: #readOnly ].
71+
self isOrdered ifTrue: [ props add: #ordered ].
72+
self isMultivalued & self isUnique not ifTrue: [
73+
props add: #nonunique ].
74+
props ifNotEmpty: [
75+
stream << ' {'.
76+
props
77+
do: [ :each | stream << each ]
78+
separatedBy: [ stream << ', ' ].
79+
stream << '}' ] ] ]
7980
]

0 commit comments

Comments
 (0)