View Full Version : Building the project as EXE file with EXTERN files???
AlexSugar
01-05-2007, 05:12 PM
I wanna build the whole project as EXE file.
But only with "Audio", "Script", "Plugin", "Image", "Flash" and "Icons" in it.
I want to let "Docs" and "Videos" folders EXTERN. My Project was written for DVD's. "Videos" (with movies in it) and "Docs" (with codecs and players in it) shouldn't have to big size to build it as one file.
Is it possible? :huh
AlexSugar
01-06-2007, 09:11 PM
______________________________________
Intrigued
01-06-2007, 09:24 PM
If you would like to delete those two folders (if you have anything in them of course you would want to backup such first). Then have a look at using the following Actions in AMS;
Dialog.FolderBrowse()
Folder.Create()
File.Copy()
In short...
You could create the folders (Folder.Create) on the clients system (or let them pick a location (aka. folder) to store such).
Then you can copy the files into the folders you or the end-user want (File.Copy).
That's one approach anyway.
Intrigued
01-06-2007, 09:27 PM
Also, you may want to change your signature from:
Ask Questions, Demain Answers...
to...
Ask Questions, Demand Answers...
AlexSugar
01-10-2007, 06:35 AM
Hi Intrigued,
I think you didn't understand me. Look, I made a DVD project to save about 6 movies on it. I used AMS6 to create a "Movie Autoplay" (with movie information a.s.o.). I always built the project as "Burn Data CD/DVD" (all the folders were extern of the executable file. Now I want to bulid the whole project executable (as one file), only without "Docs" and "Videos" folders. I wanna let them extern > on DVD, because they are to big (with movies about 4 GB)
Any suggestions?
PS.: Thanks for fixing my mistake in my signature. My bad English... :rolleyes
You could use the web exe file approach, but instead of a internal Docs and Videos folders use your own folders in the CD root. Just add these folders to your project next to autoplay.exe.
Load the files into objects with a path like one of these:
_SourceFolder.."\\Docs\\coda.exe"
_SourceFolder.."\\Videos\\WhiteAndNerdy.mpg"
_SourceFolder.."\\CustomFolder\\MyFile.ogg"
AlexSugar
01-10-2007, 07:50 AM
Hi bule,
thank you for the suggestion! I'll try this, but I think I remember, that I already tried that. AMS6 has taken everything that contains in the folder which contains autorun.exe file (source folder). But I'll try that again. :yes :)
RizlaUK
01-10-2007, 07:57 AM
correct me if i am wrong, but if the app is a web exe when it is run it will unpack to a temp folder so "_SourceFolder" will be the path to the temp folder and the autoplay will not find the folders on the cd,
im sure i saw something in the manual about _SourceFolder only applying to to burn data CD/DVD type of apps and that function will not work with web exe's
but i found this in the manual
Tip: Occasionally you may need the location your compressed executable was launched from. For this reason a command line argument is passed into your AutoPlay application in the form: SFXSOURCE:SFE EXE NAME where "SFE EXE NAME" is the full path to the compressed executable. For example, "SFXSOURCE:C:\Temp\launcher.exe". In your AutoPlay application you can access this command line argument using the Global Variable _CommandLineArgs. If any command line arguments are passed to the compressed executable, they will also be passed into the AutoPlay application.
i havent a clue how it works but it looks like what you need
Intrigued
01-10-2007, 08:06 AM
Taking off from the last post you then may want to look a this post I did for the Suggestions area:
http://www.indigorose.com/forums/showthread.php?t=11327&highlight=SFX
AlexSugar
01-10-2007, 08:18 AM
Hi Intrigued!
Tell me some more please, how can I use your scripts in my project. Where should I set it?
AlexSugar
01-10-2007, 08:21 AM
Hi RizlaUK!
I need some more details to try out your suggestion :huh
RizlaUK
01-10-2007, 08:39 AM
Alex, im sorry but i cant realy help, i got that information from the manual but it looks like the post that Intrigued pointed you to dose the same thing, im not sure how to use it, in fact i would like to know how as i also would like to make a a ppwith the same file structure as you are asking,
--[[ NOTE: This function only works AFTER you Build (F7) the project!
The following function takes one argument (runexe = path and name of .exe)...
and returns one string (strPath = the path of...
the location of the .exe), NOT the temp ran-from location!
]]
function fnEXEOrigLoca(runexe)
resFile = File.Run(runexe, "", "", SW_SHOWNORMAL, false)
strCWF = Folder.GetCurrent()
strPath = String.Replace(_CommandLineArgs[1], "SFXSOURCE:", "", true)
return strPath;
end
-- An example "function call" (to use the function)
fnEXEOrigLoca(_DesktopFolder.."\\app_name.exe")
-- This Message box can be removed (it's just for visual feedback)
Dialog.Message("", strPath)
Intrigued, correct me if i am wrong, but with this code, strPath is the path to the exe and i would use
eg:
Image.Load("Image1" , strPath.."\\Images\\myimage.jpg");
or would i need to use
eg:
sPath = String.SplitPath(strPath);
Image.Load("Image1" , sPath.Drive.."\\"..sPath.Folder.."\\Images\\myimage.jpg");
RizlaUK
01-10-2007, 09:48 AM
again, the edit button seems to have disapeared, guess my browser has some probs,
ok i got it sussed, just to be clear for alex
put this in global functions
function fnEXEOrigLoca(runexe)
resFile = File.Run(runexe, "", "", SW_SHOWNORMAL, false)
strCWF = Folder.GetCurrent()
strPath = String.Replace(_CommandLineArgs[1], "SFXSOURCE:", "", true)
return strPath;
end
and call your movie files like this
fnEXEOrigLoca(_DesktopFolder.."\\app_name.exe")
sPath = String.SplitPath(strPath);
Video.Load("Video1", sPath.Drive.."\\"..sPath.Folder.."\\Videos\\MyVid.avi", false, false);
i take no credit for this code
i didebt think this was possable, im gonner go tidy up my apps now and make them all web exe (i hated having all the files exposed)
Thanks Intrigued for the original post :yes
AlexSugar
01-10-2007, 12:18 PM
RizlaUK & Intrigued, thank you for your support! :yes :cool :yes
Unfortunaly I still can't get it till the end. :rolleyes
RizlaUK, I would like the same script (the last one), but with "File.Open" (to open files with default player of the end user) and everything using "List.Box". I tried that, but nothing happens... :o
Inrigued and RizlaUK, what should I do with the movie files? where should I let them before I burn them (so, that I could check, if that works)?
And what about the ready exe file?
:huh
In the scripts I saw something about the Desktop folder. What does it mean (for my project)? :huh
----------------------------------------------
Between:
My main question of this thread was, if I can set all the needed files to run the exe (images, audios, buttons and plugins...), but without "temping" files on the PC of the end user - just run the EXE direct from the DVD.
----------------------------------------------
THANK YOU FOR HELPING!!! Nice of you =)
RizlaUK
01-10-2007, 01:52 PM
right, to start, i dont know what the _Desktop folder is about Intrigued might be able to give more information on that, and the file.run part caused me a few problems, my app worked anywhere on my pc except for on my desktop, well it worked but it just keeped relaunching its self over and over again, i had to shut down to stop it
i removed the file.run part and it works fine now anywhere on my pc,
i dont think there is anyway of running any app with out it wrighting to the hdd, its just the way windows works
i will be able to make you a demo app in a little while (once i get my kids to bed) but remember with this code the app will not work in preview mode, you have to build it to test,
just to be clear, you want the video folder outside the exe and everything else inside it, the video files to show in a listbox and launch in the default player, this wont be a problem for me to do
THANK YOU FOR HELPING!!! Nice of you =)
not a problem, helping you is teaching me so we both get something out of it :)
AlexSugar
01-10-2007, 02:03 PM
RizlaUK,
Yes, that's right. You can leave this idea with "Docs" folder. (I wanted to put in some Codec Softwares (but the size is to big 35 MB). For this action I used a special button)
I think, if I reach the size of the application less that 5-8 MB, it would be perfect!
----------------
I used "Build" to check this actions.
----------------
PS: I am excited of your answer!
RizlaUK
01-10-2007, 04:17 PM
ok alex, here you go, its a simple demo with a list box and a button, you need 2 external folders (Video & Codecs) just pop your video files in to the video folder and run the app and it will display them in the listbox, double click a item in the list box to launch it in the default viewer/player (it will work for any type of file)
the button will install your codecs but you will need to edit the filename
the function for the list box is in global functions and is called in the page onshow event
the function for the button is in the button onclick event,
i attached the apz and a zip with a folder called "external_video" wich has a built version with the folders needed, just put some files in the video folder and run the app, i did this so you could see it working stright away, the codecs folder has the traytip app that was posted on this forum, just click the "install codec" button and it will launch, again, i did this so you could see it working
any problems or need more help then feel free to get back to me
EDIT:, i was having trouble uploading as a attachment so i uploaded it here:
http://www.box.net/public/cm3scnuvix
AlexSugar
01-10-2007, 05:18 PM
RizlaUK, thank you very much! :D
Now, I've got it and even much more! With your sample, I can make many new features for my project! Very nice! :yes :yes :yes :yes :yes :yes :yes
any problems or need more help then feel free to get back to me
I've left a Private message for you. [I want to have your name on support-team list of my project. I would like to know your real name.]
Intrigued
01-10-2007, 07:15 PM
Sorry there... today was a busy day and I'm still busy tonight. But, I'm glad someone was able to get your project moving forward.
:yes
RizlaUK
01-10-2007, 07:41 PM
well Intrigued, it would never of happend without your code, so we both have you to thank :yes ;)
i do have a small question though,
is this line of code neccesary as it caused me some problems when the app was placed on the desktop
resFile = File.Run(runexe, "", "", SW_SHOWNORMAL, false)
i removed it and all seems to work ok, but i was just wondering what its purpose was and would it cause me or my users any problems with it not being there in the long run
Jonas DK
01-11-2007, 01:16 AM
Fantasic
Like you Rizla I hate having the files exposed and I can now see that I have a few hours of scripting to do to change some app's.
cool job intrigued.
Jonas
Intrigued
01-11-2007, 10:07 AM
well Intrigued, it would never of happend without your code, so we both have you to thank :yes ;)
i do have a small question though,
is this line of code neccesary as it caused me some problems when the app was placed on the desktop
i removed it and all seems to work ok, but i was just wondering what its purpose was and would it cause me or my users any problems with it not being there in the long run
You are right, looks like I left some "testing" code in there.
If you run into a problem post back if you would.
Thanks,
AlexSugar
01-11-2007, 11:32 AM
Hi RizlaUK,
Read a private message, please ! :)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.