Menu

#39 Suneido resource system

open
nobody
7
2013-12-09
2013-12-09
No

Currently there are a large number of Windows resources embedded in the Suneido executable (icons, cursors, bitmaps, and so forth). Some of these are cSuneido-specific (i.e. the DB rebuild dialog) but most of them are intended to be used from Suneido code. This leads to the following problems:

  • Have to rebuild the .exe every time we want a new resource added.
  • Have to rebuild the jsdi.dll every time we want a new resource added.
  • Ship new binaries and new Suneido code every time we want a new resouce added.
  • Have to keep cSuneido and JSDI in sync.
  • All of the above again every time we want to remove a resource (e.g. the likely obsolete book coil bitmap).
  • The "logical" resources are being "physically" tied to Win32 unnecessarily.
  • jsdi.dll is not a natural home for random resources.

Compounding this, there is the Suneido "Book" database format which is also being used to store resources. Problems:

  • Book databases are built around the Book browser GUI
  • Non-book pictures etc. are being tied to books, which is odd (for example, ImageButtonControl loads its pictures from a table in book format).

It would be preferable to define a simple "resource" table format capable of storing any type of resource, including icons, cursors, bitmaps, pngs, whatever, you name it. We would then:

  • Migrate all the .exe/.dll resources into a resource table
  • Replace calls to LoadCursor(ResourceModule(), ...) with something along the lines of Resources.LoadWindowsCursor(tablename, cursorname).

Discussion

  • Victor Schappert

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,20 +1,21 @@
     Currently there are a large number of Windows resources embedded in the Suneido executable (icons, cursors, bitmaps, and so forth). Some of these are cSuneido-specific (i.e. the DB rebuild dialog) but most of them are intended to be used from Suneido code. This leads to the following problems:
    
    -    * Have to rebuild the .exe every time we want a new resource added.
    -    * Have to rebuild the jsdi.dll every time we want a new resource added.
    -    * Ship new binaries <em>and</em> new Suneido code every time we want a new resouce added.
    -    * Have to keep cSuneido and JSDI in sync.
    -    * All of the above again every time we want to <em>remove</em> a resource (e.g. the likely obsolete book coil bitmap).
    -    * The "logical" resources are being "physically" tied to Win32 unnecessarily.
    +* Have to rebuild the .exe every time we want a new resource added.
    +* Have to rebuild the jsdi.dll every time we want a new resource added.
    +* Ship new binaries <em>and</em> new Suneido code every time we want a new resouce added.
    +* Have to keep cSuneido and JSDI in sync.
    +* All of the above again every time we want to <em>remove</em> a resource (e.g. the likely obsolete book coil bitmap).
    +* The "logical" resources are being "physically" tied to Win32 unnecessarily.
    +* jsdi.dll is not a natural home for random resources.
    
     Compounding this, there is the Suneido "Book" database format which is also being used to store resources. Problems:
    
    -    * Book databases are built around the Book browser GUI
    -    * Non-book pictures etc. are being tied to books, which is odd (for example, `ImageButtonControl` loads its pictures from a table in book format).
    +* Book databases are built around the Book browser GUI
    +* Non-book pictures etc. are being tied to books, which is odd (for example, `ImageButtonControl` loads its pictures from a table in book format).
    
     It would be preferable to define a simple "resource" table format capable of storing any type of resource, including icons, cursors, bitmaps, pngs, whatever, you name it. We would then:
    
    -    * Migrate all the .exe/.dll resources into a resource table
    -    * Replace calls to `LoadCursor(ResourceModule(), ...)` with something along the lines of `Resources.LoadWindowsCursor(tablename, cursorname)`.
    +* Migrate all the .exe/.dll resources into a resource table
    +* Replace calls to `LoadCursor(ResourceModule(), ...)` with something along the lines of `Resources.LoadWindowsCursor(tablename, cursorname)`.
    
     
  • Victor Schappert

    • labels: --> cSuneido, jSuneido, binary, resources
     

Log in to post a comment.