Recent

Author Topic: Help testing: macOS and retina BGRABitmap  (Read 4870 times)

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Help testing: macOS and retina BGRABitmap
« on: May 02, 2018, 08:13:47 pm »
Hi, I know that in trunk is possible to have custom controls with retina display on macOS cocoa (https://bugs.freepascal.org/view.php?id=32816).

Basically there are two things to do:
- Use TControl.GetCanvasScaleFactor
- Use StretchDraw

I managed to do the first thing, for Material Design Button here: https://github.com/bgrabitmap/materialdesign

I need the help of people having a mac with retina display, to test the attached project.

What I need to know, if is still blurry or not. I've multiplied width and height values by TControl.GetCanvasScaleFactor, and did a 'stretch draw' with bgrabitmap, using Width and Height of the container.

List of changes. https://github.com/bgrabitmap/materialdesign/commit/bbd0f3f2ac752ae03a2f9a571e0fc455ee799c3f

So please install Material Design package (not from OPM, because I need you to get the latest) open the attached project and post a screenshot here to see if it looks blurry or not.

If this works I need to do the same for bgracontrols as well.
« Last Edit: May 02, 2018, 08:15:42 pm by lainz »

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #1 on: May 05, 2018, 12:19:33 am »
Seems that is not a common setup.. or maybe because native is better.

Well. I will see if I keep or discard these changes. With no testing I can do nothing. In fact not for this package. But for BGRAControls was the main goal. The problem is that bgracontrols is way harder that this simple button control.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help testing: macOS and retina BGRABitmap
« Reply #2 on: May 05, 2018, 07:15:35 pm »
Hmm yeah we got some difficulties testing on MacOS. I recently bought an iPhone 6, so I wonder if this might help. I have not run any Pascal code on it yet however and from the wiki I've got the impression it is a bit complicated.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #3 on: May 05, 2018, 07:19:12 pm »
Yes, I think you need a mac as well to create code for the iPhone.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help testing: macOS and retina BGRABitmap
« Reply #4 on: May 05, 2018, 07:20:03 pm »
Ah I don't have a Mac computer.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #5 on: May 06, 2018, 12:28:39 am »
Yes, I think so that is not possible for you to make native iPhone apps without a mac AFAIK.

What I know is possible to make, is some sort of JavaScript apps and build these online with a service, to produce the iOS "binary" (https://build.phonegap.com/). But these are usually hybrid apps, with HTML and CSS. In the other hand there are other kind of hybrid apps that uses JavaScript but XML to make the UI, then these tools convert the XML to native UI (https://www.nativescript.org/nativescript-sidekick). And another option, is to use React Native, I've used it and it can work for you, if you want to play a bit with phone apps:

https://github.com/react-community/create-react-native-app

https://stackoverflow.com/questions/40587265/react-native-how-to-build-for-ios-from-windows
(React Native has released the " Create React Native App " tool which lets you build Android and iOS app on your windows/linux machine without having to install Xcode or Android Studio using the Expo SDK and app. )

Create React Native App is Free and uses Expo.io that's free. You can try it here https://snack.expo.io/ before installing  :)
« Last Edit: May 06, 2018, 12:46:32 am by lainz »

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Help testing: macOS and retina BGRABitmap
« Reply #6 on: May 06, 2018, 12:50:23 am »
Yes, I think so that is not possible for you to make native iPhone apps without a mac AFAIK.

What I know is possible to make, is some sort of JavaScript apps and build these online with a service, to produce the iOS "binary" (https://build.phonegap.com/).

Correct, you will need a Mac and Xcode to create native iOS binaries, including PhoneGap-type apps, although there are probably online build services that you can use (possibly kind of clunky).

And just so you know, it would be violation of Apple's license to run macOS or Xcode in a VM, etc.

https://images.apple.com/legal/sla/docs/xcode.pdf

(Hence why so many developers of mobile apps use Macs. Since they'll typically be doing both iOS and Android versions, and a Mac is required for the iOS one, they just use a Mac for everything. And underneath it's also a nice Unix system.)

However, as lainz also suggests, you may find that a mobile _Web_ app (not native binary) meets your needs. You can even do those in Pascal. See Part 4 of this article series for more information:

https://macpgmr.github.io/MacXPlatform/WebAppOverview.html

And try out the Fish Facts apps on your iPhone and see whether that sort of app is good enough for you (it's rather simple, similiar to Xcode's iOS Master-Detail app template).

https://macpgmr.github.io/iApps/fishfacts

Some aspects of mobile apps do need native access to the device, but lots of things don't. For example, it's easy to upload and download files in a Web app, etc.

Or just get a used Mac. You'll have fun.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #7 on: May 06, 2018, 01:00:20 am »
And adding to Phil expertise, I'm telling that running a mac on an emulator is really bad, not like running Windows or Linux, it simply does not works fine.

Quote
Or just get a used Mac. You'll have fun.

And if @circular you do that, see if that mac has retina  ;)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Help testing: macOS and retina BGRABitmap
« Reply #8 on: May 06, 2018, 01:06:31 am »
And if @circular you do that, see if that mac has retina  ;)

Although even the older models, like my 9-year-old MacBook, with 1280 x 800 are still fun to use.

Newer MacBooks are 2560 x 1600 for the same screen size (13"), but they're also on the spendy side.

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #9 on: May 06, 2018, 01:10:58 am »
Sure, I will get one mac, maybe not this year but soon. So I can test all 3 major OS properly. Doesn't matter if is not the best of these.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Help testing: macOS and retina BGRABitmap
« Reply #10 on: May 06, 2018, 01:13:19 am »
Sure, I will get one mac, maybe not this year but soon. So I can test all 3 major OS properly. Doesn't matter if is not the best of these.

I do everything with a single computer. Linux in VirtualBox for testing. And Windows on a cheap AWS instance that I connect to via Microsoft Remote Desktop (Windows in a window).

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #11 on: May 06, 2018, 01:21:22 am »
You can also download these for free
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

And as the website suggests, "setting a snapshot when you first install the virtual machine which you can roll back to later", and use that.

But is not as nice as a remote machine.. I think.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Help testing: macOS and retina BGRABitmap
« Reply #12 on: May 06, 2018, 01:26:55 am »
You can also download these for free
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

I'd never heard of those. Great resources for testing Web apps against various versions of MS browsers. IE is particularly iffy since it was historically so non-standard.

One advantage of an AWS instance is that it's also a bonafide Web server too.

circular

  • Hero Member
  • *****
  • Posts: 4220
    • Personal webpage
Re: Help testing: macOS and retina BGRABitmap
« Reply #13 on: May 08, 2018, 09:52:16 pm »
Thanks for the tips. At least I could do some apps. However not really porting LazPaint as such.
Conscience is the debugger of the mind

lainz

  • Hero Member
  • *****
  • Posts: 4468
    • https://lainz.github.io/
Re: Help testing: macOS and retina BGRABitmap
« Reply #14 on: May 08, 2018, 10:02:56 pm »
Thanks for the tips. At least I could do some apps. However not really porting LazPaint as such.

I think I will follow Phil advise, and make web apps (maybe Progressive Web Apps, that also are coming to iOS now). Is easier and works on all devices with no compilation.

 

TinyPortal © 2005-2018