Commit Graph

11 Commits

Author SHA1 Message Date
EvilSpirit
5744d1d599 Implement an image request. 2017-03-12 00:13:56 +00:00
whitequark
e2e74762f4 Rework path and file operations to be more robust.
This commit updates a *lot* of rather questionable path handling
logic to be robust. Specifically:
  * All path operations go through Platform::Path.
  * All ad-hoc path handling functions are removed, together with
    PATH_SEP. This removes code that was in platform-independent
    parts, but had platform-dependent behavior.
  * Group::linkFileRel is removed; only an absolute path is stored
    in Group::linkFile. However, only Group::linkFileRel is saved,
    with the relative path calculated on the fly, from the filename
    passed into SaveToFile. This eliminates dependence on global
    state, and makes it unnecessary to have separare code paths
    for saved and not yet saved files.
  * In a departure from previous practice, functions with
    platform-independent code but platform-dependent behavior
    are all grouped under platform/. This makes it easy to grep
    for functions with platform-dependent behavior.
  * Similarly, new (GUI-independent) code for all platforms is added
    in the same platform.cpp file, guarded with #ifs. It turns out
    that implementations for different platforms had a lot of shared
    code that tended to go out of sync.
2017-03-11 18:58:53 +00:00
whitequark
15f349049c Make CLI usage text more readable. 2017-03-10 21:05:52 +00:00
EvilSpirit
312184505c Fix undefined behavior in solvespace-cli. 2017-02-17 02:52:19 +00:00
whitequark
279424290b Remove a redundant ReloadAllImported() call. 2017-01-31 02:20:10 +00:00
whitequark
6e88eaef69 Fix a path construction issue introduced in 3fc85b7. 2017-01-31 02:15:37 +00:00
whitequark
3fc85b7934 CLI: add the "regenerate" command, for use in Makefiles etc. 2017-01-24 19:55:53 +00:00
whitequark
27a5f6f9bd CLI: include directory name in %-replacement. 2017-01-24 19:54:47 +00:00
whitequark
67a916d19c CLI: show usage when --help/-h passed. 2017-01-24 19:40:30 +00:00
whitequark
4a0b4fd8d3 Win32: unbreak solvespace-cli.
It was broken because of three bugs:
  * Uninitialized variables in RunCommand;
  * Trying to use (OEM-encoded) main() argc/argv arguments instead
    of GetCommandLineW();
  * Trying to pass relative paths directly into ssfopen.
2016-12-05 01:24:17 +00:00
whitequark
47244c5e89 Implement a command-line interface.
This commit adds a basic command-line interface. This interface
allows rendering thumbnails and exporting data in batch mode.
2016-11-29 04:01:07 +00:00