Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #41 from darkdragon-001/setup-local
Browse files Browse the repository at this point in the history
Set prefix for manual installation to /usr/share/local
  • Loading branch information
hvdwolf committed Dec 4, 2018
2 parents 0486f3c + 768205c commit 59b99fa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions install_remove.py
Expand Up @@ -58,7 +58,9 @@ def windows_install():
if len(sys.argv) == 1:
print_usage()
elif len(sys.argv) == 2:
usr_share_path = os.path.join('/', 'usr', 'share')
prefix_path = os.path.join('/', 'usr', 'local')
usr_bin_path = os.path.join(prefix_path, 'bin')
usr_share_path = os.path.join(prefix_path, 'share')
pyexiftoolgui_path = os.path.join(usr_share_path, 'pyexiftoolgui')
if "install" in sys.argv:
OSplatform = platform.system()
Expand All @@ -68,7 +70,7 @@ def windows_install():
windows_install()
print "\nYou have chosen to install pyExiftoolGUI on your system"
print "\n=======================================================\n"
os.system("python setup.py install --install-layout=deb --install-lib=/usr/share/pyexiftoolgui --install-scripts=/usr/bin")
os.system("python setup.py install --install-layout=deb --install-lib=" + pyexiftoolgui_path + " --install-scripts=" + usr_bin_path)
print "\n======================================================="
print "\nIf you didn't see errors on your screen, pyExifToolGui has been installed."
print "In case of errors contact me."
Expand All @@ -85,9 +87,9 @@ def windows_install():
print "Could not remove " + pyexiftoolgui_path
try:
#result = os.remove('/usr/bin/pyexiftoolgui')
result = os.system('rm -rf /usr/bin/pyexiftoolgui')
result = os.system('rm -rf ' + os.path.join(usr_bin_path, 'pyexiftoolgui'))
except:
print "Could not remove /usr/bin/pyexiftoolgui"
print "Could not remove " + os.path.join(usr_bin_path, 'pyexiftoolgui')
try:
#result = os.remove(os.path.join(usr_share_path, 'applications', 'pyexiftoolgui.desktop'))
result = os.system('rm -rf ' + os.path.join(usr_share_path, 'applications', 'pyexiftoolgui.desktop'))
Expand Down

0 comments on commit 59b99fa

Please sign in to comment.