Guidance
指路人
g.yi.org
Guidance Forums / Rapid-Q Basic / Application setup

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Application setup
#979
Posted by: cajino 2003-06-09 17:24:33
Hi everybody.
I need a small installer for my RQ applications, to perform a few tasks:
- Create a directory
- Copy the .exe and possible other files in said dir
- Create a shortcut on the desktop and/or start menu

Is there something of the kind already?
Message2. Re: Application setup
#980
Posted by: 2003-06-09 18:01:38

I use "Inno Setup" ... because it's free and easy !
   http://www.jrsoftware.org/isinfo.php
But there must be many others probably much better !

Jacques
Message3. Re: Application setup
#981
Posted by: guidance 2003-06-09 20:23:06
The first 2 task is quite easy in RQ, the problem is the third one. There seems no direct win api calls to create shortcut (.lnk). I found a good alternative approach written in VB, looks very easy to convert to RQ:

http://www.mvps.org/vbnet/index.html?code/shell/shshortcutcheat.htm

If you converted, please kindly share it to others by uploading here:
http://g.yi.org/_scripts/file.php?f=76&r=2330
Message4. Re: Application setup
#985
Posted by: cajino 2003-06-10 18:02:11
Sorry Guidance I spent a good part of the night trying to come to terms with those darn API but got nothing good out of it. I guess I'll have to study some more...
Anyway, I tried Inno Setup, and it's really good.
Bye

Cajino
Message5. Re: Application setup
#988
Posted by: 2003-06-11 23:15:10


Creating a Shortcut is very easy, just find STKIT432.DLL which is  part of
VB ... I guess

Here is a Example creating a shortcut to the calculator on, the desktop.

I would trade this for an example shwing how to link a Extension to
a software.  IE linking .BAS, .INC .RQB to one of my Executables


'  ----- Begin -----
'  CREATES A SHORTCUT                 by Jacques Philippe, June 2003
'
$ESCAPECHARS ON
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
'
Declare Function fCreateShellLink Lib "STKIT432.DLL" ALIAS "fCreateShellLink"(ByVal _
                lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal _
                lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
'
DefInt lReturn

'Add to Desktop
DefStr addTo, addName, addWhat, nullString
nullString = ""

'Add to Desktop
addTo = "..\\..\\Bureau"      '  "Bureau" is the french word for "Desktop"
addName = "Shortcut to Calculator"
addWhat = "c:\\Windows\\Calc.exe"
nullString = ""
'
'  BOTH LINES WORK WITHOUT CHANGING THE API ARGUMENT
'
'lReturn = fCreateShellLink( "..\\..\\Bureau", "Shortcut to Calculator", "c:\\Windows\\calc.exe", "")
lReturn = fCreateShellLink(addTo, addName, addWhat, nullString)
'
Print "Result : 1=OK/ 0=FAILURE, fCreatreShellLink_Return=";Str$(lReturn)
'
' -------------------------------------------------------------
' EXIT CONSOLE
' ------------
DefStr sExit
Input "nn                    CR to QUIT nn", sExit
Application.Terminate
End
' -----  END ------

Short enough :)

Jacques
Message6. Linking file extensions to a program
#993
Posted by: 2003-06-12 23:40:55
To be able to click on a file in Explorer and have a program load that file and run you can do the following:

Include 'OnShow = Init' in your Form CREATE code and then use something like:

SUB Init
   IF CommandCount = 2 THEN
      FileName = Command$(2)
      FileStream.Open(FileName, Mode)
      ' Set up parameters that are normally done manually
      ' Process the file as normally done manually
   END IF
END SUB

The program will then open with the file loaded and processed as required.

This assumes that you have associated the file extension from the 'View | Folder Options | File Types' menu in Explorer or from 'Open with' in the context menu.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥908.00 ·
 
 
¥1,380.00 ·
 
 
¥1,580.00 ·
 
 
¥890.00 ·
 
 
¥1,800.00 ·
 
 
¥294.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0