How do I create an empty folder in app directory?
I have never used Build Steps before.
Thanks
How do I create an empty folder in app directory?
I have never used Build Steps before.
Thanks
First, why do you need an empty folder?
A Plugins directory.
Empty by default.
[quote=121562:@Oliver Scott-Brown]How do I create an empty folder in app directory?
I have never used Build Steps before.
[/quote]
You do not need a build step to do so.
dim f as FolderItem = App.Executablefile.Parent.child("myfolder")
f.CreateAsFolder
Windows only.
Consider putting the folder in App Support instead, and include a menu item that will open the folder or even install the plugin.
What do you mean app support? I am building a plugin management system. It is only basic at this stage but I might consider making it easier, for example have a marketplace or something like that where you can retrieve plugins. I will add the functionality in for opening the plugins folder (in case the users need something more powerful to manage the files).
Thanks for the idea Kem
Okay, I added the ‘open plugin folder’ functionality. But I have not tested yet.
Thanks
Writing to a folder within the application folder, or asking the user to modify it, is generally not recommended. Instead, using the Application Support folder (SpecialFolder.ApplicationSupport), create a folder for your app there, and the plugin folder within that.
Ah, I see. You mean the ApplicationData folder.
https://documentation.xojo.com/index.php/SpecialFolder
I have Windows you see. Why is not recommended? Administrative privileges I am guessing? Xojo does this. The folder is created in the Build Step and not at runtime (atm).
Thanks
On Mac everything is “bundled” into one package.
If you build to Mac on your windows machine and open that tarball, you see a folder called MyApplication.app You can freely explore it on windows, but on Mac it’s an application. When clicked on Mac it launches rather than opening the directory.
Users are discouraged from poking around inside, but still can with a right-click menu. However adding or removing anything will invalidate the code signature. On Mac your plugins must not be inside the application. Xojo puts theirs alongside Xojo.app, but that’s still not the recommended way to do it.
Use Application Support (SpecialFolder.ApplicationData); keep in mind you need to child that. SpecialFolder.ApplicationData.child(“OliversGameMakerICantRecallTheNameOf”)
You may want to re-prioritize. I’ve been kind of keeping track of your progress just out of curiosity. If I recall correctly you haven’t made the scripting language yet. I would recommend creating OliverScript before allowing expansions upon it.
[quote=121610:@Tim Parnell]On Mac everything is “bundled” into one package.
If you build to Mac on your windows machine and open that tarball, you see a folder called MyApplication.app You can freely explore it on windows, but on Mac it’s an application. When clicked on Mac it launches rather than opening the directory.
Users are discouraged from poking around inside, but still can with a right-click menu. However adding or removing anything will invalidate the code signature. On Mac your plugins must not be inside the application. Xojo puts theirs alongside Xojo.app, but that’s still not the recommended way to do it.
Use Application Support (SpecialFolder.ApplicationData); keep in mind you need to child that. SpecialFolder.ApplicationData.child(“OliversGameMakerICantRecallTheNameOf”)
You may want to re-prioritize. I’ve been kind of keeping track of your progress just out of curiosity. If I recall correctly you haven’t made the scripting language yet. I would recommend creating OliverScript before allowing expansions upon it.[/quote]
My tool is called PowerMode. Scripting is not my priority, in fact it may not even be in the first public release. I shall move it to the AppData folder.
The plugins are at a basic stage. For now, it will just be powered by XojoScript. I have a very limited set of methods in the XojoScript context. But my priority here is to complete the plugins functionality. Think of them as like ‘IDE Scripts’ (like Xojo) rather than a powerful plugin system with event handlers and stuff like that.
Obviously, a lot could change once I get this software released. I think I do have my priorities right.
Thanks Tim and Kem