Module: Yast::AddOnCreatorWizardsInclude

Defined in:
../../src/include/add-on-creator/wizards.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) AddOnCreatorSequence

Whole configuration of add-on-creator

Returns:

  • sequence result



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File '../../src/include/add-on-creator/wizards.rb', line 136

def AddOnCreatorSequence
  aliases = {
    "read"    => [lambda { ReadDialog() }, true],
    "start"   => [lambda { FirstDialog() }, true],
    "summary" => lambda { SummaryDialog() },
    "build"   => lambda { BuildDialog() },
    "main"    => lambda { MainSequence() },
    "write"   => [lambda { WriteDialog() }, true]
  }

  sequence = {
    "ws_start" => "read",
    "read"     => { :abort => :abort, :next => "start" },
    "start"    => { :summary => "summary", :new => "main" },
    "summary"  => {
      :abort => :abort,
      :next  => :next,
      :new   => "main",
      :edit  => "main",
      :build => "build",
      :next  => "write"
    },
    "build"    => { :next => "summary", :abort => "summary" },
    "main"     => { :abort => "summary", :next => "summary" },
    "write"    => { :abort => :abort, :next => :next }
  }

  Wizard.CreateDialog

  ret = Sequencer.Run(aliases, sequence)

  UI.CloseDialog
  deep_copy(ret)
end

- (Object) Commit

save the data with current configuration into global list



62
63
64
65
# File '../../src/include/add-on-creator/wizards.rb', line 62

def Commit
  AddOnCreator.CommitCurrentProduct
  :next
end

- (Object) CopyExisting

import data from existing product



51
52
53
54
55
56
57
58
59
# File '../../src/include/add-on-creator/wizards.rb', line 51

def CopyExisting
  # busy message
  Popup.ShowFeedback("", _("Importing product..."))

  AddOnCreator.ImportExistingProduct(AddOnCreator.import_path)

  Popup.ClearFeedback
  :next
end

- (Object) FirstDialog

if there are no Add-On products configured, open creation sequence



68
69
70
71
72
73
74
# File '../../src/include/add-on-creator/wizards.rb', line 68

def FirstDialog
  if Ops.greater_than(Builtins.size(AddOnCreator.add_on_products), 0)
    return :summary
  end
  AddOnCreator.selected_product = -1
  :new
end

- (Object) GenerateContent

fill the defaults for content file



45
46
47
48
# File '../../src/include/add-on-creator/wizards.rb', line 45

def GenerateContent
  AddOnCreator.FillContentDefaults
  :next
end

- (Object) initialize_add_on_creator_wizards(include_target)



32
33
34
35
36
37
38
39
40
41
42
# File '../../src/include/add-on-creator/wizards.rb', line 32

def initialize_add_on_creator_wizards(include_target)
  textdomain "add-on-creator"

  Yast.import "Popup"
  Yast.import "Sequencer"
  Yast.import "Wizard"

  Yast.include include_target, "add-on-creator/complex.rb"
  Yast.include include_target, "add-on-creator/dialogs.rb"
  Yast.include include_target, "add-on-creator/patterns.rb"
end

- (Object) MainSequence

Main workflow of the add-on-creator configuration: create or edit Add-On

Returns:

  • sequence result



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# File '../../src/include/add-on-creator/wizards.rb', line 78

def MainSequence
  aliases = {
    "new"      => lambda { NewProductDialog() },
    "content"  => lambda { ContentFileDialog() },
    "sources"  => lambda { SourcesDialog() },
    "expert1"  => lambda { ExpertSettingsDialog() },
    "expert2"  => lambda { ExpertSettingsDialog2() },
    "packages" => lambda { PackagesDialog() },
    "patterns" => lambda { PatternsDialog() },
    "signing"  => lambda { SigningDialog() },
    "output"   => lambda { OutputDialog() },
    "overview" => lambda { OverviewDialog() },
    "workflow" => lambda { WorkflowConfigurationDialog() },
    "copy"     => [lambda { CopyExisting() }, true],
    "generate" => [lambda { GenerateContent() }, true],
    "commit"   => lambda { Commit() }
  }
  start_dialog = AddOnCreator.selected_product == -1 ? "new" : "sources"
  sequence = {
    "ws_start" => start_dialog,
    "new"      => { :abort => :abort, :next => "sources", :copy => "copy" },
    "sources"  => {
      :abort    => :abort,
      :next     => "generate",
      :skip_gen => "content"
    },
    "copy"     => { :next => "generate" },
    "generate" => { :next => "content" },
    "content"  => { :abort => :abort, :next => "packages" },
    "packages" => { :abort => :abort, :next => "patterns" },
    "patterns" => { :abort => :abort, :next => "output" },
    "output"   => {
      :abort    => :abort,
      :next     => "signing",
      :expert   => "expert1",
      :workflow => "workflow"
    },
    "workflow" => { :abort => :abort, :next => "output" },
    "signing"  => { :abort => :abort, :next => "overview" },
    "overview" => {
      :abort => :abort,
      #	    `next	: `next,
      :next  => "commit"
    },
    "commit" =>
      #	    `next	: "summary",
      { :next => :next },
    "expert1"  => { :abort => :abort, :next => "expert2" },
    "expert2"  => { :abort => :abort, :next => "output" }
  }

  ret = Sequencer.Run(aliases, sequence)

  deep_copy(ret)
end