![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Digital and Interactive Games 2015 – Term 3, Session 16
– Powershell
…
##########################
#
# Change the following variables
# to your new plugin.
#
##########################
$plugin = '#Plugin#'
$pluginName = 'MyName'
$main = 'org.fardell24.myname.MyName'
$versionNumber = '1.0'
$description = 'MyName Plugin'
$conpath1 = '
[Error: Irreparable invalid markup ('<classpathentry [...] $form.height>') in entry. Owner must fix manually. Raw contents below.]
<lj-cut text="Digital and Interactive Games 2015 - Term 3, Session 16">
Digital and Interactive Games 2015 – Term 3, Session 16
– Powershell
…
<code>
##########################
#
# Change the following variables
# to your new plugin.
#
##########################
$plugin = '#Plugin#'
$pluginName = 'MyName'
$main = 'org.fardell24.myname.MyName'
$versionNumber = '1.0'
$description = 'MyName Plugin'
$conpath1 = '<classpathentry kind="con" '="'" $conpath2=" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_45"/>" $libpath="<classpathentry kind="lib" path="C:/Snapshots/bukkit-1.7.9-R0.3.jar"/>" $name="MyName" #="#" #="#" do="DO" not="NOT" change="CHANGE" any="any" codes="codes" beyond="beyond" this="this" point.="point." #="#" [void][system.reflection.assembly]::loadwithpartialname("system.windows.forms")="[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")" [void][system.reflection.assembly]::loadwithpartialname("microsoft.visualbasic")="[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.VisualBasic")" #="#" $form="New-Object" "system.windows.forms.form"=""System.Windows.Forms.Form"" $form.width="600" $form.height="300" $form.text="New Plugin" $form.startposition="[System.Windows.Forms.FormStartPosition]::CenterScreen" #="#" $label1="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label1.left="25" $label1.top="15" $label1.text="Name: " #="#" $label2="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label2.left="25" $label2.top="45" $label2.text="Main: " #="#" $label3="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label3.left="25" $label3.top="75" $label3.text="Version: " #="#" $label4="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label4.left="25" $label4.top="105" $label4.text="Description: " #="#" $text1="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text1.left="150" $text1.top="15" $text1.width="200" #="#" $text2="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text2.left="150" $text2.top="45" $text2.width="200" #="#" $text3="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text3.left="150" $text3.top="75" $text3.width="200" #="#" $text4="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text4.left="150" $text4.top="105" $text4.width="200" #="#" $closebutton="New-Object" "system.windows.forms.button"=""System.Windows.Forms.Button"" $closebutton.left="500" $closebutton.top="230" $closebutton.width="75" $closebutton.text="Close" #="#" $closebuttonhandler="[System.EventHandler]" {="{" $form.close()="$form.Close()" }="}" $closebutton.add_click($closebuttonhandler)="$closeButton.Add_Click($closeButtonHandler)" #="#" $form.controls.add($label1)="$form.Controls.Add($label1)" $form.controls.add($label2)="$form.Controls.Add($label2)" $form.controls.add($label3)="$form.Controls.Add($label3)" $form.controls.add($label4)="$form.Controls.Add($label4)" $form.controls.add($text1)="$form.Controls.Add($text1)" $form.controls.add($text2)="$form.Controls.Add($text2)" $form.controls.add($text3)="$form.Controls.Add($text3)" $form.controls.add($text4)="$form.Controls.Add($text4)" $form.controls.add($closebutton)="$form.Controls.Add($closeButton)" #="#" $form.showdialog()="$form.ShowDialog()" #="#" copy-item="Copy-Item" .\plugin_template.yml=".\plugin_template.yml" -destination="-Destination" plugin.yml="plugin.yml" (get-content="(Get-Content" .\plugin.yml).replace('#plugin=".\plugin.yml).Replace('#Plugin" template#',$plugin)="Template#',$plugin)" |="|" set-content="Set-Content" plugin.yml="plugin.yml" (get-content="(Get-Content" .\plugin.yml).replace('<<pluginname=".\plugin.yml).Replace('<<Pluginname">>' ,$pluginName) | Set-Content plugin.yml
(Get-Content .\plugin.yml).Replace('<<main>>',$main) | Set-Content plugin.yml
(Get-Content .\plugin.yml).Replace('<<versionnumber>>',$versionNumber) | Set-Content plugin.yml
(Get-Content .\plugin.yml).Replace('<<description>>',$description) | Set-Content plugin.yml
(Get-Content .\plugin.yml)
Copy-Item .\.classpath_template -Destination .classpath
(Get-Content .\.classpath_template).Replace('<<conpath1>>', $conpath1) | Set-Content .classpath
(Get-Content .\.classpath_template).Replace('<<conpath2>>', $conpath2) | Set-Content .classpath
(Get-Content .\.classpath_template).Replace('<<libpath>>', $libpath) | Set-Content .classpath
Get-Content .\.classpath
Copy-Item .\.project_template -Destination .project
(Get-Content .\.project_template).Replace('<<name>>' ,$name) | Set-Content .project
Get-Content .\.project_template
</code>
…
$AddNameButton = New-Object "System.Windows.Forms.Button"
$AddNameButton.Left = 500
$AddNameButton.Top = 15
$AddNameButton.Width = 75
$AddNameButton.Text = "Add Name"
function changeName([REF] $n) {
}
</lj-cut>
Digital and Interactive Games 2015 – Term 3, Session 16
– Powershell
…
<code>
##########################
#
# Change the following variables
# to your new plugin.
#
##########################
$plugin = '#Plugin#'
$pluginName = 'MyName'
$main = 'org.fardell24.myname.MyName'
$versionNumber = '1.0'
$description = 'MyName Plugin'
$conpath1 = '<classpathentry kind="con" '="'" $conpath2=" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_45"/>" $libpath="<classpathentry kind="lib" path="C:/Snapshots/bukkit-1.7.9-R0.3.jar"/>" $name="MyName" #="#" #="#" do="DO" not="NOT" change="CHANGE" any="any" codes="codes" beyond="beyond" this="this" point.="point." #="#" [void][system.reflection.assembly]::loadwithpartialname("system.windows.forms")="[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")" [void][system.reflection.assembly]::loadwithpartialname("microsoft.visualbasic")="[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.VisualBasic")" #="#" $form="New-Object" "system.windows.forms.form"=""System.Windows.Forms.Form"" $form.width="600" $form.height="300" $form.text="New Plugin" $form.startposition="[System.Windows.Forms.FormStartPosition]::CenterScreen" #="#" $label1="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label1.left="25" $label1.top="15" $label1.text="Name: " #="#" $label2="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label2.left="25" $label2.top="45" $label2.text="Main: " #="#" $label3="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label3.left="25" $label3.top="75" $label3.text="Version: " #="#" $label4="New-Object" "system.windows.forms.label"=""System.Windows.Forms.Label"" $label4.left="25" $label4.top="105" $label4.text="Description: " #="#" $text1="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text1.left="150" $text1.top="15" $text1.width="200" #="#" $text2="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text2.left="150" $text2.top="45" $text2.width="200" #="#" $text3="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text3.left="150" $text3.top="75" $text3.width="200" #="#" $text4="New-Object" "system.windows.forms.textbox"=""System.Windows.Forms.TextBox"" $text4.left="150" $text4.top="105" $text4.width="200" #="#" $closebutton="New-Object" "system.windows.forms.button"=""System.Windows.Forms.Button"" $closebutton.left="500" $closebutton.top="230" $closebutton.width="75" $closebutton.text="Close" #="#" $closebuttonhandler="[System.EventHandler]" {="{" $form.close()="$form.Close()" }="}" $closebutton.add_click($closebuttonhandler)="$closeButton.Add_Click($closeButtonHandler)" #="#" $form.controls.add($label1)="$form.Controls.Add($label1)" $form.controls.add($label2)="$form.Controls.Add($label2)" $form.controls.add($label3)="$form.Controls.Add($label3)" $form.controls.add($label4)="$form.Controls.Add($label4)" $form.controls.add($text1)="$form.Controls.Add($text1)" $form.controls.add($text2)="$form.Controls.Add($text2)" $form.controls.add($text3)="$form.Controls.Add($text3)" $form.controls.add($text4)="$form.Controls.Add($text4)" $form.controls.add($closebutton)="$form.Controls.Add($closeButton)" #="#" $form.showdialog()="$form.ShowDialog()" #="#" copy-item="Copy-Item" .\plugin_template.yml=".\plugin_template.yml" -destination="-Destination" plugin.yml="plugin.yml" (get-content="(Get-Content" .\plugin.yml).replace('#plugin=".\plugin.yml).Replace('#Plugin" template#',$plugin)="Template#',$plugin)" |="|" set-content="Set-Content" plugin.yml="plugin.yml" (get-content="(Get-Content" .\plugin.yml).replace('<<pluginname=".\plugin.yml).Replace('<<Pluginname">>' ,$pluginName) | Set-Content plugin.yml
(Get-Content .\plugin.yml).Replace('<<main>>',$main) | Set-Content plugin.yml
(Get-Content .\plugin.yml).Replace('<<versionnumber>>',$versionNumber) | Set-Content plugin.yml
(Get-Content .\plugin.yml).Replace('<<description>>',$description) | Set-Content plugin.yml
(Get-Content .\plugin.yml)
Copy-Item .\.classpath_template -Destination .classpath
(Get-Content .\.classpath_template).Replace('<<conpath1>>', $conpath1) | Set-Content .classpath
(Get-Content .\.classpath_template).Replace('<<conpath2>>', $conpath2) | Set-Content .classpath
(Get-Content .\.classpath_template).Replace('<<libpath>>', $libpath) | Set-Content .classpath
Get-Content .\.classpath
Copy-Item .\.project_template -Destination .project
(Get-Content .\.project_template).Replace('<<name>>' ,$name) | Set-Content .project
Get-Content .\.project_template
</code>
…
$AddNameButton = New-Object "System.Windows.Forms.Button"
$AddNameButton.Left = 500
$AddNameButton.Top = 15
$AddNameButton.Width = 75
$AddNameButton.Text = "Add Name"
function changeName([REF] $n) {
}
</lj-cut>