Thread Tools Display Modes
06-14-19, 07:31 AM   #1
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Addons - Single Source for Classic and current?

Is it possible for an addon to be written such that the same source files can be used for Classic and current?

If a current addon uses ACE3, will it be possible to port that addon to Classic (i.e. are the ACE3 libraries being ported)?
  Reply With Quote
06-15-19, 01:50 PM   #2
MooreaTv
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: May 2019
Posts: 38
yes many addons just work on both and many that do not just need a couple of if
  Reply With Quote
06-15-19, 06:40 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Depends on what the addon does. For example, an addon tracking calendar events or the collections system won't work in classic since those systems don't exist.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
06-15-19, 06:59 PM   #4
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Most addons should work just fine, especially addon frameworks like Ace3. Classic has the exact same environment as live does, with the only API differences being the absence of objects that pertain to live-only stuff like banks and the calendar. Classic's Lua environment was initially forked from Legion's environment and from what I understand will stay parallel with live. It is not the actual environment from vanilla.
  Reply With Quote
06-15-19, 09:58 PM   #5
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Kanegasi View Post
Classic's Lua environment was initially forked from Legion's environment and from what I understand will stay parallel with live.
It's actually BfA 8.0. As an example, the map system changed significantly between Legion and BfA.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
06-16-19, 06:48 AM   #6
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
So it sounds like a tradeskill addon like Skillet will work with minimal changes that can all be determined at runtime.
  Reply With Quote
06-19-19, 10:09 PM   #7
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
I've found one "gotcha" with single source, the "## Interface: " in the .toc. Classic should be "11302" and Retail/Live is currently "80100". Anyone have a brilliant idea how to solve this one?
  Reply With Quote
06-19-19, 10:33 PM   #8
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by bsmorgan View Post
I've found one "gotcha" with single source, the "## Interface: " in the .toc. Classic should be "11302" and Retail/Live is currently "80100". Anyone have a brilliant idea how to solve this one?
Well, I just ran mine with 8.0 Interface on Classic with no apparent issues. I just ticked the out of date box. One way you could get around it is to have 2 versions of the file and upload the addon twice with each one having the correct TOC file activated. We could utilise 'Other Files' to provide Classic versions for addons that you already have for live. For now I have gone with separate addon pages just in case it doesn't work out for some of the addons. Plus, you can track the downloads per addon that way but no using the 'Other Files' way.
__________________
  Reply With Quote
06-19-19, 10:28 PM   #9
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
GetBuildInfo() returns 1.13.2.xxx for classic so :

Lua Code:
  1. local BuildInfo = GetBuildInfo()
  2. BuildInfo = tonumber(string.sub(BuildInfo, 1, 2))
  3. if BuildInfo < 2 then
  4.     print("Classic")
  5. end
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
06-19-19, 10:47 PM   #10
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Last I checked you couldn't run with ## Interface: 11302 under BfA because it assumed it was too old to even be "out-of-date".
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
06-20-19, 04:08 AM   #11
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by Fizzlemizz View Post
Last I checked you couldn't run with ## Interface: 11302 under BfA because it assumed it was too old to even be "out-of-date".
Hmm, didn't try that route, I have 80100 on BFA and used that on Classic and it accepted 'out of date' usage on the addon list.
__________________
  Reply With Quote
06-20-19, 06:34 AM   #12
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
I solved the issue of a conditional variable for which version am I running under but it looks like the issue of a "conditional" .toc line hasn't been solved yet. It may be awhile before I'm ready but my temporary solution will be to build retail using the existing WoWAce SVN repository and tools and then substitute the .toc file in the .zip before uploading it here.

I do have another problem all you "wizards" can help me with

I'm not getting any lua error output when my addon gets an error. I can't find the option to turn on Blizzard's error output so either I need help with that or I need to know which error reporting addons work on Classic.
  Reply With Quote
06-20-19, 10:25 AM   #13
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by bsmorgan View Post
I solved the issue of a conditional variable for which version am I running under but it looks like the issue of a "conditional" .toc line hasn't been solved yet. It may be awhile before I'm ready but my temporary solution will be to build retail using the existing WoWAce SVN repository and tools and then substitute the .toc file in the .zip before uploading it here.

I do have another problem all you "wizards" can help me with

I'm not getting any lua error output when my addon gets an error. I can't find the option to turn on Blizzard's error output so either I need help with that or I need to know which error reporting addons work on Classic.
!Bugrabber and Bugsack work with Classic fine. I had the same problem with nUI and had to install them as I couldn't see the built in error options either.
__________________
  Reply With Quote
06-20-19, 09:03 AM   #14
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
I think we can scratch Skillet (and most other TradeSkill addons) from the single source list as all the C_TradeSkillUI. functions are gone.

I'll see if I can find the version of Skillet before that change happened and if I can find it, how badly it breaks on the current classic build, but I'm not holding my breath.
  Reply With Quote
06-20-19, 10:24 AM   #15
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by bsmorgan View Post
I think we can scratch Skillet (and most other TradeSkill addons) from the single source list as all the C_TradeSkillUI. functions are gone.

I'll see if I can find the version of Skillet before that change happened and if I can find it, how badly it breaks on the current classic build, but I'm not holding my breath.
Couldn't you create a local function that is set to either the C_TradeSkill functions or the Classic equivalent / or nil based on the setup ? It would then simply be the case of adding an if nil test in front of the new function call.
__________________
  Reply With Quote
06-20-19, 11:14 AM   #16
bsmorgan
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 219
Originally Posted by Xrystal View Post
Couldn't you create a local function that is set to either the C_TradeSkill functions or the Classic equivalent / or nil based on the setup ? It would then simply be the case of adding an if nil test in front of the new function call.
My first attempt at this was to just remove "C_TradeSkill." and see what blew up. In numerous cases, the return values also "reverted" to an earlier time as well. I can't just change "C_TradeSkill." to "self:" because there are quite a few cases where Skillet already has a function of that name some of which do something different than the name would suggest.

I've come to the conclusion that Skillet is a Retail addon and Skillet - Classic will be a different addon with a different set of sources. This decision is supported by a comparison of:
World of Warcraft\_retail_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\
and
World of Warcraft\_classic_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\

The question now becomes, do I want to write Skillet - Classic?
  Reply With Quote
06-20-19, 12:09 PM   #17
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,892
Originally Posted by bsmorgan View Post
My first attempt at this was to just remove "C_TradeSkill." and see what blew up. In numerous cases, the return values also "reverted" to an earlier time as well. I can't just change "C_TradeSkill." to "self:" because there are quite a few cases where Skillet already has a function of that name some of which do something different than the name would suggest.

I've come to the conclusion that Skillet is a Retail addon and Skillet - Classic will be a different addon with a different set of sources. This decision is supported by a comparison of:
World of Warcraft\_retail_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\
and
World of Warcraft\_classic_\BlizzardInterfaceCode\Interface\AddOns\Blizzard_TradeSkillUI\

The question now becomes, do I want to write Skillet - Classic?
The way I look at it with my addons is ..

1. Do I need it ?
2. How popular is it ?
3. How time consuming will the conversion and later patches be ?
4. Is there another addon that is easier to convert and works in a similar way ?
5. Am I bored enough that I don't care what the answers are ?

My MagePorts addon passes 1(kinda) and 2 (definitely)... I am at question 3 and I really am not sure yet.. it all depends on whether I can get a similar output with different functionality.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Addons - Single Source for Classic and current?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off