electron-forge #maker-dmg how to change icon positions in the dmg installer - macos

I have been trying to modify some parameters in the maker-dmg, so far I got all I wanted but the icon position.
this is what I have at the moment:
name: "#electron-forge/maker-dmg",
config: {
title: "Gallery",
background: "src/assets/installer-assets/installBackground.png",
format: "ULFO",
icon: "src/assets/installer-assets/brand-icon.icns",
contents: [
{ x: 192, y: 344, type: "file", path: "Gallery.app" },
{ x: 428, y: 344, type: "link", path: "/Applications" }
]
}
but I am getting an error saying it can't find the Gallery.app.
An error occured while making for target: dmg
"Gallery.app" not found at: /var/folders/07/rvgsd3wx7_949217htsn84pw0000gn/T/Gallery.app
I know that the maker only forwards information to the appdmg library.
I have been going through their documentation, all I found is that all are treated as relative paths.
Basically I don't know what is the temporary mounting location, I only wanted to specify the x and y variables from the content object, but it forces me to specify type and path.
Has anyone changed the dmg style before? Please any help is highly appreciated.
PD. this works when I mount a dmg before without specify content and then I add content like:
{ x: 192, y: 344, type: "file", path: "/Volumes/Gallery/Gallery.app" },
But once I eject it and update the forge config to include the above line It breaks.

If anyone going through the same bs, just used process.cwd().
See example:
contents: [
{
x: 192,
y: 240,
type: "file",
path: `${process.cwd()}/out/Gallery-darwin-x64/Gallery.app`
},
{ x: 466, y: 240, type: "link", path: "/Applications" }
]
and I can finally play around with icon positions! Happy coding.

Related

VSCode opens in wrong folder and adds cd to path

I recently installed vscode and when I run code . from the terminal it opens in the wrong folder, normally 2 folders up from where I am in the terminal and it also opens a new file called cd everytime it is opened in this way.
I started it in verbose mode and the pathsToOpen looks odd as it has the cd appended to the end of the path:
windowsManager#open pathsToOpen [
{
fileUri: h {
scheme: 'file',
authority: '',
path: '/Applications/Visual Studio Code.app/Contents/cd',
query: '',
fragment: '',
_formatted: null,
_fsPath: null
},
type: 1,
exists: false
},
{
workspace: { id: '3db690dfbc8707bfabc4d88e8b93f152', uri: [h] },
type: 2,
exists: true
}
]
[main 2022-06-29T12:58:36.049Z] windowsManager#doOpenFolderOrWorkspace {
folderOrWorkspace: {
workspace: { id: '3db690dfbc8707bfabc4d88e8b93f152', uri: [h] },
type: 2,
exists: true
},
filesToOpen: {
filesToOpenOrCreate: [ [Object] ],
filesToDiff: [],
remoteAuthority: undefined
}
}
I am not sure what can be causing this, looking on google hasnt helped me, the vscode github suggests asking questions here so hopefully I can get to the bottom of this.

Electron js error - file not found

I have a electron app, so in my dashboard page i am getting an error look like this
Error: Unhandled "error" event.(File not found)
I am using tradingview widget.
var widget = new TradingView.widget({
// debug: true, // uncomment this line to see Library errors and warnings in the console
fullscreen: true,
symbol: 'AA',
interval: 'D',
container_id: "tv_chart_container",
// BEWARE: no trailing slash is expected in feed URL
datafeed: new Datafeeds.UDFCompatibleDatafeed("http://abc.loc/api"),
library_path: "../../assets/charting_library/",
locale: "en",
// Regression Trend-related functionality is not implemented yet, so it's hidden for a while
drawings_access: { type: 'black', tools: [ { name: "Regression Trend" } ] },
disabled_features: ["use_localstorage_for_settings"],
enabled_features: ["study_templates"],
charts_storage_url: 'http://saveload.tradingview.com',
charts_storage_api_version: "1.1",
client_id: 'tradingview.com',
user_id: 'public_user_id'
});
How can I get the file name which can not be found. Thanks!

No handlers could be found for logger "django_facebook.models"

