Skip navigation.
 
ml.dmg displaying license agreement when mounted (solved)
FROM : follet_verfolger@yahoo.ca
DATE : Sat Nov 09 17:29:22 2002

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_removed>> wrote: >
> On Thursday, November 7, 2002, at 04:12  PM,
> <email_removed>
> 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_removed>>
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
ml.dmg displaying license agreement when mounted follet_verfolger@y… Nov 8, 00:12
mlRe: .dmg displaying license agreement when mounted Alex Rice Nov 9, 14:55
mlRe: .dmg displaying license agreement when mounted Paul Ferguson Nov 9, 15:17
mlRe: .dmg displaying license agreement when mounted Christian Weykopf Nov 9, 15:35
ml.dmg displaying license agreement when mounted (solved) follet_verfolger@y… Nov 9, 17:29
mlRe: .dmg displaying license agreement when mounted Michael Tsai Nov 10, 03:55