Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Codex Overhaul (05/11/24)

Author Topic: For people who use Windows and Libreoffice to mod starsector  (Read 1620 times)

mora

  • Commander
  • ***
  • Posts: 148
    • View Profile
For people who use Windows and Libreoffice to mod starsector
« on: October 26, 2020, 08:25:26 PM »

Each time you open up a CSV with Libreoffice, it asks you what kind of format it should use to open the file. If you only use LibreOffice Calc to edit CSVs for starsector then it becomes annoying after a while. Apparently there is no way to suppress that dialog within the software itself. So instead we make Windows pass on parameters to Libreoffice when double clicking a CSV file from the file explorer which gets rid of the dialog and makes Libreoffice use a formatting suitable for starsector CSVs.
This was tested only on Windows 10, and may not work in older versions of windows.
Also this may not work if you have anything other than English as your system default language.
How to do it
Paste these commands into a command window with admin privileges. (Powershell will not work)
Code
assoc .csv=LibreOffice.Csv
ftype LibreOffice.Csv="%PROGRAMFILES%\LibreOffice\program\scalc.exe" "--infilter='Text - txt - csv (StarCalc)':44,34,0,1,,,false" "%1"
This assumes you have installed Libreoffice in the typical install location. You must change the path to scalc.exe if you installed Libreoffice calc elsewhere.
If the dialog shows up even after this, you must set the default app for .csv files to "LibreOffice Calc"(green icon) instead of "LibreOffice"(gray icon) either through right clicking or from the Settings app.
If you want to save this to a batch file for future use, you must add an additional % character to the "%1" and make it "%%1"
[close]
How to revert to default behavior
Paste these commands into a command window with admin privileges.(Powershell will not work)
Code
assoc .csv=
ftype LibreOffice.Csv=
This will remove the file associations for .csv and LibreOffice should handle CSV files in its default behavior.
[close]
How to get rid of splash screen
This affects all LibreOffice components.
Open this file
Code
C:\Program Files\LibreOffice\program\soffice.ini
with a text editor and change the line
Code
Logo=1
to
Code
Logo=0
[close]
« Last Edit: October 27, 2020, 04:53:10 PM by mora »
Logged