while installing django_facebook, i got an error :
Validating models...
No handlers could be found for logger "django_facebook.models"
Unhandled exception in thread started by <function wrapper at 0x1032a5758>
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 93, in wrapper
fn(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py", line 101, in inner_run
self.validate(display_num_errors=True)
File "/Library/Python/2.7/site-packages/django/core/management/base.py", line 310, in validate
num_errors = get_validation_errors(s, app)
File "/Library/Python/2.7/site-packages/django/core/management/validation.py", line 113, in get_validation_errors
from django.utils.image import Image
File "/Library/Python/2.7/site-packages/django/utils/image.py", line 154, in <module>
Image, _imaging, ImageFile = _detect_image_library()
File "/Library/Python/2.7/site-packages/django/utils/image.py", line 108, in _detect_image_library
_("Neither Pillow nor PIL could be imported: %s") % err
django.core.exceptions.ImproperlyConfigured: Neither Pillow nor PIL could be imported: No module named Image
It is a pure django project created by pycharm. I was following the document of django_facebook, installation section. What I do is just get facebook app and type the code 'django_facebook' in INSTALLED_APP in settings.py.
It's same results when syncdb also.
I'm using python-2.7.5 and django-1.6.5.
I can't find any answer to solve this. anybody knows this?
Regarding the warningNo handlers could be found for logger "django_facebook.models" and not the error. This question came up on search for that warning, thought this would be useful for others.
django-facebook outputs logs when in operation, just like other django components do. You have to tell Django what you want to do with these messages. In django terminology the app outputs some messages as a logger without needing to know what to do with them, you have to then patch these to a handler which doesn't know anything about your use case, but does know about sending emails/texts/carrier pigeons.
In your settings.py file find LOGGING=..., in the loggers dict you will have to specify what handlers you want to handle the output from django-facebook.
For more information see the docs on logging https://djangoproject.com/en/dev/topics/logging/
My logging variable looks like this, notice the bit at the bottom:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins','console'],
'level': 'ERROR',
'propagate': True,
},
'django_facebook.models': {
'handlers': ['mail_admins','console'],
'level': 'ERROR',
'propagate': True,
}
}
}
You could try pip install pillow

Download rtmp stream

Hi a friend of ours mother just passed and they'd like the recording of the wedding so they can keep it on a flash drive. I played for about a half hour but have been unsuccessful. After looking at the pages source I fount the following javascript
if ( hasProductInstall && !hasRequestedVersion ) {
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
var MMdoctitle = document.title;
AC_FL_RunContent(
"src", "http://AbrahamLGreenandSonSympathyNet.ezwebcast.com/player/playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "483",
"height", "416",
"align", "middle",
"id", "FlashPlayer",
"allowFullScreen","true",
"quality", "high",
"bgcolor", "#FFFFFF",
"name", "FlashPlayer",
"allowScriptAccess","always",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "http://AbrahamLGreenandSonSympathyNet.ezwebcast.com/player/player",
"FlashVars","isDebug=0&mv=rtmp://fms35.ezwebcast.com/play/6/recorded_streams/3208/stream15989&user_id=32125&movie_id=14275",
"width", "483",
"height", "416",
"align", "middle",
"id", "FlashPlayer",
"allowFullScreen","true",
"quality", "high",
"bgcolor", "#FFFFFF",
"name", "FlashPlayer",
"allowScriptAccess","always",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
}
The line of interest at least in my opinion is rtmp://fms35.ezwebcast.com/play/6/recorded_streams/3208/stream15989&user_id=32125&movie_id=14275 I'm assuming that's what I need to download however when I downloaded rtmpdump and tried to run it I get the following and I haven't been able to figure out how to load the library or get this stream downloaded. Any help is greatly appreciated!
USERs-MacBook-Pro:Desktop user$ rtmpdump -r rtmp://fms35.ezwebcast.com/play/2/recorded_streams/3208/stream15989 -W "http://media.kelbymediagroup.com/players/player-4.6-licensed.swf" -o ./funeral.flv
dyld: Library not loaded: /usr/local/lib/librtmp.dylib
Referenced from: /usr/local/bin/rtmpdump
Reason: no suitable image found. Did find:
/usr/local/lib/librtmp.dylib: stat() failed with errno=13
/usr/local/lib/librtmp.dylib: stat() failed with errno=13
Trace/BPT trap: 5

CKEditor 'Send it to the server' button is invisible

Experiencing strange behaviour with CKEditor. I have everything set up and I can upload images just fine. But the only problem I have is that I cannot see the 'Send it to the server' button in the upload form. I know it's there because if I hover over the area it's supposed to be on, the alternative information reads 'Send it to the server'. Furthermore if I press the area, it will upload the photo:
I haven't edited any CSS files or tampered with the code except to include the upload script.
The image.js file reads:
{
id: 'Upload',
filebrowser: 'uploadButton',
label: editor.lang.image.upload,
elements: [
{
type: 'file',
id: 'upload',
label: editor.lang.image.btnUpload,
style: 'height:40px',
size: 38
},
{
type: 'fileButton',
id: 'uploadButton',
filebrowser: 'info:txtUrl',
label: editor.lang.image.btnUpload,
'for': [ 'Upload', 'upload' ]
}
]
}
The file input shows but not the button.
Turned out to be a custom skin I was using that didn't contain all the necessary classes.

Resources