compiling actionscript in linux - linux

I'm working on a website that requires a flash mp3 player. I have absolutely no idea the procedures from messing with flash/actionscript/flex etc., however I need to edit the flash very slightly (I need to add two lines of code). There are a multitude of tutorials out there for setting up a flash (or flex or whatever) development environment but, as my needs are so simple, I'd like to go a little more light-weight than that (also, many seem outdated). I guess what I'm saying is I'm looking for a simple way to recompile some existing actionscript (command line is a plus!). Does anyone have a trick up their sleeve to accomplish this?

Download the free/opensource Flex 3 SDK. This includes an ActionScript3 compiler. Run the compiler like this:
mxmlc MyAs3File.as

There's MTASC for ActionScript 2.

You can compile it online here: http://wonderfl.kayac.com/. No mess that way.

I also wanted to say that swftools has exactly what you need. There is a swfc compiler which will compile as2 files. I would really recommend updating the source though. AS3 is much faster than AS2 and there are a lot of tools out there for example mxmlc and fcsh included in the open source Flex sdk. If you are looking for a full blown IDE there is a linux version of Flash Builder that was released as an open source port ... there are a couple other ones out there as well.

General Linux
On linux you can get the source from swftools.org.
Debian / Ubuntu
On debian / ubuntu you can run
apt-get install swftools
Mac OS X
Not exactly 'linux' but on mac OS X if you have homebrew installed you can do:
brew install swftools
Great, but how do I compile the code?
One this is installed you should have a new utility that you can use to do:
as3compile MyAs3File.as
Gotchas
Please note this is not a 1:1 replacement for Adobe's compiler - there are some things that it does not support ( see documentation, FAQ, changelog at swftools.org ) but it worked well for compiling my simple actionscript.

Related

How to use two Qt5 versions on KDE Plasma to avoid conflict?

I am using Opensuse Leap 42.3, with KDE Plasma 5.8.7 which uses Qt 5.6.2.
I would like to use the latest Qt version (5.10 as of asking this question) for development, and I've installed it in /usr/local/Qt5.10/.
I added Qt5.10 library path (/usr/local/Qt5.10/5.10.0/gcc_64/lib/) to my /etc/ld.so.conf but it caused a conflict with system's Qt version, which as a result anything using Qt libs (Dolphin, Kate, etc) won't work, and if logged out, cannot login, complaining about qdbus.
I tried to create symlinks in /usr/lib64 like this:
for f in /usr/local/Qt5.10/5.10.0/gcc_64/lib/libQt5*.so.5.10; do
ln -s $f /usr/lib;
done
But this too, made the same problem. I have also added a LD_LIBRARY_PATH entry in ~/.profile but with the same problem.
I can do export LD_LIBRARY_PATH="/usr/local/Qt5.10/5.10.0/gcc_64/lib/" in a terminal and run my Qt5.10 application, but this is not convenient.
What is the correct way of doing this?
It may not be convenient, but setting the path up as you launch seems to be the only way to avoid the issues you mention.
I also use KDE, and am playing with Qt 5.10 visualisation stuff on a system using Qt 5.9 and have experienced the hell of mashed library dependencies you mention.
Qt Creator seems to take care of that and in other environments (eg: KDevelop) you can add it to the path in the run/debug launch settings. And although not portable, you could also add it to the path for your desktop file...
The qtchooser utility might be useful although I admit I don't really understand how it's supposed to work.
Yes, I realise this is a low quality answer but I am interested in seeing a better solution too.

GTK+, GLADE, PYTHON 3.6 Windows

