Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Crafty Installer - Windows
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
Crafty Controller
Crafty Installer - Windows
Compare revisions
e45abed30fcddd4dd531ad79afb03511a5552d3e to 4c8a92707f461428fc30d1c786866b44feccf25c
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
crafty-controller/crafty-installer-windows
Select target project
No results found
4c8a92707f461428fc30d1c786866b44feccf25c
Select Git revision
Swap
Target
crafty-controller/crafty-installer-windows
Select target project
crafty-controller/crafty-installer-windows
1 result
e45abed30fcddd4dd531ad79afb03511a5552d3e
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
More Fixing Directory Checking
· 688d3eba
MCgamin1738
authored
5 years ago
688d3eba
Merge branch 'master' of
https://gitlab.com/crafty-controller/crafty-installer-windows
· 4c8a9270
MCgamin1738
authored
5 years ago
4c8a9270
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Installer.py
+19
-4
19 additions, 4 deletions
Installer.py
TEST.py
+0
-0
0 additions, 0 deletions
TEST.py
with
19 additions
and
4 deletions
Installer.py
View file @
4c8a9270
import
os
import
os
import
time
import
time
import
sys
import
sys
import
subprocess
import
shutil
try
:
try
:
import
pygit2
import
pygit2
from
pathlib
import
Path
from
pathlib
import
Path
...
@@ -42,8 +44,6 @@ def clone(remote_url, path, branch):
...
@@ -42,8 +44,6 @@ def clone(remote_url, path, branch):
file
=
open
(
file_to_open
,
"
w
"
)
file
=
open
(
file_to_open
,
"
w
"
)
file
.
write
(
"
python crafty.py -v
"
)
file
.
write
(
"
python crafty.py -v
"
)
file
.
close
()
file
.
close
()
import
subprocess
import
sys
file
=
open
(
reqfile_to_open
,
"
r
"
)
file
=
open
(
reqfile_to_open
,
"
r
"
)
for
line
in
file
:
for
line
in
file
:
...
@@ -83,17 +83,32 @@ def GUI():
...
@@ -83,17 +83,32 @@ def GUI():
text_input
=
values
[
0
]
text_input
=
values
[
0
]
branch
=
text_input
branch
=
text_input
branch
=
branch
.
lower
()
branch
=
branch
.
lower
()
DirCheck
()
def
DirCheck
():
global
path
global
remote_url
global
branch
if
os
.
path
.
exists
(
path
)
and
os
.
path
.
isdir
(
path
):
if
os
.
path
.
exists
(
path
)
and
os
.
path
.
isdir
(
path
):
if
not
os
.
listdir
(
path
):
if
not
os
.
listdir
(
path
):
clone
(
remote_url
,
branch
,
path
)
clone
(
remote_url
,
branch
,
path
)
else
:
else
:
layout
=
[[
sg
.
Text
(
'
The Directory You Entered Is Not Empty!, Please Enter A Different Directory.
'
)]]
layout
=
[[
sg
.
Text
(
'
The Directory You Entered Is Not Empty!, Please Enter Delete To Delete The Contents, Or Change To Choose A Different Directory
'
)],
[
sg
.
InputText
()],
[
sg
.
Submit
()]]
window
=
sg
.
Window
(
'
Directory Is Not Empty!
'
,
layout
)
window
=
sg
.
Window
(
'
Directory Is Not Empty!
'
,
layout
)
window
.
Finalize
()
window
.
Finalize
()
window
.
TKroot
.
focus_force
()
window
.
TKroot
.
focus_force
()
time
.
sleep
(
5
)
event
,
values
=
window
.
read
(
)
window
.
close
()
window
.
close
()
text_input
=
values
[
0
]
text_input
=
text_input
.
lower
()
if
text_input
==
"
delete
"
:
subprocess
.
run
([
"
rd
"
,
path
,
"
/s
"
,
"
/q
"
])
clone
(
remote_url
,
branch
,
path
)
else
:
GUI
()
GUI
()
GUI
()
else
:
else
:
clone
(
remote_url
,
branch
,
path
)
clone
(
remote_url
,
branch
,
path
)
...
...
This diff is collapsed.
Click to expand it.
TEST.py
0 → 100644
View file @
4c8a9270
This diff is collapsed.
Click to expand it.