Opened 8 years ago

Closed 7 years ago

#419 closed enhancement (fixed)

Remove assumptions of a file-based install

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry API 0.2
Component: WarFoundry-API Version: Unknown or N/A
Keywords: files resources Cc:
Blocked By: Blocking: #418

Description

The existing libraries assume that the main install will be file-based and that we can find files (e.g. schemas and default data files) relative to the executable. We should move away from this and to a resource-based system for two reasons:

1) This assumption doesn't hold on Android
2) It was a bad idea for a lot of our files anyway, because people can delete important files, which isn't possible with resources

Change History (14)

comment:1 Changed 8 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:2 Changed 8 years ago by ibboard

Blocking: 418 added

comment:3 Changed 7 years ago by IBBoard <dev@…>

In 81f32062c9fa4c4fb016b80d2622beebbc1a3051/IBBoard.WarFoundry.API:

Re #419: Remove assumptions of a file-based install

  • Convert schemas to resources and load them from there
  • Remove use of "data" folder relative to exe location from default "Hacks" (GTK/WinForms GUIs can re-add it locally)

comment:4 Changed 7 years ago by IBBoard <dev@…>

In 1ed2f3ab5e358e99ab4a6ac7d036fc1b187d2370/IBBoard.WarFoundry.API:

Re #419: Remove assumptions of a file-based install

  • Swap API to using new "loadable object" and "loadable object source" wrappers to allow file-based or memory-based loading

comment:5 Changed 7 years ago by IBBoard <dev@…>

In 4d6c927442540f1fe643338701ae60ab563c2b43/IBBoard.WarFoundry.API:

Re #419: Remove assumptions of a file-based install

  • Embed sample files as resources
  • Load the sample files as a "hack"

comment:6 Changed 7 years ago by IBBoard <dev@…>

In aa0d18816cf84033a4ac01ea473e4ee7b511647f/IBBoard.WarFoundry.API:

Re #419: Remove assumptions of a file-based install

  • Remove unused FileInfo object property

comment:7 Changed 7 years ago by IBBoard <dev@…>

In 7c21ca1482cb13b071c850d7cb857b37f7cba4b5/IBBoard.WarFoundry.API.Tests:

Re #419: Remove assumptions of a file-based install

  • Update tests to use new "loadable object" and "loadable object source" wrappers

comment:8 Changed 7 years ago by IBBoard <dev@…>

In 6ec46f3db2d4876af9723edbe99b1620d9d43e5e/IBBoard.WarFoundry.API.Tests:

Re #419: Remove assumptions of a file-based install

  • Test loading from resources

comment:9 Changed 7 years ago by IBBoard <dev@…>

In d6883a522c70a6f497d87f674d93573544444d77/IBBoard.WarFoundry.API.Tests:

Re #419: Remove assumptions of a file-based install

  • Make sure Race files aren't identified as GameSystem files

comment:10 Changed 7 years ago by ibboard

TODO: Move Clutch's XML export with XSL files to using resources for the stock XSL files.

comment:11 Changed 7 years ago by IBBoard <dev@…>

In cd367acd7c489936fb6e3fa4e333b171555cf7f3/IBBoard.WarFoundry.API:

Re #419: Remove assumptions of a file-based install

  • Swap XSLTs to resources
  • Update XSL Exporter to use Streams, not files

comment:12 Changed 7 years ago by IBBoard <dev@…>

In 9808adf2d566f588badacbf18f9d70cefc3f54d5/IBBoard.WarFoundry.GUI.GTK:

Re #419: Remove assumptions of a file-based install

  • Update GTK# GUI to use Streams version of XSLT export

comment:13 Changed 7 years ago by IBBoard <dev@…>

In 4d25c42bbe7b2d9b05b01a815a2eb0cb9939177a/IBBoard.WarFoundry.GUI.WinForms:

Re #419: Remove assumptions of a file-based install

  • Swap to drop-down in WinForms
  • Update to use streams

comment:14 Changed 7 years ago by ibboard

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.