I am an Electrical engineer. I am completely new for programming and coding..
Actually i am working as estimation engineer, where i am doing the same estimation again and again with excel.
As same in design stage also i am doing the same again and again.
I thought i will create a application which will automatically do the estimation based on my input. and the same time at the time of design stage it will input from my estimation sheet it will generate the drawing automatically.
(i am doing estimation in excel, preparing drawing in auto cad)
from google, i found the following..
To write a program I need to know a language. so i selected python version 3.6.1
To create a stand alone or micro soft windows installer i selected cx freeze which is converting my code to .exe filex
To create a user interface i selected glade.
But i dont know how to install gtk builder to link pythin code and glade files.
Hopefully you got the point what i am looking..
I am using windiws 10 with 64 bit version
Advance thanks for all
All the information you need on how to install GTK+ and Glade on Windows is on the GTK+ Website.
However, If you're a total beginner, then I suggest you start small, as the kind of work you're describing seems a lot of work for someone who has never written a single line of code.
As suggested by #liberforce, install GTK+ and Glade on Windows from their GTK+ Website. This way you will have an environment (MINGW64) inside which you can practice.
Install python from their download site.
Check also these instructions for how to use it.
The key points (at least for me) are:
Copy the hello.py script you created to C:\msys64\home\<username>
In the mingw32 terminal execute python3 hello.py - a window should appear.
After that, if you want to make an executable, follow these instructions. Try their example for gedit to get some ideas on how to create and how PKGBUILD works (a.k.a. follow the instructions for gedit to see what's happening).

Setting up ARM Toolchain in Qt Creator (Ardupilot project)

I'm starting a drone project based on Ardupilot and trying to build Ardupilot project using Qt Creator, following this instructions . I'm working with Ubuntu, BTW.
You've probably find this stupid (cause it probably is), but I'm not able to set up the compiler (in spite of having the instructions):
As suggested, I downloaded the compiler from here, and tried to follow the instructions but after choosing a custom compiler in 'Build & Run', the 'Make path' is driving me crazy and I have no idea of which path is that (in other words, the equivalent to the file 'make.exe' in Windows, see the image attached), since there doesn't seem to be anything similar in the compiler folder and it doesn't seem to refer to the Makefile of the project.
Hope anyone can help me, as you've surely noticed, I'm pretty new to big, real projects and also to Linux itself.
Thanks in advance,
Eduardo
PD:
Instructions provided (both Windows & Linux):
Linux: Which one is the 'Make path'?
The build directory should point to ardupilot/ArduCopter if you are building for Copter
In the example it was pointing to ardupilot
Compiler path: /opt/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc
The make file path: /usr/bin/make
First. What version of qt? If it's 5.7 then the 2015 toolkit won't work. If you're new to Linux then you should definitely stay with a prior version of qt 5.7 until someone has compiled a new toolkit that supports a c++11 compiler.
You don't have enough info on what you're doing to give a good answer though.
What do you need the program to do? If it's Qt3d on Arm then you have a big problem only 5.7 will do.
Hope this helps.

How can a Linux source package be opened as a project in an IDE?

I am makeing a small mod to SMPlayer; the Linux version...
The make, sudo make install from the command line works, but I would like to have the project in an IDE.
I want to use CodeBlocks IDE, only because I've used it before, but if some other IDE is required, I can use that instead... (I use Codeblocks because it is simple, and that suits my current ability to handle an IDE)..
Is there some way to use SMPlayer's Makefile, or some such thing?
This depends on the IDE and has little to nothing to do with Linux.
Does your program come with something like cmake or another setup tool? That normally makes it much easier. For example in KDevelop you can import straight from CMakeLists.txt and Makefiles.
If all else fails it might be quite easy to do something like this (not knowing your specific IDE):
Add new Project
Set build directory and other necessary settings (like compiler and compiler flags)
Add the already existing files to it.
Press "Compile"-button.
This is obviously depending on the project structure, setup and size.
Code::Blocks has builtin support for Makefile projects. See the FAQ.
Also you could just use vim or emacs ;)

which GUI based C++ IDE is commonly used for gnome applications

which GUI based C++ IDE is commonly used for developing gnome applications?
I am asking specifically for the gnome-system-monitor because I would like to fiddle around with it. And I would like to do it with a nice GUI based C++ IDE.
I thought that Anjuta is the default IDE for gnome applications. But when I fetch the sources there are no files which are obviously project files.
EDIT: Here is what I did so far
# get the build dependencies for the gnome-system-monitor
sudo aptitude build-dep gnome-system-monitor
# get the sources for the gnome-system-monitor
mkdir example
cd example
apt-get source gnome-system-monitor
# build the gnome-system-monitor
cd gnome-system-monitor-2.28.0
sh configure
make
But nothing inside gnome-system-monitor-2.28.0 looks like a "project file".
I believe Glade is used, or at least was used at the time.
BTW, I'm not sure Gnome is C++. There are C++ wrappers, like gtkmm and glibmm, but I believe that core Gnome is written in C.
Simply "create project from existing sources" in Anjuta. Anjuta's "project files" do not contain a lot of information, instead the Makefile.am and configure.ac files are used.
I have no idea what the gnome-system-monitor developers use, but I've read that a lot of Gnome developers use emacs, which apparently also doesn't require "project files".

Resources