Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ProB Rodin Plugin
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
general
stups
ProB Rodin Plugin
Commits
e09ceabf
Commit
e09ceabf
authored
13 years ago
by
Jens Bendisposto
Browse files
Options
Downloads
Patches
Plain Diff
use 64-bit binary for Linux
parent
374c018e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
de.prob.core/src/de/prob/cli/CliStarter.java
+24
-20
24 additions, 20 deletions
de.prob.core/src/de/prob/cli/CliStarter.java
with
24 additions
and
20 deletions
de.prob.core/src/de/prob/cli/CliStarter.java
+
24
−
20
View file @
e09ceabf
...
...
@@ -41,8 +41,6 @@ public final class CliStarter {
private
static
final
String
[]
JARS
=
new
String
[]
{
"BParser.jar"
,
"ParserAspects.jar"
,
"aspectjrt.jar"
,
"prolog.jar"
};
private
static
Map
<
String
,
OsSpecificInfo
>
OSINFOS
=
createOsInfos
();
private
Process
prologProcess
;
private
String
debuggingKey
;
...
...
@@ -56,17 +54,6 @@ public final class CliStarter {
this
(
null
);
}
private
static
Map
<
String
,
OsSpecificInfo
>
createOsInfos
()
{
Map
<
String
,
OsSpecificInfo
>
infos
=
new
HashMap
<
String
,
CliStarter
.
OsSpecificInfo
>();
infos
.
put
(
Platform
.
OS_MACOSX
,
new
OsSpecificInfo
(
"macos"
,
"probcli.sh"
,
"sh"
,
"send_user_interrupt"
));
infos
.
put
(
Platform
.
OS_LINUX
,
new
OsSpecificInfo
(
"linux"
,
"probcli.sh"
,
"sh"
,
"send_user_interrupt"
));
infos
.
put
(
Platform
.
OS_WIN32
,
new
OsSpecificInfo
(
"windows"
,
"probcli.exe"
,
null
,
"send_user_interrupt.exe"
));
return
Collections
.
unmodifiableMap
(
infos
);
}
public
CliStarter
(
final
File
file
)
throws
CliException
{
startProlog
(
file
);
}
...
...
@@ -97,10 +84,13 @@ public final class CliStarter {
debuggingKey
=
null
;
final
String
os
=
Platform
.
getOS
();
final
String
arch
=
Platform
.
getOSArch
();
final
File
applicationPath
=
getCliPath
();
final
String
fullcp
=
createFullClasspath
(
os
,
applicationPath
);
final
OsSpecificInfo
osInfo
=
getOsInfo
(
os
);
final
OsSpecificInfo
osInfo
=
getOsInfo
(
os
,
arch
);
final
String
osPath
=
applicationPath
+
File
.
separator
+
osInfo
.
subdir
;
final
String
executable
=
osPath
+
File
.
separator
+
osInfo
.
cliName
;
...
...
@@ -161,16 +151,29 @@ public final class CliStarter {
}
private
OsSpecificInfo
getOsInfo
(
final
String
os
)
throws
CliException
{
final
OsSpecificInfo
osInfo
=
OSINFOS
.
get
(
os
);
if
(
osInfo
==
null
)
{
private
OsSpecificInfo
getOsInfo
(
final
String
os
,
String
architecture
)
throws
CliException
{
if
(
os
.
equals
(
Platform
.
OS_MACOSX
))
{
return
new
OsSpecificInfo
(
"macos"
,
"probcli.sh"
,
"sh"
,
"send_user_interrupt"
);
}
if
(
os
.
equals
(
Platform
.
OS_WIN32
))
{
return
new
OsSpecificInfo
(
"windows"
,
"probcli.exe"
,
null
,
"send_user_interrupt.exe"
);
}
if
(
os
.
equals
(
Platform
.
OS_LINUX
))
{
String
linux
=
"linux"
;
if
(
architecture
.
equals
(
Platform
.
ARCH_X86_64
))
{
linux
=
"linux64"
;
}
return
new
OsSpecificInfo
(
linux
,
"probcli.sh"
,
"sh"
,
"send_user_interrupt"
);
}
final
CliException
cliException
=
new
CliException
(
"ProB does not support the plattform: "
+
os
);
cliException
.
notifyUserOnce
();
throw
cliException
;
}
return
osInfo
;
}
@SuppressWarnings
(
"unchecked"
)
private
void
extractCliInformation
(
final
BufferedReader
input
)
...
...
@@ -333,7 +336,8 @@ public final class CliStarter {
public
void
sendUserInterruptReference
()
{
if
(
userInterruptReference
!=
null
)
{
try
{
final
OsSpecificInfo
osInfo
=
getOsInfo
(
Platform
.
getOS
());
final
OsSpecificInfo
osInfo
=
getOsInfo
(
Platform
.
getOS
(),
Platform
.
getOSArch
());
final
String
command
=
getCliPath
()
+
File
.
separator
+
osInfo
.
subdir
+
File
.
separator
+
osInfo
.
userInterruptCmd
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment