parser = OptionParser(usage="usage: %prog [options] <filename>.stl")
parser.add_option("-i", "--ini", action="store", type="string", dest="profileini", help="Load settings from a profile ini file")
parser.add_option("-P", "--project", action="store_true", dest="openprojectplanner", help="Open the project planner")
- parser.add_option("-F", "--flat", action="store_true", dest="openflatslicer", help="Open the 2D SVG slicer")
+ parser.add_option("-F", "--flat", action="store_true", dest="openflatslicer", help="Open the 2D SVG slicer (unfinished)")
parser.add_option("-r", "--print", action="store", type="string", dest="printfile", help="Open the printing interface, instead of the normal cura interface.")
parser.add_option("-p", "--profile", action="store", type="string", dest="profile", help="Internal option, do not use!")
+ parser.add_option("-s", "--slice", action="store_true", dest="slice", help="Slice the given files instead of opening them in Cura")
(options, args) = parser.parse_args()
if options.profile != None:
profile.loadGlobalProfileFromString(options.profile)
printWindow.startPrintInterface(options.printfile)
return
- if len( args ) > 0:
+ if options.slice != None:
sliceRun.runSlice(args)
else:
+ if len(args) > 0:
+ profile.putPreference('lastFile', ';'.join(args))
from gui import mainWindow
mainWindow.main()
mainScriptFile = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../..", "cura_sf.zip"))
else:
mainScriptFile = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", os.path.split(sys.argv[0])[1]))
- cmd = [pypyExe, mainScriptFile, '-p', profile.getGlobalProfileString()]
+ cmd = [pypyExe, mainScriptFile, '-p', profile.getGlobalProfileString(), '-s']
if platform.system() == "Windows":
try:
cmd.append(str(filename))
fi
SCRIPT_DIR=`dirname $0`
-python ${SCRIPT_DIR}/Cura/cura.py
+python ${SCRIPT_DIR}/Cura/cura.py $@
fi
SCRIPT_DIR=`dirname $0`
-python ${SCRIPT_DIR}/Cura/cura.py
+python ${SCRIPT_DIR}/Cura/cura.py $@
-@python\python.exe Cura\cura.py
+@python\python.exe Cura\cura.py %*
+
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
+; Don't show the component description box
+!define MUI_COMPONENTSPAGE_NODESC
;Do not leave (Un)Installer page automaticly
!define MUI_FINISHPAGE_NOAUTOCLOSE
; Pages
;!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
;--------------------------------
; The stuff to install
-Section "Cura Installer"
+Section "Cura ${VERSION}"
SectionIn RO
SectionEnd
+Section "Open STL files with Cura"
+ WriteRegStr HKCR .stl "" "STL file"
+ ;WriteRegStr HKCR "STL file\DefaultIcon" "" "$INSTDIR\stl.ico,0"
+ WriteRegStr HKCR "STL file\shell" "" "open"
+ WriteRegStr HKCR "STL file\shell\open\command" "" '"$INSTDIR\cura.bat" "%1"'
+SectionEnd
+
;--------------------------------
; Uninstaller