Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Tutorials
Configuring IntelliJ for SWF Modifications
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Cammm" data-source="post: 461184" data-attributes="member: 83487"><p><strong><u>Prerequisites:</u></strong></p><p></p><p>IntelliJ (Community but preferably Ultimate)</p><p></p><p>FlexSDK</p><p></p><p>Open Source SWF.</p><p></p><p> </p><p></p><p><strong><u>Downloads:</u></strong></p><p></p><p><a href="https://git.krews.org/Harmonic/opensourceswf" target="_blank">Open Source SWF & Compiler</a></p><p></p><p><a href="https://www.jetbrains.com/idea/" target="_blank">IntelliJ Community Edition / Ultimate Edition</a></p><p></p><p> </p><p></p><p> </p><p></p><p>Okay, so for starters, you want to open your Open Source SWF inside of IntelliJ as an existing project, like so:</p><p></p><p>[ATTACH=full]10914[/ATTACH]</p><p>[ATTACH=full]10915[/ATTACH]</p><p></p><p></p><p></p><p>I recommend downloading the version by Harmonic due to it containing the compiler, which is essential for well.. <em>compiling</em> your SWF.</p><p></p><p>Once you open the project and it has fully loaded, it should look something like this:</p><p></p><p>[ATTACH=full]10916[/ATTACH]</p><p></p><p>So, we actually want to completely ignore this, and go straight to IntelliJ preferences (This can be done with <strong>CMD + , </strong>on macOS and <strong>CTRL + ,</strong> on windows):</p><p></p><p>[ATTACH=full]10917[/ATTACH]</p><p></p><p>You then want to Open the Tools submenu, and then click on <strong>External Tools</strong>. This is where you will be setting up your compiler.</p><p></p><p> </p><p></p><p>Upon Clicking the <strong>+</strong> you will be greeted with this screen:</p><p></p><p>[ATTACH=full]10918[/ATTACH]</p><p></p><p>You want to fill out these fields as follows:</p><p></p><p><strong>Name: </strong>SWF Compiler</p><p></p><p><strong>Description:</strong> Compiles your SWF</p><p></p><p> </p><p></p><p>For macOS:</p><p></p><p><strong>Program:</strong> /usr/bin/java</p><p></p><p>For Windows:</p><p></p><p><strong>Program:</strong> java</p><p></p><p><strong>Arguments:</strong> [CODE]-Xmx2G -Dsun.io.useCanonCaches=false -Duser.language=en -Duser.region=US -Djava.util.Arrays.useLegacyMergeSort=true -jar compiler/flexsdk/4.6.0/lib/mxmlc.jar +flexlib=compiler/flexsdk/4.6.0/frameworks -compiler.compress=true -load-config+=obj/HabboConfig.xml -debug=true -o build/Habbo.swf[/CODE]</p><p></p><p> </p><p></p><p>Now, I am aware those Arguments may be confusing so I am going to break down the important bits:</p><p></p><p>"<strong>-Xmx2g</strong>" Is the amount of memory allocated to your compiler, so for 2G of RAM, you do "<strong>-Xmx2G</strong>" as I have. But if you wanted to allocate, let's say 4G of RAM, you'd do this instead. <strong>"-Xmx4g</strong>".</p><p></p><p>"<strong>-jar compiler/flexsdk/4.6.0/lib/mxmlc.jar</strong>" is where "<strong>mxmlc.jar</strong>" is located inside your Flex SDK. If you downloaded the OpenSource SWF I linked, this should just, work.</p><p></p><p>"<strong>+flexlib= compiler/flexsdk/4.6.0/frameworks</strong>" Is the same deal, you'll only need to change this if you aren't using the linked OpenSource SWF.</p><p></p><p><strong>"-load-config+=obj/HabboConfig.xml</strong>" This is where your Config is located, it's highly unlikely you'll need to change this.</p><p></p><p>And finally...</p><p></p><p>"<strong>o build/Habbo.swf</strong>" Is where your Habbo.SWF is exported to. You could potentially export directly to a local environment, but that's your choice. This can be modified to any path on your drive providing you use the full path.</p><p></p><p> </p><p></p><p>So, you should have everything filled out like so:</p><p></p><p>[ATTACH=full]10919[/ATTACH]</p><p></p><p> </p><p></p><p>You can now press <strong>Ok</strong> and <strong>Apply</strong>. Now, we need to make that tool we have just created easily accessible.</p><p></p><p> </p><p></p><p>If you have used IntelliJ in the past, you may be familliar with the "<strong>Toolbar</strong>". It is no longer enabled by default, but is still a tool I frequently use, and a tool we are going to be using to allow this compiler to be a one click tool.</p><p></p><p> </p><p></p><p>In order to enable the Toolbar, you want to go to your IntelliJ <strong>View</strong> button on the top, and go to <strong>Appearance </strong>then click <strong>Toolbar</strong>. </p><p></p><p>[ATTACH=full]10920[/ATTACH]</p><p></p><p></p><p></p><p>This will enable the toolbar, but it isn't quite as cut and go as that. We now need to add our own button. In order to do this, we need to access the modification menu. Accessing this is simple, right click in any empty space on the toolbar, and click <strong>"Customize Menus and Toolbars</strong>"</p><p></p><p>[ATTACH=full]10921[/ATTACH]</p><p> </p><p></p><p>Opening this will greet you with the following window.:</p><p></p><p>[ATTACH=full]10922[/ATTACH]</p><p></p><p> </p><p></p><p>You want to open the <strong>"Main Toolbar</strong>" dropdown, and click the "<strong>Search</strong> <strong>Anywhere</strong>" entry. Once you have this selected, you want to click the <strong>+</strong> and click "<strong>Add Separator":</strong></p><p></p><p>[ATTACH=full]10923[/ATTACH]</p><p></p><p>Then you want to open that very same menu with the <strong>+</strong> and click "<strong>Add Action...</strong>". It will open the following window.</p><p></p><p>[ATTACH=full]10924[/ATTACH]</p><p></p><p>Open the dropdown "<strong>External Tools</strong>" followed by the next one, then click "<strong>SWF Compiler</strong>", which is the tool we created earlier. Once done, click "<strong>Ok</strong>", and "<strong>Ok</strong>" again.</p><p></p><p>If all is well, this new button should now be present on your toolbar:</p><p></p><p>[ATTACH=full]10925[/ATTACH]</p><p></p><p> </p><p></p><p>However, that's not <strong>QUITE</strong> all. Now, we need to open your <strong>"HabboConfig.xml</strong>" in your favourite code editor, and edit the following values:</p><p></p><p>[ATTACH=full]10926[/ATTACH]</p><p></p><p> </p><p></p><p>Replace the <strong>following</strong>:</p><p></p><p>[CODE=xml]<path-element>C:\Users\John\Desktop\HabboAS3\src</path-element></p><p></p><p><path-element>C:\Users\John\Desktop\HabboAS3\compiler\Library\AS3\classes</path-element></p><p></p><p><path-element>C:\Users\John\Desktop\HabboAS3\src\Habbo.as</path-element>[/CODE]</p><p></p><p>With your OpenSWF Folder's Location, so for me it's the following:</p><p></p><p>[CODE=xml]<path-element>/Users/cam/Documents/SWFdev/one/src</path-element></p><p></p><p><path-element>/Users/cam/Documents/SWFdev/one/compiler/Library/AS3/classes</path-element></p><p></p><p><path-element>/Users/cam/Documents/SWFdev/one/src/Habbo.as</path-element>[/CODE]</p><p></p><p>And <strong>now </strong>that's basically it.</p><p></p><p>Go ahead and click your new shiny button, and it should; if all has gone right, you should get a nice compiled SWF!</p><p></p><p>[ATTACH=full]10927[/ATTACH]</p><p></p><p></p><p>Now, I want to say I apologise in advance if this tutorial isn't very formal, I haven't done this very often, and it's my first attempt, so be nice! </p><p></p><p></p><p></p><p>If you have any questions, I relatively active, and i'll check back semi-regularly. But I hope this gives you a basic idea at minimum of how to Setup IntelliJ for SWF Editing / Developing.</p><p></p><p> </p><p></p><p>Thanks for Reading, and I hope this is useful.</p></blockquote><p></p>
[QUOTE="Cammm, post: 461184, member: 83487"] [B][U]Prerequisites:[/U][/B] IntelliJ (Community but preferably Ultimate) FlexSDK Open Source SWF. [B][U]Downloads:[/U][/B] [URL='https://git.krews.org/Harmonic/opensourceswf']Open Source SWF & Compiler[/URL] [URL='https://www.jetbrains.com/idea/']IntelliJ Community Edition / Ultimate Edition[/URL] Okay, so for starters, you want to open your Open Source SWF inside of IntelliJ as an existing project, like so: [ATTACH=full]10914[/ATTACH] [ATTACH=full]10915[/ATTACH] I recommend downloading the version by Harmonic due to it containing the compiler, which is essential for well.. [I]compiling[/I] your SWF. Once you open the project and it has fully loaded, it should look something like this: [ATTACH=full]10916[/ATTACH] So, we actually want to completely ignore this, and go straight to IntelliJ preferences (This can be done with [B]CMD + , [/B]on macOS and [B]CTRL + ,[/B] on windows): [ATTACH=full]10917[/ATTACH] You then want to Open the Tools submenu, and then click on [B]External Tools[/B]. This is where you will be setting up your compiler. Upon Clicking the [B]+[/B] you will be greeted with this screen: [ATTACH=full]10918[/ATTACH] You want to fill out these fields as follows: [B]Name: [/B]SWF Compiler [B]Description:[/B] Compiles your SWF For macOS: [B]Program:[/B] /usr/bin/java For Windows: [B]Program:[/B] java [B]Arguments:[/B] [CODE]-Xmx2G -Dsun.io.useCanonCaches=false -Duser.language=en -Duser.region=US -Djava.util.Arrays.useLegacyMergeSort=true -jar compiler/flexsdk/4.6.0/lib/mxmlc.jar +flexlib=compiler/flexsdk/4.6.0/frameworks -compiler.compress=true -load-config+=obj/HabboConfig.xml -debug=true -o build/Habbo.swf[/CODE] Now, I am aware those Arguments may be confusing so I am going to break down the important bits: "[B]-Xmx2g[/B]" Is the amount of memory allocated to your compiler, so for 2G of RAM, you do "[B]-Xmx2G[/B]" as I have. But if you wanted to allocate, let's say 4G of RAM, you'd do this instead. [B]"-Xmx4g[/B]". "[B]-jar compiler/flexsdk/4.6.0/lib/mxmlc.jar[/B]" is where "[B]mxmlc.jar[/B]" is located inside your Flex SDK. If you downloaded the OpenSource SWF I linked, this should just, work. "[B]+flexlib= compiler/flexsdk/4.6.0/frameworks[/B]" Is the same deal, you'll only need to change this if you aren't using the linked OpenSource SWF. [B]"-load-config+=obj/HabboConfig.xml[/B]" This is where your Config is located, it's highly unlikely you'll need to change this. And finally... "[B]o build/Habbo.swf[/B]" Is where your Habbo.SWF is exported to. You could potentially export directly to a local environment, but that's your choice. This can be modified to any path on your drive providing you use the full path. So, you should have everything filled out like so: [ATTACH=full]10919[/ATTACH] You can now press [B]Ok[/B] and [B]Apply[/B]. Now, we need to make that tool we have just created easily accessible. If you have used IntelliJ in the past, you may be familliar with the "[B]Toolbar[/B]". It is no longer enabled by default, but is still a tool I frequently use, and a tool we are going to be using to allow this compiler to be a one click tool. In order to enable the Toolbar, you want to go to your IntelliJ [B]View[/B] button on the top, and go to [B]Appearance [/B]then click [B]Toolbar[/B]. [ATTACH=full]10920[/ATTACH] This will enable the toolbar, but it isn't quite as cut and go as that. We now need to add our own button. In order to do this, we need to access the modification menu. Accessing this is simple, right click in any empty space on the toolbar, and click [B]"Customize Menus and Toolbars[/B]" [ATTACH=full]10921[/ATTACH] Opening this will greet you with the following window.: [ATTACH=full]10922[/ATTACH] You want to open the [B]"Main Toolbar[/B]" dropdown, and click the "[B]Search[/B] [B]Anywhere[/B]" entry. Once you have this selected, you want to click the [B]+[/B] and click "[B]Add Separator":[/B] [ATTACH=full]10923[/ATTACH] Then you want to open that very same menu with the [B]+[/B] and click "[B]Add Action...[/B]". It will open the following window. [ATTACH=full]10924[/ATTACH] Open the dropdown "[B]External Tools[/B]" followed by the next one, then click "[B]SWF Compiler[/B]", which is the tool we created earlier. Once done, click "[B]Ok[/B]", and "[B]Ok[/B]" again. If all is well, this new button should now be present on your toolbar: [ATTACH=full]10925[/ATTACH] However, that's not [B]QUITE[/B] all. Now, we need to open your [B]"HabboConfig.xml[/B]" in your favourite code editor, and edit the following values: [ATTACH=full]10926[/ATTACH] Replace the [B]following[/B]: [CODE=xml]<path-element>C:\Users\John\Desktop\HabboAS3\src</path-element> <path-element>C:\Users\John\Desktop\HabboAS3\compiler\Library\AS3\classes</path-element> <path-element>C:\Users\John\Desktop\HabboAS3\src\Habbo.as</path-element>[/CODE] With your OpenSWF Folder's Location, so for me it's the following: [CODE=xml]<path-element>/Users/cam/Documents/SWFdev/one/src</path-element> <path-element>/Users/cam/Documents/SWFdev/one/compiler/Library/AS3/classes</path-element> <path-element>/Users/cam/Documents/SWFdev/one/src/Habbo.as</path-element>[/CODE] And [B]now [/B]that's basically it. Go ahead and click your new shiny button, and it should; if all has gone right, you should get a nice compiled SWF! [ATTACH=full]10927[/ATTACH] Now, I want to say I apologise in advance if this tutorial isn't very formal, I haven't done this very often, and it's my first attempt, so be nice! If you have any questions, I relatively active, and i'll check back semi-regularly. But I hope this gives you a basic idea at minimum of how to Setup IntelliJ for SWF Editing / Developing. Thanks for Reading, and I hope this is useful. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
Configuring IntelliJ for SWF Modifications
Top