View unanswered posts | View active topics



Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
[FD4] Config::Toggle plugin 
Author Message
Member

Joined: Tue Sep 18, 2012 9:26 am
Posts: 52
Config::Toggle plugin

Without this plugin, if you want to change the value of some of your project compiler constants, you have to:
1. click mouse on Project->Properties, or better press ctrl+P
2. click mouse on the last tab Compiler options
3. click again on the small plus next to Compiler constants
4. click on the chosen CONFIG, backspace a few times, write the new value
5. because enter doesn't close the dialog, grab the mouse again and click OK

Now if you forgot to change also some other constant, you have to do the same again. And it's pretty much the same if you want to check what's the value of one of those constants.

Seems like a lot of time? It is, especially if you've based the configuration of your project on those CONFIGs, you're using them all day long, testing different builds. And in my case (probably not only in mine) that's what's happening - because they're incredibly useful, allow to quickly change the build of the app in a fundamental way, in an mutually independent way.

How to use them in AS3: http://divillysausages.com/blog/as3_con ... ompilation

Image

By using this plugin, instead of doing all of this clicking, you can see and modify all the constants readily in a panel. You can easily toggle the value of all compiler constants which have true or false after comma.

Ver. 0.3:

Image

Ver. 0.2:

Image


History

0.3 (4 march 2014) - support for number and text values, support for Haxe projects (they don't throw errors)
0.2 - more flexible format accepted in config constants
0.1 - initial version

TODO
- option to change the divider to vertical/horizontal
- right click to add new config
- edit all config variables as text
- edit directives in Haxe (seems it should be quite easy to do)

Download

DLL file: https://github.com/Koshmaar/ConfigToggl ... Toggle.dll

To install it, just copy dll into FlashDevelop/Plugins

Github repo is: https://github.com/Koshmaar/ConfigToggle

License is MIT. If anyone wants to fork/extend this plugin with new features to do that - you're welcome! Source is very simple (and ugly).

Original topic: viewtopic.php?f=5&t=10843

Author

Hubert 'Koshmaar' Rutkowski
http://www.koshmaar.pl


Last edited by Koshmaar on Tue Mar 04, 2014 3:07 pm, edited 1 time in total.



Fri Aug 30, 2013 8:33 am
Profile
Member

Joined: Tue Jun 30, 2009 8:06 pm
Posts: 205
Terrific plugin. Thank you.


Fri Aug 30, 2013 6:31 pm
Profile
Member

Joined: Tue Aug 30, 2011 1:22 pm
Posts: 50
Very handy plug in! Good job.


Mon Sep 02, 2013 8:03 am
Profile
Member

Joined: Fri Jul 15, 2011 1:29 pm
Posts: 21
v. 4.4.3 R 2784
haxe project

Image


Thu Sep 05, 2013 8:22 am
Profile ICQ
Member

Joined: Tue Aug 31, 2010 1:39 pm
Posts: 134
Great plugin indeed...

Feature request:
- Show whole config name, not just the right side of "::"
- Support for strings (and numbers, that are just strings, after all)
- A button in the project panel (and possibly a menu bar entry)

_________________
"Tu deviens responsable pour toujours de ce que tu as apprivoisé" - Antoine de Saint-Exupéry


Mon Sep 09, 2013 3:41 am
Profile WWW
Member

Joined: Mon Sep 30, 2013 5:19 pm
Posts: 6
Awesome plugin, thanks! Works great for AIR mobile projects when you have different ANEs for iOS/Amazon/Google and need to do multiple builds, and don't want to go digging through the menus to change those values each time.


Mon Sep 30, 2013 5:22 pm
Profile
Member

Joined: Tue Sep 18, 2012 9:26 am
Posts: 52
SlavaRa - I haven't tested it in haxe, only AS3, so bugs are expected(?). Anyway, what were you doing when the exception appeared, and what were your config:: values?

NemoStein - thank you, I'll added your features to todo list.


Thu Nov 21, 2013 12:28 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Koshmaar wrote:
SlavaRa - I haven't tested it in haxe, only AS3, so bugs are expected(?). Anyway, what were you doing when the exception appeared, and what were your config:: values?

NemoStein - thank you, I'll added your features to todo list.

Haxe projects do not have config values - you must check that the active project is an AS3Project.


Fri Nov 22, 2013 8:11 am
Profile WWW
Member

Joined: Sat Nov 13, 2010 1:16 pm
Posts: 11
Is it possible to support Haxe "directives"? It's pretty much the same, so I suppose it wouldn't require too much work here. :)


Tue Dec 10, 2013 4:03 pm
Profile
Member

