• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
.dmg displaying license agreement when mounted (solved)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

.dmg displaying license agreement when mounted (solved)


  • Subject: .dmg displaying license agreement when mounted (solved)
  • From: "email@hidden" <email@hidden>
  • Date: Sat, 9 Nov 2002 11:29:22 -0500 (EST)

Hi,

Thank you all (David, Michael, Alex, Christian, Paul) for your help, I
tried DropDMG and DMG Maker and the C code, as suggested, this is
exactly what I wanted.

Jacobo


--- Alex Rice <email@hidden> wrote: >
> On Thursday, November 7, 2002, at 04:12 PM,
> email@hidden
> wrote:
>
> > Does anyone know where I can find information about how to create a
> > .dmg file that when mounted displays a license agreement?. I have
> been
> > checking the old Apple's scripts for diskcopy but none of them seem
> to
> > work with the latest diskcopy version in Jaguar.
>
> I am interested to hear if you find out the answer. I've been using
> DMG
> Maker to do this.
> http://pliris-soft.com/products/dmgmaker/dmgmaker.html
>
> I think I asked pliris for source code how to do the licence
> agreement,
> but they politely declined to reveal.
>
> BTW attached is some code which was posted a while back, by Shantonu
> Sen. It sets a flag on a volume to "openup" when it's mounted instead
>
> of being minimized on the desktop. I think pliris said that this
> openup
> code or something similar was going to be in a future version of DMG
> Maker.
>
> If you use this in combination with DMG Maker, you can get the
> perfect
> DMG-- it displays license and gets opened foregrounded when mounted.
>
> Alex Rice <email@hidden>
> Mindlube Software
> http://mindlube.com/
>
>

> ATTACHMENT part 2.1 application/applefile name=openup.c
> /*
> * Copyright (c) 2001 Apple Computer, Inc. All rights reserved.
> *
> * @APPLE_LICENSE_HEADER_START@
> *
> * The contents of this file constitute Original Code as defined in
> and
> * are subject to the Apple Public Source License Version 1.1 (the
> * "License"). B You may not use this file except in compliance with
> the
> * License. B Please obtain a copy of the License at
> * http://www.apple.com/publicsource and read it before using this
> file.
> *
> * This Original Code and all software distributed under the License
> are
> * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
> EITHER
> * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
>
> * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
> * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. B Please see
> the
> * License for the specific language governing rights and limitations
> * under the License.
> *
> * @APPLE_LICENSE_HEADER_END@
> */
> /*
> * Shantonu Sen <<EMAIL REMOVED>>
> * openUp.c - program to set the "first-open-window" field of a volume
>
> *
> * Get the directory ID for the first argument, and set it as word 2
> * of the Finder Info fields for the volume it lives on
> *
> * cc -o openUp openUp.c
> * Usage: openUp /Volumes/Foo/OpenMe/
> *
> */
>
> #include <stdio.h>
> #include <unistd.h>
> #include <sys/attr.h>
> #include <sys/stat.h>
> #include <sys/mount.h>
>
> struct directoryinfo {
> unsigned long length;
> u_int32_t dirid;
> };
>
> struct volumeinfo {
> unsigned long length;
> u_int32_t finderinfo[8];
> };
>
>
> int main(int argc, char *argv[]) {
>
> char *path = NULL;
> struct attrlist alist;
> struct directoryinfo dirinfo;
> struct volumeinfo volinfo;
> struct statfs sfs;
>
> path = argv[1];
>
> bzero(&alist, sizeof(alist));
> alist.bitmapcount = 5;
> alist.commonattr = ATTR_CMN_OBJID;
>
> getattrlist(path, &alist, &dirinfo, sizeof(dirinfo), 0);
>
> printf("directory id: %lu\n", dirinfo.dirid);
>
> statfs(path, &sfs);
>
> printf("mountpoint: %s\n", sfs.f_mntonname);
>
> alist.commonattr = ATTR_CMN_FNDRINFO;
> alist.volattr = ATTR_VOL_INFO;
>
> getattrlist(sfs.f_mntonname, &alist, &volinfo, sizeof(volinfo),
> 0);
> volinfo.finderinfo[2] = dirinfo.dirid;
> setattrlist(sfs.f_mntonname, &alist, volinfo.finderinfo,
> sizeof(volinfo.finderinfo), 0);
> }
>
>

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: .dmg displaying license agreement when mounted (From: Alex Rice <email@hidden>)

  • Prev by Date: Re: Using CVS with Project Builder!!!???
  • Next by Date: Re: AddressBook & phone multivalue
  • Previous by thread: Re: .dmg displaying license agreement when mounted
  • Next by thread: Re: .dmg displaying license agreement when mounted
  • Index(es):
    • Date
    • Thread