Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DocExplore
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander BURNETT
DocExplore
Commits
233d2d3e
Commit
233d2d3e
authored
6 years ago
by
aburn
Browse files
Options
Downloads
Patches
Plain Diff
Extended deferred scripts
parent
219c5c1a
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/org/interreg/docexplore/OsUtils.java
+3
-1
3 additions, 1 deletion
src/org/interreg/docexplore/OsUtils.java
src/org/interreg/docexplore/Uninstaller.java
+1
-3
1 addition, 3 deletions
src/org/interreg/docexplore/Uninstaller.java
src/version.xml
+1
-1
1 addition, 1 deletion
src/version.xml
with
5 additions
and
5 deletions
src/org/interreg/docexplore/OsUtils.java
+
3
−
1
View file @
233d2d3e
...
@@ -103,6 +103,7 @@ public class OsUtils
...
@@ -103,6 +103,7 @@ public class OsUtils
out
.
write
(
" goto :loop\r\n"
);
out
.
write
(
" goto :loop\r\n"
);
out
.
write
(
")\r\n"
);
out
.
write
(
")\r\n"
);
out
.
write
(
script
);
out
.
write
(
script
);
out
.
write
(
"DEL \"%~f0\"\r\n"
);
out
.
close
();
out
.
close
();
}
}
else
if
(
SystemUtils
.
IS_OS_MAC
)
else
if
(
SystemUtils
.
IS_OS_MAC
)
...
@@ -112,6 +113,7 @@ public class OsUtils
...
@@ -112,6 +113,7 @@ public class OsUtils
out
.
write
(
"#!/bin/bash\n"
);
out
.
write
(
"#!/bin/bash\n"
);
out
.
write
(
"while kill -0 "
+
DocExploreTool
.
processPid
+
" 2> /dev/null; do sleep 1; done;\n"
);
out
.
write
(
"while kill -0 "
+
DocExploreTool
.
processPid
+
" 2> /dev/null; do sleep 1; done;\n"
);
out
.
write
(
script
);
out
.
write
(
script
);
out
.
write
(
"rm $0\n"
);
out
.
close
();
out
.
close
();
scriptFile
.
setExecutable
(
true
);
scriptFile
.
setExecutable
(
true
);
}
}
...
@@ -122,6 +124,7 @@ public class OsUtils
...
@@ -122,6 +124,7 @@ public class OsUtils
out
.
write
(
"#!/bin/bash\n"
);
out
.
write
(
"#!/bin/bash\n"
);
out
.
write
(
"while kill -0 "
+
DocExploreTool
.
processPid
+
" 2> /dev/null; do sleep 1; done;\n"
);
out
.
write
(
"while kill -0 "
+
DocExploreTool
.
processPid
+
" 2> /dev/null; do sleep 1; done;\n"
);
out
.
write
(
script
);
out
.
write
(
script
);
out
.
write
(
"rm $0\n"
);
out
.
close
();
out
.
close
();
scriptFile
.
setExecutable
(
true
);
scriptFile
.
setExecutable
(
true
);
}
}
...
@@ -160,7 +163,6 @@ public class OsUtils
...
@@ -160,7 +163,6 @@ public class OsUtils
{
{
StringBuffer
out
=
new
StringBuffer
();
StringBuffer
out
=
new
StringBuffer
();
out
.
append
(
"open -a \""
+
DocExploreTool
.
getExecutableDir
()+
"/../..\"\n"
);
out
.
append
(
"open -a \""
+
DocExploreTool
.
getExecutableDir
()+
"/../..\"\n"
);
out
.
append
(
"rm $0\n"
);
File
script
=
buildDeferredScript
(
".docexplore-"
+
DocExplore
.
familyVersion
()+
"-relaunch.sh"
,
out
.
toString
());
File
script
=
buildDeferredScript
(
".docexplore-"
+
DocExplore
.
familyVersion
()+
"-relaunch.sh"
,
out
.
toString
());
Runtime
.
getRuntime
().
exec
(
new
String
[]
{
"./"
+
script
.
getName
()},
null
,
new
File
(
System
.
getProperty
(
"user.home"
)));
Runtime
.
getRuntime
().
exec
(
new
String
[]
{
"./"
+
script
.
getName
()},
null
,
new
File
(
System
.
getProperty
(
"user.home"
)));
}
}
...
...
This diff is collapsed.
Click to expand it.
src/org/interreg/docexplore/Uninstaller.java
+
1
−
3
View file @
233d2d3e
...
@@ -149,7 +149,6 @@ public class Uninstaller
...
@@ -149,7 +149,6 @@ public class Uninstaller
if
(
appEntry
.
exists
())
if
(
appEntry
.
exists
())
out
.
append
(
"rmdir /S /Q \""
+
appEntry
.
getCanonicalPath
()+
"\"\r\n"
);
out
.
append
(
"rmdir /S /Q \""
+
appEntry
.
getCanonicalPath
()+
"\"\r\n"
);
}
}
out
.
append
(
"DEL \"%~f0\"\r\n"
);
File
script
=
OsUtils
.
buildDeferredScript
(
".docexplore-uninstall.bat"
,
out
.
toString
());
File
script
=
OsUtils
.
buildDeferredScript
(
".docexplore-uninstall.bat"
,
out
.
toString
());
JOptionPane
.
showMessageDialog
(
null
,
Lang
.
s
(
"uninstallExitMessage"
));
JOptionPane
.
showMessageDialog
(
null
,
Lang
.
s
(
"uninstallExitMessage"
));
Runtime
.
getRuntime
().
exec
(
new
String
[]
{
Runtime
.
getRuntime
().
exec
(
new
String
[]
{
...
@@ -164,7 +163,7 @@ public class Uninstaller
...
@@ -164,7 +163,7 @@ public class Uninstaller
StringBuffer
out
=
new
StringBuffer
();
StringBuffer
out
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
binaryDirs
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
binaryDirs
.
size
();
i
++)
{
{
out
.
append
(
"sudo rm -rf
\"
"
+
binaryDirs
.
get
(
i
)[
0
]+
"\
"\
n"
);
out
.
append
(
"sudo rm -rf "
+
binaryDirs
.
get
(
i
)[
0
]+
"\n"
);
if
(!
binaryDirs
.
get
(
i
)[
1
].
equals
(
"2.0"
))
if
(!
binaryDirs
.
get
(
i
)[
1
].
equals
(
"2.0"
))
{
{
File
appEntry
=
new
File
(
System
.
getProperty
(
"user.home"
)+
"/.local/share/applications/docexplore-"
+
binaryDirs
.
get
(
i
)[
1
]+
".desktop"
);
File
appEntry
=
new
File
(
System
.
getProperty
(
"user.home"
)+
"/.local/share/applications/docexplore-"
+
binaryDirs
.
get
(
i
)[
1
]+
".desktop"
);
...
@@ -172,7 +171,6 @@ public class Uninstaller
...
@@ -172,7 +171,6 @@ public class Uninstaller
out
.
append
(
"sudo rm -f \""
+
appEntry
.
getCanonicalPath
()+
"\"\n"
);
out
.
append
(
"sudo rm -f \""
+
appEntry
.
getCanonicalPath
()+
"\"\n"
);
}
}
}
}
out
.
append
(
"rm $0\n"
);
File
script
=
OsUtils
.
buildDeferredScript
(
".docexplore-uninstall.sh"
,
out
.
toString
());
File
script
=
OsUtils
.
buildDeferredScript
(
".docexplore-uninstall.sh"
,
out
.
toString
());
JOptionPane
.
showMessageDialog
(
null
,
Lang
.
s
(
"uninstallExitMessage"
));
JOptionPane
.
showMessageDialog
(
null
,
Lang
.
s
(
"uninstallExitMessage"
));
Runtime
.
getRuntime
().
exec
(
new
String
[]
{
Runtime
.
getRuntime
().
exec
(
new
String
[]
{
...
...
This diff is collapsed.
Click to expand it.
src/version.xml
+
1
−
1
View file @
233d2d3e
<version>
<version>
<major>
3
</major>
<major>
3
</major>
<minor>
0
</minor>
<minor>
0
</minor>
<build>
3
1
</build>
<build>
3
3
</build>
</version>
</version>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
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