Joined: Tue Sep 18, 2012 9:26 am
Posts: 52
I can take a look at that (added to todo) altough I have no idea when I have time for that... sorry too many projects/things on my head :(


Sat Dec 14, 2013 5:56 pm
Profile
Member

Joined: Mon Jan 06, 2014 12:08 am
Posts: 4
I'm having a problem loading the plugin in FlashDevelop. After placing the .dll file in my flashdevelop/plugins folder, I start up flashdevelop and get this error:

Quote:
Could not load file or assembly 'file:///C:\Program Files\FlashDevelop\Plugins\ConfigToggle.dll' or one of its dependencies. The module was expected to contain an assembly manifest.

at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at FlashDevelop.Utilities.PluginServices.AddPlugin(String fileName)
at FlashDevelop.Utilities.PluginServices.FindPlugins(String path)
at FlashDevelop.MainForm.InitializeMainForm()


I'm using FlashDevelop 4.5.2.5. I installed FlashDevelop with none of the large extra downloads included (Adobe AIR SDK and 2 others), except for the Flash Debugger. After this error occurs, if I continue into FlashDevelop, I start FlashDevelop out of the project I was in and unable to open any projects. By removing this plugin, I am able to start FlashDevelop with no problems, resuming back in the project I was working in.

Does anyone know what I'm doing wrong?


Mon Jan 06, 2014 12:12 am
Profile
Member

Joined: Tue Sep 18, 2012 9:26 am
Posts: 52
I have no idea... I have the same version and for me it was always working ok. Perhaps someone else with bigger experience with plugins can help?


Mon Jan 06, 2014 2:49 pm
Profile
Member

Joined: Mon Jan 06, 2014 12:08 am
Posts: 4
Ok, I apparently fixed the problem. It seems that this problem occurs if I only download the ConfigToggle.dll file from github and try to use it. However, if I download the entire github project as a zip file, unzip it, and then use the ConfigToggle.dll file provided inside, I seem to have no problems. Maybe its just me, but the ConfigToggle.dll file I download directly is 31.4 kb, while the ConfigToggle.dll file included in the github zip is 12 kb.
Regardless, the plugin is working! :o Thanks for the help!


Mon Jan 06, 2014 6:37 pm
Profile
Member

Joined: Sun Mar 23, 2008 2:28 am
Posts: 176
I was going to customize this, but I'm having trouble getting a build to work. I'm new to this, using Visual Studio 2010. 2 errors, any ideas?

------ Rebuild All started: Project: FlashDevelop, Configuration: Debug x86 ------
Build started 2/6/2014 11:32:15 AM.
PreBuildEvent:
"C:\Code\3rdParty\GitHub\ConfigToggle\\SetVersion.bat" "C:\Code\3rdParty\GitHub\ConfigToggle\"
'"C:\Code\3rdParty\GitHub\ConfigToggle\\SetVersion.bat"' is not recognized as an internal or external command,
operable program or batch file.



------ Rebuild All started: Project: ConfigToggle, Configuration: Debug x86 ------
C:\Code\3rdParty\GitHub\ConfigToggle\PluginUI.cs(6,7): error CS0246: The type or namespace name 'ProjectManager' could not be found (are you missing a using directive or an assembly reference?)

Compile complete -- 1 errors, 0 warnings
Build started 2/6/2014 11:32:15 AM.
ResolveAssemblyReferences:
Primary reference "ProjectManager, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL".
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ProjectManager, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
For SearchPath "{TargetFrameworkDirectory}".


Thu Feb 06, 2014 6:41 pm
Profile WWW
Member

Joined: Tue Sep 18, 2012 9:26 am
Posts: 52
I just updated the plugin to version 0.3 with one nice feature: additional panel showing the config values that have strings or numbers. By left clicking on key or value you can edit them (enter after finishing). The keys and values are stored in a tree view, because that was easiest to implement :)

Image

Second thing I added, is that it works with Haxe projects - that is, it doesn't throw errors, it's just hidden away (as Philippe suggested I check project type).

Download and please report any problems: https://github.com/Koshmaar/ConfigToggl ... Toggle.dll

TODO:
- option to change the divider to vertical/horizontal
- right click to add new config
- edit all config variables as text
- edit directives in Haxe (seems it should be quite easy to do)


Gigggas: really? The .dll I see on the GitHub page had 12kb as well :D

adept: no idea about the SetVersion.bat , I don't have such thing anywhere in my whole FD dev folder. Other than that, it's good to take a look at Solution explorer -> ConfigToggle properties -> Build events, I have put here some cmd line tool which runs FD with newly built plugin upon finished build.


EDIT: I have question too: how to add new compiler constant to as3_project.CompilerOptions.CompilerConstants, it doesn't have any methods for adding new lines... omg I just noticed its string[] - so I'm supposed to duplicate it into bigger array, add one line and replace the old?


Tue Mar 04, 2014 3:00 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 22 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.