chiark / gitweb /
Fix the double click on STL/OBJ files.
authordaid303 <daid303@gmail.com>
Wed, 26 Dec 2012 10:39:24 +0000 (11:39 +0100)
committerdaid303 <daid303@gmail.com>
Wed, 26 Dec 2012 10:39:24 +0000 (11:39 +0100)
scripts/win32/installer.nsi

index a9d639de10b797e34c85b44b474629d21af3c2ba..e86c13769d6b82110caf2299973cbcd6581f14f1 100644 (file)
@@ -120,7 +120,7 @@ Section "Open STL files with Cura"
        DeleteRegValue HKCR .stl "Content Type"
        WriteRegStr HKCR "Cura STL model file\DefaultIcon" "" "$INSTDIR\Cura\resources\stl.ico,0"
        WriteRegStr HKCR "Cura STL model file\shell" "" "open"
-       WriteRegStr HKCR "Cura STL model file\shell\open\command" "" '"$INSTDIR\python\pythonw.exe" "$INSTDIR\Cura\cura.py" "%1"'
+       WriteRegStr HKCR "Cura STL model file\shell\open\command" "" '"$INSTDIR\python\pythonw.exe" -c "import os; os.chdir(\"$INSTDIR\"); import Cura.cura; Cura.cura.main()" "%1"'
 SectionEnd
 
 Section /o "Open OBJ files with Cura"
@@ -128,7 +128,7 @@ Section /o "Open OBJ files with Cura"
        DeleteRegValue HKCR .obj "Content Type"
        WriteRegStr HKCR "Cura OBJ model file\DefaultIcon" "" "$INSTDIR\Cura\resources\stl.ico,0"
        WriteRegStr HKCR "Cura OBJ model file\shell" "" "open"
-       WriteRegStr HKCR "Cura OBJ model file\shell\open\command" "" '"$INSTDIR\python\pythonw.exe" "$INSTDIR\Cura\cura.py" "%1"'
+       WriteRegStr HKCR "Cura OBJ model file\shell\open\command" "" '"$INSTDIR\python\pythonw.exe" -c "import os; os.chdir(\"$INSTDIR\"); import Cura.cura; Cura.cura.main()" "%1"'
 SectionEnd
 
 ;--------------------------------