diff options
| author | Michał Dudziński <[email protected]> | 2021-04-10 19:36:50 +0200 |
|---|---|---|
| committer | Amir Rajan <[email protected]> | 2021-05-26 16:19:13 -0500 |
| commit | bfab20c9a8a5f2abc5cf2b834c662ea89ad4adde (patch) | |
| tree | 1957caa8133d391b3aa2d85ae4757a2dedcdea4f /dragon/itch_wizard.rb | |
| parent | d5115606c96b0fe0affd72e6e0b72edce7e51042 (diff) | |
| download | dragonruby-game-toolkit-contrib-bfab20c9a8a5f2abc5cf2b834c662ea89ad4adde.tar.gz dragonruby-game-toolkit-contrib-bfab20c9a8a5f2abc5cf2b834c662ea89ad4adde.zip | |
iOS wizard: determine version from either opts or metadata file
Diffstat (limited to 'dragon/itch_wizard.rb')
| -rw-r--r-- | dragon/itch_wizard.rb | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/dragon/itch_wizard.rb b/dragon/itch_wizard.rb index d87d07c..c0a69de 100644 --- a/dragon/itch_wizard.rb +++ b/dragon/itch_wizard.rb @@ -3,6 +3,8 @@ # itch_wizard.rb has been released under MIT (*only this file*). class ItchWizard + include Metadata + def steps [ :check_metadata, @@ -10,41 +12,6 @@ class ItchWizard ] end - def metadata_file_path - "metadata/game_metadata.txt" - end - - def get_metadata - metadata = $gtk.read_file metadata_file_path - - if !metadata - write_blank_metadata - metadata = $gtk.read_file metadata_file_path - end - - dev_id, dev_title, game_id, game_title, version, icon = *metadata.each_line.to_a - - { - dev_id: dev_id.strip, - dev_title: dev_title.strip, - game_id: game_id.strip, - game_title: game_title.strip, - version: version.strip, - icon: icon.strip - } - end - - def write_blank_metadata - $gtk.write_file metadata_file_path, <<-S.strip -#devid=myname -#devtitle=My Name -#gameid=mygame -#gametitle=My Game -#version=0.1 -#icon=metadata/icon.png -S - end - def check_metadata metadata_text = $gtk.read_file metadata_file_path if !metadata_text |
