You are here

Using mingw32

8 posts / 0 new
Last post
csw900
Offline
Last seen: 2 years 10 months ago
Joined: 2019-08-07 14:08
Using mingw32

My proposed portable app is written in c++ and is compiled with mingw32. I wrote and have full control of the source code.

At present all of the apps program, dependencies and data are in one directory. It works fine, even on a mac or Linux under wine. It is fully portable in that if you copy all of the files to any folder or usb stick the app still works OK.

mingw32 looks for its dependencies either in the same directory as the .exe or on the Windows PATH. How do I make it look in the App/Appname for these dependencies without altering the PATH?

All suggestions welcome and apologies if this question has been asked before as I am new to portableapps.com and are still finding my way around.

csw900

John T. Haller
John T. Haller's picture
Online
Last seen: 1 min 2 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Launcher

You can keep your app within App\Appname and use the PA.c Launcher to start it. In its most basic mode, it can be used as a glorified Windows shortcut, setting a command line and working directory only.

Sometimes, the impossible can become possible, if you're awesome!

csw900
Offline
Last seen: 2 years 10 months ago
Joined: 2019-08-07 14:08
launching mingw32 app

Thanks John, I will try PA.c after I have found it and had a look at it.

John T. Haller
John T. Haller's picture
Online
Last seen: 1 min 2 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Template

You can grab the template which has a basic pre-compiled version and then edit App\AppInfo\Launcher\AppNamePortable.ini to set it as you need it to start out with. The Template, Launcher, and Manual are all in the Development section: https://portableapps.com/development

Sometimes, the impossible can become possible, if you're awesome!

csw900
Offline
Last seen: 2 years 10 months ago
Joined: 2019-08-07 14:08
launching mingw32 app

Much against my better judgement I have installed the Portable App Launcher, had a quick look at it and do not much like what I see.

I suspect a Windows batch file would start my proposed app just as well (not tried yet). I have had a look at the Audacity Portable app - is this using your launcher? or have they written their own AudacityPortable.exe to start the main .exe program?

I would much rather work with my source code and do the job properly. Could there be a mingw32 makefile command which would direct my App to look for its dependencies in a named sub directory.

Perhaps I need to consult the mingw32 experts.

John T. Haller
John T. Haller's picture
Online
Last seen: 1 min 2 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Batch File

Batch files will show a command line Window and are, of course, not permitted as part of a PA.c Format app. You could easily write a stub EXE to act as a shortcut as well. Keep in mind that the template is a full set of commands compiled by default for testing to make it easier for newer developers or experienced developers to have a starting point. The base set is smaller.

Sometimes, the impossible can become possible, if you're awesome!

csw900
Offline
Last seen: 2 years 10 months ago
Joined: 2019-08-07 14:08
launching mingw32 app

Thanks John, it looks like a stub .exe is my best option at present. My proposed portable app is my eplayOrgan program which is a fully functional pipe organ simulator with many unique properties. I will take it from here and learn more about portable apps as I go.

csw900
Offline
Last seen: 2 years 10 months ago
Joined: 2019-08-07 14:08
launching mingw32 app

I have been unable to make mingw32 produce an .exe stub without having to have a .dll associated with it. I think that static linking is the answer but the necessary static library is not available.

Thus I am now using your launcher which correctly does the job.

Thanks for your help.

csw900

Log in or register to post comments