English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 25 August 2008, 22:31   #1
Jherek Carnelia
Dazed and Confused
Jherek Carnelia's Avatar
 
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 227
Question Icon launch wont work

This is an old problem that I'm still stumped by. I have a little program that I want to be able to start from an icon, but it's not working properly.

The thing will run from devpac when it is assembled.
It will run from the shell.
It will launch from the icon, if the files are put into the RAM disk.

It won't launch from the icon when it's in a directory.

Does anyone have an idea why? I have attached the files, if anyone cares to look at it.

Last edited by Jherek Carnelia; 09 April 2011 at 22:22.
Jherek Carnelia is offline  
Old 26 August 2008, 03:06   #2
thor
Registered User
thor's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 898
It simply doesn't find the picture. If you run the program from it's icon, the current directory isn't changed to the program directory. You can also try this (assuming the picture doesn't reside in sys):
Code:
cd sys:
<path to your program>/maincode
As the current path is sys: and not your program directory, it doesn't find the picture either. You should get your program's path and set the current directory to it. From a very quick glance in the autodocs it seems GetProgramDir/NameFromLock/SetCurrentDirName might be an option. Haven't tried it though.

Edit: Alternatively you simply could use this
Code:
file2			DC.B	"PROGDIR:venus.lores0.raw",0

Last edited by thor; 26 August 2008 at 06:36.
thor is offline  
Old 26 August 2008, 12:11   #3
Jherek Carnelia
Dazed and Confused
Jherek Carnelia's Avatar
 
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 227
What puzzles me is why it works from the icon when it's in the RAM disk; what's the difference in the way programs are launched?
Jherek Carnelia is offline  
Old 26 August 2008, 12:23   #4
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,265
That's probably because the RAM disk is set to be in your path by default. You can check this by opening a CLI and typing the command "path".
Leffmann is offline  
Old 26 August 2008, 12:49   #5
Jherek Carnelia
Dazed and Confused
Jherek Carnelia's Avatar
 
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 227
Yes Leffmann you're right, the RAM disk is a default path.

Guess I'll just have to figure out how to use the GetProgramDir/NameFromLock/SetCurrentDirName.
Jherek Carnelia is offline  
Old 26 August 2008, 15:30   #6
thor
Registered User
thor's Avatar
 
Join Date: Mar 2006
Location: Germany
Posts: 898
You don't have to, just use PROGDIR: which is set to your program's directory. Both options need Kick 2.0+.
thor is offline  
Old 26 August 2008, 16:23   #7
Jherek Carnelia
Dazed and Confused
Jherek Carnelia's Avatar
 
Join Date: Dec 2001
Location: portsmouth/uk
Posts: 227
Thor - well done that works a treat! How easy is that!!!
Jherek Carnelia is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any reason why this wont work with my Deneb? RMK support.Hardware 4 20 October 2011 23:28
how to launch games with no icon ? phaistos project.Killergorilla's WHD packs 10 03 December 2009 18:22
Catweasel MK4 - wont work chaoticjelly support.Hardware 32 02 December 2006 22:23
The HD just wont work! sence2001 support.Hardware 4 17 October 2004 23:34
DPaint wont work jambomiga support.WinUAE 15 30 August 2003 00:48

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

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

Forum Jump


All times are GMT +2. The time now is 15:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.06689 seconds with 13 queries