Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Main/Obfuscate/Obfuscate Real Studio Plugins
Function:
Required plugins for this example:
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Main/Obfuscate/Obfuscate Real Studio Plugins
This example is the version from Sun, 17th Mar 2012.
Project "Obfuscate Real Studio Plugins.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control CheckBox1 Inherits CheckBox
ControlInstance CheckBox1 Inherits CheckBox
End Control
Control CheckBox2 Inherits CheckBox
ControlInstance CheckBox2 Inherits CheckBox
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() run End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() quit End EventHandler
End Control
Function ObfuscateDLLName(name as string) As string Return "lib"+str(CountDLLChanges)+".dll" End Function
Function ObfuscatePluginName(name as string) As string Return "lib"+str(CountPluginChanges)+".rbx" End Function
Sub WalkFolder(f as FolderItem) dim g,files(-1) as FolderItem dim i,c as integer c=f.Count for i=1 to c g=f.TrueItem(i) if g<>Nil and right(g.name,4)=".rbx" then files.Append g end if next for each g in files if CheckBox2.Value then WalkVirtualVolume g end if if CheckBox1.Value then CountPluginChanges=CountPluginChanges+1 g.name=ObfuscatePluginName(g.name) end if next End Sub
Sub WalkVirtualVolume(f as FolderItem) dim v as VirtualVolume v=f.OpenAsVirtualVolume if v=nil then Return WalkVirtualVolumeRoot v.Root End Sub
Sub WalkVirtualVolumePluginFolder(f as FolderItem) dim i,c as integer dim g as FolderItem g=F.Child("Build Resources") if g=nil or g.Exists=false then Return f=g.Child("Windows") if f=nil or f.Exists=false then Return dim files(-1) as FolderItem c=f.Count for i=1 to c g=f.TrueItem(i) files.append g next for each g in files CountDLLChanges=CountDLLChanges+1 g.Name=ObfuscateDLLName(g.name) next End Sub
Sub WalkVirtualVolumeRoot(f as FolderItem) dim i,c as integer dim g as FolderItem c=f.Count for i=1 to c g=f.TrueItem(i) WalkVirtualVolumePluginFolder g next End Sub
Sub run() dim f as FolderItem f=SelectFolder if f=nil then Return WalkFolder f MsgBox "Changed "+str(CountPluginChanges)+" plugin names and "+str(CountDLLChanges)+" DLL names." End Sub
Property CountDLLChanges As Integer
Property CountPluginChanges As Integer
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Main Plugin.




Links
MBS FileMaker blog